Memory
Persistent facts and rules your agents carry across runs.
Memory gives your agents knowledge that persists between runs — without a database or a retrieval step.
Two layers are available:
- Facts — individual statements the agent remembers across runs (e.g. "the customer prefers weekly digests over real-time alerts"). Written by the agent at runtime, extracted from past sessions by a background agent, or added directly in the dashboard.
- Rules — a persistent system-prompt overlay applied on every run. Use this for standing instructions that should never change: tone, hard constraints, workspace-wide policies.
Both Facts and Rules exist at two scopes: workspace-wide (applied to every agent in the workspace) and per-agent (applied only to that agent's runs). Per-agent facts and rules are injected after workspace-wide ones.
How the agent reads memory
Memory is injected automatically at dispatch. When a run starts, the platform prepends the relevant facts and rules to the agent's system prompt. The agent reads them as context — no tool call required, no retrieval logic in the recipe.
Workspace-wide facts come first; per-agent facts follow. Together they form a cumulative overlay that the recipe sees as part of its system prompt.
How the agent writes memory
The agent writes facts using the remember and forget built-in
tools. A call to remember queues a new fact;
forget queues a deletion. The harness drains both queues and persists
the changes at the end of the turn — neither takes effect within the
same run that issued the call. By default a fact written by
remember is scoped to the calling agent; pass target_agent_id: null to write to the workspace scope instead.
Background extraction
The platform runs a background memory maintainer after each session.
It reads the session transcript and extracts facts worth keeping, then
writes them back through the same remember tool. Extracted facts are
tagged source: maintainer in the dashboard.
A watermark per session prevents re-processing. The maintainer runs on Levain's account and costs you nothing.
Manage memory in the dashboard
The Memory panel appears at two places:
- Per-agent — on the agent's detail page, under the Memory tab. Shows only facts scoped to that agent.
- Workspace-wide — under Settings → Memory. Shows facts that apply to every agent in the workspace plus the editable rules overlay.
Actions available in both:
| Action | What it does |
|---|---|
| Add fact | Creates a new semantic memory entry (source: user). |
| Delete | Soft-deletes the entry; it stops being injected on the next run. |
| Promote / Demote | Moves a fact between agent scope and workspace scope. |
The Rules tab holds the procedural overlay as a freeform text block. Save your changes and they take effect on the next dispatch.
Skills — learned procedures
Agents running on the self-learning engine (see Execution engines) go one step further: besides facts, they write skills — small documented procedures the agent authors for itself when it solves something worth repeating. Skills load on demand in later runs, so a workflow the agent figured out once doesn't have to be rediscovered.
Skills appear under the Skills tab on the agent's detail page. Each entry shows the skill's description, size, and how often the agent has used it. Open a skill to read exactly what the agent taught itself; delete it to revoke the behavior — the agent stops loading it from the next session on.
Facts written by a self-learning agent land in the same memory store described above: they show up in the Memory panel, editable and deletable like any other fact, and edits you make there reach the agent on its next turn.
Next
- The Tools primitive covers the
rememberandforgetbuilt-in capabilities the agent uses to write facts. - Wikis store structured knowledge the agent searches on demand — Memory injects context automatically, before the agent decides what to search for.