# Keep what agents learn

Keep what agents learn so the next run starts from it instead of rediscovering it: a build
quirk, a convention, the one command that works. You end with a wiki your agents search
before they guess, fed by pages they propose and you approve.

![The Knowledge Base with its spaces in the sidebar and a page open on the right](img/kb-app.png)

## Before you begin

The Knowledge Base is on by default. If **Knowledge** is missing from the header, turn on
**Knowledge Base** in **Settings > Features > Board features**.

## Open the Knowledge Base

1. In the header, click **Knowledge** (or press `3`).

**Result:** the sidebar shows the **Pages**, **Review** and **Sources** tabs; the page you
open reads on the right. To find a page by its words, use the search box in the header: its
results have a **Knowledge** group.

## Write a page

1. In the sidebar, click **+** (**New page**).
2. Fill in **Title** and **Content** (Markdown). For a link to knowledge that lives
   elsewhere, set **Type** to **External link** and fill in **External URL** instead.
3. Pick a **Space** and, to nest it, a **Parent page**. Add **Tags** if they help.
4. Click **Create page**.

**Result:** the page is live in the wiki, and agents find it from their next search. On an
open page, the icons at the top add a subpage, edit it, or archive it.

## Organize spaces, folders and pages

A **space** is a topic area (Frontend, Runbooks). Inside it, a top level page with pages
under it acts as a **folder**: there is no separate folder object.

1. To add a space, click the folder icon (**New space**) beside the space list, type a
   **Space name** and click **Add**.
2. To show one space only, pick it in the list (**All spaces** shows everything).
3. To nest a page, click **Add subpage** on its parent, or click **Move to…** on the page's
   row and search for the new parent by page or space name; **None (top level)** takes it out
   again. You can also drag a page by its handle onto another page, or onto
   **Move to top level** (on a touch screen, press and hold the handle first).

**Result:** pages sit in the space and folder a reader (and an agent filing a page) expects.
A page with no space lives in **General**. Deleting a space keeps its pages and moves them
to General.

Agents list the spaces and folders themselves (with the Knowledge Base tools) when they file
a page, so they can put it in the right one. Folders that match how your team thinks are worth more than a big flat
list.

## Start from the starter spaces

A new board has no spaces. For a code base, six starter spaces are a good start:
Architecture, Frontend, Backend & Data, Security, Quality & Testing, and Runbooks. Create
them with:

```bash
rev0 seed-kb-spaces
```

**Result:** the six spaces exist. The command does nothing when any space exists already, so
rename or delete the ones that do not fit your project.

## Review what agents propose

An agent treats the wiki as living. When its work contradicts a page, it updates that page.
Before it finishes, it searches first and then picks exactly one of: update the page that
already covers it, add one new page (filed into a space and folder), retire a page that is
wrong or superseded (with a reason, never a hard delete), or do nothing. It never writes a
near duplicate. Every edit is kept as a version you can diff and restore, and the ticket
shows a **Knowledge on this ticket** block listing what the agent read, updated, wrote and
retired, with **Undo** on an update and **Restore** on a retirement.
By default the page goes live at once (see
[Publish agent pages without review](#publish-agent-pages-without-review)); with that switched
off, it waits for you.

1. In the Knowledge Base, click **Review**. The number on it counts what waits.
2. Open a page under **Pending review**. It shows which ticket it came from.
3. Decide:
   - Click **Promote to wiki**, pick the space (or **Leave unfiled (General)**), and
     confirm.
   - Or click **Delete page permanently** to discard it.
4. To take every pending page at once, click **Promote all**.

**Result:** promoted pages are live in the wiki; discarded ones are gone. Pages you archive
yourself also land in **Review**, under **Archived**, so you can **Restore** them.

## Publish agent pages without review

**Auto-approve Knowledge Base pages** in **Settings > Features > Board features** is on by
default: agents' pages go live at once, labelled "auto-approved, no human review". Turn it off
to have every page wait in **Review** for you. A board can override it, so a personal board can
publish on arrival while a team board keeps its queue.

## See where knowledge comes from

1. In the Knowledge Base, click **Sources**.
2. Click a bubble for its status (**Connected**, **Needs setup** or **Planned**), how many
   tickets and pages came from it, and what setting it up takes. **Import…** opens that
   source's import.

**Result:** you see every source feeding the board (Jira, Slack and GitHub today; Confluence,
Notion and Hugging Face planned) and which ones still need credentials. Setting one up is in
[Bring in work from GitHub, Jira or Slack](integrations.md).

## What an agent reads at the start of a run

On the first turn of a ticket, the agent gets:

- the titles of up to three pages that match the ticket's title, with how to read them;
- any page you attached to the ticket in **Context (optional)** on the Create form, by name.

It never gets page bodies pasted in. It reads a page, or searches for more, with the
Knowledge Base tools, which it may always use without asking; it is told to search before it
guesses at anything project specific. So a page earns its place by a title an agent would
search for.

## What goes where

| Put it in | When it is | For example |
| --- | --- | --- |
| The Knowledge Base | Reusable knowledge for people and agents across tickets, that someone should review: a gotcha, a runbook, an architectural decision, a convention with its why. | "Frontend tests need `npm ci` in a fresh worktree", a deploy runbook. |
| The repository's `CLAUDE.md` (or `AGENTS.md`) | A short rule every agent in that repository must follow on every run, versioned with the code it is about. | "Run tests with `uv run pytest`", "never edit generated files". |
| The ticket | What only this piece of work needs: the outcome, the acceptance, the links, the decisions made along the way. | "Rename the setting, keep the old key readable for a release". |

A rule of thumb: if it would be wrong on another branch, it goes in `CLAUDE.md`; if it would
be useful on another ticket, it goes in the Knowledge Base; otherwise it stays on the
ticket.

## If something goes wrong

### Knowledge is missing from the header

The Knowledge Base is off. Turn on **Knowledge Base** in
**Settings > Features > Board features** and click **Save changes**.

### Nothing waiting for review.

No agent proposed a page yet. Agents only propose one when a ticket taught them something
durable, and a board with **Auto-approve Knowledge Base pages** on publishes them straight
into the wiki instead.

## Related

- [Write a ticket an agent can finish](write-a-ticket.md), to attach a page as context.
- [Find and reuse what agents made](artifacts.md), for files rather than knowledge.
- [Settings](../reference/settings.md#board-features), for the Knowledge Base switches.
