anneal-memory
v0.1.1Two-layer memory for AI agents with an immune system.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
record
Record a typed episode to memory. Call this when important decisions are made, patterns are noticed, tensions are identified, questions arise, or outcomes are observed. Record the reasoning, not just the fact — 'Chose X because Y' is more valuable than 'using X'. Episodes accumulate during a session and serve as raw material for compression into the continuity file at session end.
| Parameter | Type | Description |
|---|---|---|
content * | string | The episode content — what happened, what was observed, decided, or questioned. |
episode_type * | string | Episode type. observation=pattern/insight, decision=committed choice, tension=conflict/tradeoff, question=open question, outcome=result of action, context=environmental/state info. |
metadata | object | Optional JSON metadata to attach to the episode. |
source | string | Agent or source attribution. Defaults to 'agent'. |
recall
Query episodes from memory with filters. Call this to find prior context before making decisions, to locate specific episodes for citation during graduation, or to review recent work. Returns matching episodes ordered by timestamp (newest first). Supports time range, type, source, and keyword filters.
| Parameter | Type | Description |
|---|---|---|
episode_type | string | Filter by episode type. |
keyword | string | Search episode content for this keyword. |
limit | integer | Maximum episodes to return. Default 100. |
offset | integer | Skip first N matching episodes. Default 0. |
since | string | ISO 8601 timestamp — return episodes after this time. |
source | string | Filter by source/agent attribution. |
until | string | ISO 8601 timestamp — return episodes before this time. |
prepare_wrap
Prepare a compression package for session wrap. Call this at session boundaries — when work is ending, the user says to wrap up, or the session is getting long. Returns all episodes since the last wrap, the current continuity file, stale pattern warnings, and compression instructions. Marks a wrap as in-progress. After calling, follow the returned instructions to compress episodes into an updated continuity file, then save with save_continuity. The compression step is where the real thinking happens — patterns emerge that weren't visible in the raw episodes.
| Parameter | Type | Description |
|---|---|---|
max_chars | integer | Maximum size of the continuity file in characters. Default 20000. |
staleness_days | integer | Days without validation before flagging patterns as stale. Default 7. |
save_continuity
Validate and save the compressed continuity file. Call this after compressing your episodes using the instructions from prepare_wrap. The text must contain exactly 4 sections: ## State, ## Patterns, ## Decisions, ## Context. The server validates structure, checks graduation citations against real episodes (cited IDs must exist), checks explanation overlap (evidence must reference actual episode content), detects citation gaming (suspicious reuse of single episodes), and may demote ungrounded graduations. Returns validation results and section sizes.
| Parameter | Type | Description |
|---|---|---|
text * | string | The full continuity markdown to save. Must contain all 4 required sections. |
status
Get memory health metrics. Call this at session start to understand memory state, or when diagnosing issues. Returns episode counts (total and since last wrap), wrap history, continuity file size, episodes by type, and whether a wrap is currently in progress.