contox memory
Load the full project memory via the V2 brain system. This is the primary way to retrieve your project's accumulated knowledge for use with AI coding assistants.
Usage
contox memory [options]
Options
| Flag | Description | Required | Default |
|---|---|---|---|
-o, --output <file> | Write memory to a file instead of stdout | No | -- |
--json | Output in JSON format | No | false |
--brief | Load Layer 0 only (minimal summary) | No | false |
--budget <tokens> | Token budget for the memory document | No | 6000 |
--layers | Show layer breakdown information | No | false |
-q, --quiet | Suppress informational output | No | false |
Examples
Load memory to the terminal:
contox memory
Save memory to a file for use with an AI tool:
contox memory -o .contox-memory.md
Get a brief summary (Layer 0 only):
contox memory --brief
Output as JSON for programmatic use:
contox memory --json
Set a custom token budget:
contox memory --budget 10000
Show layer breakdown:
contox memory --layers
What it returns
The memory document is a structured markdown document assembled from all approved memory items in your project brain. It typically includes:
- Architecture -- Tech stack, patterns, project structure
- Conventions -- Coding style rules, naming patterns, team agreements
- Implementation journal -- Features built, components created, APIs implemented
- Decisions -- Key decisions with rationale and trade-offs
- Bugs and fixes -- Known bugs and their resolutions
- Todo -- Pending tasks, known issues, technical debt
Token budget
The --budget flag controls the approximate token count for the output document. The brain system prioritizes higher-tier items (architecture, conventions) and trims lower-priority content to fit within the budget. The default of 6000 tokens provides a good balance for most projects.
Notes
- This command requires a valid
.contox.jsonin your project directory (runcontox initfirst). - For Claude Code with the MCP server, memory is loaded automatically via the
contox_get_memorytool. This command is primarily for other AI tools or manual inspection. - The
--quietflag is useful when piping output to another command or file, suppressing status messages that would otherwise pollute the output.