Skip to content
AgentOS
DocumentationMemory

Platform

Memory

Scopes, retention, redaction and recall for context that outlives a run.

Memory gives agents context that lasts beyond one run. Every entry belongs to a scope, records where it came from and expires on a schedule you set.

memory/scopes.yamlYAML
scopes:  - name: tenant    key: "{{ run.tenant_id }}"   # one isolated store per customer    retention: 180d    redact: [email, phone, payment_card]   - name: agent    retention: 90d   - name: workspace    retention: none              # curated knowledge, managed by admins    write: [role:admin]

Scopes

ScopeShared byTypical use
runOne runWorking notes. Deleted when the run ends.
agentAll runs of one agentWhat the agent has learned about doing its job.
tenantRuns that act for the same customerCustomer context, kept apart from every other tenant.
workspaceEvery agentCurated knowledge such as playbooks. Written by admins.

A scope with a key has one isolated store for each value of the key. The platform takes the key from the run's context, so an agent cannot ask for another tenant's store.

Reading and writing

Agents use memory through three built-in tools. Like any other tool call, each one is checked against policy and recorded in the trace.

ToolDescription
memory.readFetch an entry by key.
memory.searchFind entries by meaning or by filter.
memory.writeStore an entry as a fact, a preference, an episode or a document.

Retention and deletion

retention is the time an entry lives after it is written. Expired entries are removed without any action from you. Entries can also be purged by key, by user or by tenant, which is how deletion requests are handled.

Each purge is recorded in the audit log. The record says what was removed and who asked, without the content.

Redaction

redact lists the kinds of data to detect before an entry is stored. Detected values are replaced with a placeholder such as [redacted email], and the entry records how many values were replaced.

Provenance

Each entry stores the run that wrote it, the agent or person who wrote it and the time. When an answer looks wrong, open the run to see which entries were read and follow each one back to its source.

The memory view in the demo console shows scopes and a sample of entries.