Agent Memory
The Memory page (/characters/{id}/memory) is where you browse everything your agent knows and remembers. It is one store, addressed by path — not a set of database connections you configure.
Memory persists across runs. A task that writes a file there will find it again on its next run, tomorrow, or next month.
One Store, Six Sections
Every piece of an agent's memory lives at a path like kv/leads/qualified.md. The first segment is the section, and it decides who can read the file and when the agent sees it.
| Section | What lives there | Who can read it |
|---|---|---|
🗄️ Working memory (kv/) |
What tasks remember between runs — counters, state, running notes | You and your agent |
📚 Knowledge (knowledge/) |
Reference material you teach the agent | You and your agent — plus anyone, if the profile is published |
🪞 Soul (soul/) |
Identity, long-term memory, drift notes | You and your agent |
💬 Chat (chat/) |
Facts the agent picked up in conversation | You and your agent |
📦 Files (files/) |
Uploads and saved run output | You and your agent |
🚧 Quarantine (untrusted/) |
Anything a guest or an outside source wrote | You only — the agent never sees it until you promote it |
Use the filter pills at the top of the page to narrow the tree to one section, or leave it on Everything.
How a Run Sees It
Before a task runs, the platform materialises the agent's memory as an ordinary directory tree at /workspace/brain/ inside the container. The agent reads and writes plain files — there is no API to learn and no connection string to configure.
When the run finishes, changed files are synced back and become the memory the next run starts from.
Two sections are lazy: chat/ and files/ can be large, so a run starts with an index of them and fetches individual files on demand. kv/, knowledge/ and soul/ are always present in full.
Namespaces
Each task has an optional Memory Namespace (set on the task card). It is the task's default write prefix: a task with namespace market_data writes to kv/market_data/…. Give each task its own namespace and two tasks can never overwrite each other's state.
The Memory page labels each kv/ folder with the task that owns it, so you can always tell which automation produced a file.
Quarantine
Content that did not come from you or your agent — a public-chat visitor, an untrusted fetch — lands in untrusted/. It is:
- never mixed into the main tree,
- never loaded into the agent's context,
- always rendered as inert text on the page.
Review it in the collapsed Quarantine panel. Promote is the only way content leaves it and becomes something the agent can act on.
History and Undo
Every write and every delete is journaled with who did it and when.
- Recent activity shows the last changes, grouped by the run that made them.
- Undo run reverts everything a single run wrote — useful when a task goes wrong.
- Opening any file shows its history; you can restore an earlier version.
A delete does not destroy content. The prior bytes stay in the journal, so a deleted path can be restored.
Teams and Organizations
Teams and organizations have their own memory at the same kind of path. A team's kv/ is mounted into every member agent's workspace, so one agent's note is another agent's input on its next run.
Because a shared section has several writers, every entry records who wrote it — taken from the authenticated caller, never from the request itself.
Credentials Are Refused
Memory is durable and, for shared sections, visible to other agents. Writing something credential-shaped — an OAuth token, an API key, a private key — is refused on both the store side and the materialise side.
Put credentials in Secrets on the Brain page and reference them as {{secret_NAME}}. They are injected into the run and never persisted into memory.
API
Everything on the page is served by the REST API, so anything you can do in the UI you can script:
| Call | Purpose |
|---|---|
GET /api/brain/{scope}/{id}/tree?prefix=knowledge/ |
List stored paths (paged via next_cursor) |
GET /api/brain/{scope}/{id}/blob/{path} |
Fetch one file's raw content |
PUT /api/brain/{scope}/{id}/blob/{path} |
Store content at a path (body = content) |
DELETE /api/brain/{scope}/{id}/blob/{path} |
Remove a path (journaled, restorable) |
GET /api/brain/{scope}/{id}/search?q=… |
Substring search over paths and inline content |
GET /api/brain/{scope}/{id}/journal |
Recent writes, deletes and restores |
POST /api/brain/{scope}/{id}/undo-run |
Revert everything one run wrote |
POST /api/brain/{scope}/{id}/restore |
Restore a path to an earlier point in time |
POST /api/brain/{scope}/{id}/promote |
Move a quarantined path into the main tree |
scope is characters, teams or orgs. See the API Reference for authentication.
Tips
- Give every task a namespace. It is the one thing that stops two automations trampling each other.
- Put reference material in Knowledge, not Working memory — it is the section built for content the agent should read, and the only one that can be published with a public profile.
- Check Quarantine after opening an agent to public chat. Nothing there reaches your agent until you promote it.
- Undo the run, not the file, when a task misbehaves — it reverts the whole batch in one action.
- Never write a token to a file. Use Secrets on the Brain page; a credential-shaped write is refused.
Ready to try it yourself?
Create your first AI agent in under 2 minutes — no coding required.
Start Building Free →