How to Configure Memory
๐ง Tools ยท ๐ Prompt
The agent can maintain persistent memory across conversations. When it learns something worth remembering โ user preferences, project context, recurring corrections โ it saves a concise fact via the save_memory tool. On the next session, all saved memories are loaded into the system prompt automatically.
List and Enable Storesโ
za agents capabilities memory-stores list
za agents capabilities memory-stores configure <store-name>
Configure Provider Settingsโ
za agents capabilities memory-stores settings
| Setting | Type | Default | Description |
|---|---|---|---|
inject_context | bool | true | Load saved memories into the system prompt each turn |
provide_tools | bool | true | Expose the save_memory tool to the agent |
writable_source | str or null | null | Which store to write to (e.g. "tag_notes", "file", "in_memory", "memory_notes") |
read_instructions | str or null | null | Override the default memory injection preamble |
write_instructions | str or null | null | Append domain-specific policy for when/how the agent should save (see Custom Memory Policy) |
Memory Storesโ
| Store | CLI name | Default | Description |
|---|---|---|---|
| Tag Notes | tag-notes | disabled | Production โ memories stored per-user in the platform |
| Memory Notes | memory-notes | disabled | Platform-managed notes with scope filtering |
| File | file | disabled | Development โ JSON file on disk |
| In-Memory | in-memory | disabled | Testing only โ lost on restart |
Tag Notesโ
Stores memories as notes attached to a platform tag. Best for production deployments โ memories are per-user and persist across sessions.
za agents capabilities memory-stores configure tag-notes
Configurationโ
| Setting | Type | Default | Description |
|---|---|---|---|
tag_id | str or null | null | Specific tag to attach memories to; when null, uses the user's favorites tag |
use_favorites | bool | false | Use the user's favorites tag as the memory store |
Memory Notesโ
Platform-managed memory notes with scope-based access control. Multiple scopes allow separating personal notes from shared ones.
za agents capabilities memory-stores configure memory-notes
Configurationโ
| Setting | Type | Default | Description |
|---|---|---|---|
include_scopes | list[str] | ["own"] | Which scopes to read from (e.g. ["own"], ["own", "shared"]) |
Fileโ
Stores memories in a JSON file on disk. Useful during development โ memories survive restarts but aren't tied to a platform user.
za agents capabilities memory-stores configure file
Configurationโ
| Setting | Type | Default | Description |
|---|---|---|---|
file_path | str or null | null | Path to the JSON file; when null, uses a default location |
In-Memoryโ
Holds memories in process memory. Lost on restart โ useful only for testing.
za agents capabilities memory-stores configure in-memory
No additional configuration beyond enabled.
What the Agent Remembersโ
The agent applies a signal gate โ it only saves facts genuinely valuable for future sessions:
- User identity and role
- Stated preferences ("I prefer bullet-point answers")
- Corrections and recurring conventions
- Project decisions
It skips transient task progress, raw data, and information the user wouldn't want persisted.
Custom Memory Policyโ
Add domain-specific guidance via the write_instructions setting:
za agents capabilities memory-stores settings
When prompted for write_instructions, provide your policy:
Never save credentials or API keys. Summarize project decisions concisely. When in doubt, ask the user before saving.