Overview
contox_get_memory loads the complete project memory as a structured markdown document. This should be the first tool called at the start of every AI session so the assistant remembers previous work, architecture decisions, conventions, and implementation history.
The tool returns the V2 brain document assembled from all approved memory items, organized into sections: Architecture, Conventions, Implementation Log, Decisions, Bugs and Fixes, Todo, and Session Log.
Parameters
This tool takes no parameters.
Return value
Returns a markdown document containing the full project brain, followed by metadata:
| Field | Type | Description |
|---|---|---|
itemsLoaded | number | Total number of memory items loaded into the brain |
tokenEstimate | number | Approximate token count of the brain document |
layers | object | Breakdown by tier — layer1 (always loaded), layer2 (on-demand), archived |
brainHash | string | Content hash for change detection |
The metadata appears as a footer line in the response:
_12 items loaded (~3400 tokens) | L1: 5, L2: 6, archived: 1 | hash: abc123_
Usage examples
Loading memory at session start
The AI calls this tool automatically at the beginning of a session:
User: Load my project memory
Claude calls: contox_get_memory()
Response:
# Project Memory (V2)
## Architecture
> confidence: 0.95 | files: src/app/layout.tsx
Next.js 14 App Router with TypeScript strict mode...
## Conventions & Rules
> confidence: 0.90
Void arrow functions must have braces...
---
_12 items loaded (~3400 tokens) | L1: 5, L2: 6, archived: 1 | hash: abc123_
Notes
- This tool always loads the V2 brain document, which includes all approved memory items organized by category.
- The brain document is assembled server-side from individual memory items, each with confidence scores and source file references.
- Token estimates use a word-based approximation, not exact tokenizer counts.
- If no memory items exist yet (new project), the brain document will be minimal or empty.