CMEM Pro is ready —Get CMEM Pro
Capture

The note-taker beside the workbench

How tool activity becomes compact, durable memory while the main agent keeps working.

An AI agent works while a small archivist turns activity into observation cards.

Hooks are the doorbells

An agent already has a rhythm: a session begins, a prompt arrives, tools run, and the session stops. A hook is a small signal fired at one of those moments. claude-mem listens to those signals instead of asking the agent to remember to take notes.

The important part is timing. Capture happens alongside the work, so the main agent can keep building while the memory worker processes the trail in the background.

PromptToolsHookWorker

The worker writes the useful version

Raw tool output is exhaust. It contains every line read, every test result, and every command. The worker asks a second model to compress that activity into an observation, a short structured note about what changed, what was learned, and why it matters.

This is out-of-band processing: the note-taker works beside the critical path, not inside it. If compression takes a moment, it does not hold up the agent's answer.

Raw trail
  • Read the gateway route
  • Changed retry timing
  • Ran the focused tests
  • Saw an upstream 429
Observation

Gateway retries now respect upstream rate limits. The first attempt failed because its backoff ignored the provider's timing signal.

This is an illustrative example, not product telemetry.

The filing cabinet is local

Observations, prompts, sessions, and summaries live in a SQLite database under ~/.claude-mem. SQLite is the filing cabinet. FTS5 is its fast text index. An optional vector index can add semantic search when similar meaning matters more than exact wording.

workobservationsclaude-mem.db

At session stop, claude-mem also creates a closing summary. Think of it as the shift report pinned above the cabinet: what was requested, what finished, what changed, and what still needs attention.