Skip to main content

Module memory

Module memory 

Source
Expand description

Memory scratch pad for workflows and steps.

Memory is a managed folder of files with a .manifest JSON index that gets injected into agent system prompts. It enables agents to accumulate and search knowledge across workflow runs.

Storage mirrors the resource tier layout:

  • ~/.zig/memory/_shared/ — global shared tier
  • ~/.zig/memory/<workflow>/ — global per-workflow tier
  • <git-root>/.zig/memory/ — project-local tier

Each tier directory contains a .manifest JSON file alongside the actual memory files.

Structs§

Manifest
The .manifest file contents — an index of all memory entries in a tier.
MemoryCollector
Run-time collector for memory entries, similar to ResourceCollector.
MemoryEntry
A single memory entry in the manifest.

Enums§

MemoryTarget
Where a memory command should target.
SearchScope
Search result granularity.

Functions§

add
Add a file to the memory scratch pad.
delete
Delete a memory entry and its file.
list
List all memory entries across all tiers.
load_manifest
Load the manifest from a tier directory. Returns an empty manifest if the file does not exist.
render_memory_block
Render a <memory> block to prepend to a system prompt.
save_manifest
Save the manifest to a tier directory.
search
Full-text search across all memory files.
show
Show metadata and contents of a memory entry.
update
Update metadata for an existing memory entry.