Recall and Precheck
Memzoi has two read-side workflows: recall memory for context, and check planned work against risky memories before acting.
Search active memory
memzoi search pnpm --json
memzoi search pnpm --type decision --scope-kind repo --limit 5
memzoi search billing --path apps/api/src/billing --json
Search is backed by SQLite FTS over active record titles and bodies. It supports optional filters for memory type, scope kind, path prefix, and limit.
Path filtering matches records bound to the exact path, descendants of the path, or ancestors of the path. That lets a record attached to apps/web apply when the user is working in apps/web/src/App.tsx.
Build a context pack
memzoi context --task "install dependencies" --json
memzoi context --task "edit the frontend" --path apps/web --token-budget 1200
Context packs are prompt-ready summaries of task-relevant active memory records. When --path is supplied, path-bound records are prioritized. --token-budget limits the rendered prompt text; when omitted, Memzoi uses its default budget.
Global context content remains repo-only. Matching local or session runtime memory may be reported as count-only exclusion warnings in JSON output, but local/session titles, bodies, citations, and record ids are not included.
The JSON output includes:
id: context pack idtask: requested taskprompt: rendered prompt textrecords: selected search resultscitations: record citationstoken_budget: requested token budget, if suppliedbudget: requested budget, effective budget, approximate used budget, and estimate unitincluded: compact metadata for selected records, including provenance and destinationomitted: capped metadata for relevant repo records excluded by budgetwarnings: structured notices, including count-only local/session exclusion warningsnext_queries: targeted follow-up searches, currently emptycreated_at: creation timestamp
Run pre-action checks
Use precheck before destructive commands, broad file edits, package-manager changes, migrations, or work that may repeat a known failed attempt.
memzoi precheck --command "npm install" --json
memzoi precheck --path package.json --action "change package manager"
memzoi precheck --path apps/api/src/billing/invoice.rs --action "change invoice rounding"
Precheck searches active memory and returns warnings only for governance memory types:
riskwarningfailed_attempt
Warnings include a severity, cited record id, message, and suggested next step.
Interpreting warnings
riskproduces high-severity warnings and should usually trigger a targeted test or closer review.warningmarks known caveats or repo-specific hazards.failed_attempthelps agents avoid repeating an approach that already failed.
If there are no matching governance memories, the CLI prints No memory warnings. in text mode and returns an empty warnings array in JSON mode.