Introducing a new way to review your PRs.

Read the announcement

thedotmack / claude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

View on GitHub

47 documents · Updated Nov 20, 2026

overview

Knowledge Base updated: 2026-11-19

claude-mem knowledge base

claude-mem captures coding-agent activity, turns it into durable observations, and returns relevant context through local tools, HTTP APIs, viewers, and supported agent integrations.

The local worker and SQLite-backed services hold primary runtime state; optional sync services replicate canonical content and collaboration state. Plugin packages, installers, and host-specific bridges connect supported coding environments to the capture and recall paths.

flowchart LR
  A[Agent hosts and plugins] --> B[Hook and transcript capture]
  B --> C[Worker runtime]
  C --> D[Observation generation]
  D --> E[Local storage and search]
  E --> F[Context construction]
  F --> G[MCP and HTTP delivery]
  G --> A
  C --> H[Viewer client]
  C --> I[Work-view services]
  I --> J[My Work client]
  E --> K[Sync client]
  K --> L[Sync hub and API]
  L --> M[Cloud projections]
  N[NPX installer and packages] --> A
  N --> C
sequenceDiagram
  participant Host as Agent host
  participant Hook as Capture hook
  participant Worker as Local worker
  participant Provider as Generation provider
  participant Store as Memory storage
  Host->>Hook: session event or transcript update
  Hook->>Worker: normalized capture payload
  Worker->>Provider: generate observations
  Provider-->>Worker: structured response
  Worker->>Store: persist observations and search state

Glossary

  • Observation — a durable, searchable memory record derived from agent activity.
  • Chroma sync — synchronization of local memory content and state with the cloud-backed protocol.
  • Work view — projected, reviewable representation of active and completed agent work.
  • TeamBrain — shared-project intelligence exposed through commands, APIs, and briefs.
  • Native memory bridge — host-facing local integration for memory instructions, saving, and progressive search.

Invariants

  • Captured agent activity is normalized before durable observation processing (src/services/worker/agents/**).
  • Local API requests pass through shared middleware and versioned route handlers (src/…/middleware.ts, src/services/worker/http/routes/**).
  • Search and context delivery operate over persisted observations rather than raw host transcripts (src/…/SearchManager.ts, src/services/worker/search/**).
  • Sync application preserves client state and remaps outbound content as it is applied (src/…/ChromaSync.ts).
  • Work-view projections are derived through service-side request grouping and review logic (src/…/request-groups.mjs, src/…/request-judge.mjs).

Routing table