Skip to main content

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
SettingTypeDefaultDescription
inject_contextbooltrueLoad saved memories into the system prompt each turn
provide_toolsbooltrueExpose the save_memory tool to the agent
writable_sourcestr or nullnullWhich store to write to (e.g. "tag_notes", "file", "in_memory", "memory_notes")
read_instructionsstr or nullnullOverride the default memory injection preamble
write_instructionsstr or nullnullAppend domain-specific policy for when/how the agent should save (see Custom Memory Policy)

Memory Storesโ€‹

StoreCLI nameDefaultDescription
Tag Notestag-notesdisabledProduction โ€” memories stored per-user in the platform
Memory Notesmemory-notesdisabledPlatform-managed notes with scope filtering
FilefiledisabledDevelopment โ€” JSON file on disk
In-Memoryin-memorydisabledTesting 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โ€‹

SettingTypeDefaultDescription
tag_idstr or nullnullSpecific tag to attach memories to; when null, uses the user's favorites tag
use_favoritesboolfalseUse 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โ€‹

SettingTypeDefaultDescription
include_scopeslist[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โ€‹

SettingTypeDefaultDescription
file_pathstr or nullnullPath 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.