Memory
Useclient.memory for persistent per-user memory. Memory is tenant-scoped automatically by the client credentials.
For normal agent runs, core memory is included in prompt context by default. Archival memory is not injected by default; agents can recall it through tools, or callers can opt into automatic archival recall with RunOptions.memory_policy.
List And Read
agent_id selects agent-scoped memory automatically.
Update With Conflict Protection
expected_updated_at=None only when creating a missing block. Existing blocks require the last-read timestamp; concurrent edits return 409 Conflict.
Recall Archival Memory
Per-Run Memory Policy
archival_mode="auto" when the current turn is likely to need past specifics. AgentFlow injects bounded matches as hidden current-turn system_reminders context and persists that hidden model input with the turn for replay. The default, tool_only, keeps archival memory out of every prompt and lets the agent recall it when needed. include_user_core and include_agent_core can disable core-memory prompt context for specialized runs.
Delete
Models
| Model | Fields |
|---|---|
MemoryBlock | id, block_type, content, scope, agent_id, created_at, updated_at |
MemoryRecallResult | content, score, block_type, scope, agent_id, line_number, updated_at |

