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
-
src/services/worker/hooks/**-> docs/capture-and-memory.md -
src/services/worker/transcript/**-> docs/capture-and-memory.md -
src/services/context/**-> docs/context-delivery.md -
src/services/worker/context/**-> docs/context-delivery.md -
src/services/worker/{Server.ts,Worker.ts,ClaudeProvider.ts,CodexAppServerClient.ts,SearchManager.ts,provider-dispatch.ts,session/**}-> docs/local-runtime-api.md -
src/services/worker/**-> docs/local-runtime-api.md -
src/services/storage/**-> docs/data-and-sync.md -
src/services/sync/**-> docs/data-and-sync.md -
plugins/**-> docs/distribution-integrations.md -
packages/**-> docs/distribution-integrations.md -
cloudflare/**-> docs/cloud-sync-platform.md -
src/services/teambrain/**-> docs/teambrain-and-work-view.md -
src/services/work-view/**-> docs/teambrain-and-work-view.md -
src/hooks/**-> docs/hook-event-ingestion.md -
src/services/worker/agents/{Transcript*,ResponseProcessor.ts,Observation*}-> docs/transcript-observation-processing.md -
src/services/memory/**-> docs/memory-ingest-and-reinforcement.md -
src/services/native-memory/**-> docs/native-memory-bridge.md -
src/services/worker/remote/**-> docs/remote-worker-capture.md -
src/services/history/**-> docs/history-and-prompt-import.md -
src/services/media/**-> docs/media-artifact-lifecycle.md -
src/modifications/auto-clear/**-> docs/automatic-context-clearing.md -
src/services/context/**-> docs/context-construction.md -
src/mcp/**-> docs/mcp-recall-and-tooling.md -
src/services/worker/search/**-> docs/search-and-memory-retrieval.md -
src/services/worker/http/{middleware.ts,routes/**}-> docs/http-api-and-auth.md -
src/services/worker/{jobs/**,process/**,supervisor/**}-> docs/server-jobs-and-process-supervision.md -
src/services/worker/{ClaudeProvider.ts,CodexAppServerClient.ts,provider-dispatch.ts,agents/ResponseProcessor.ts,session/GeneratorRunner.ts}-> docs/observation-generation-and-provider-runtime.md -
src/ui/viewer/**-> docs/interactive-viewer-client.md -
src/services/smart-file-read/**-> docs/smart-file-read-gate.md -
src/services/{storage,db,repositories}/**-> docs/storage-backends-and-data-models.md -
src/services/backup/**-> docs/backup-and-restore.md -
src/services/sync/{ChromaMcpManager.ts,ChromaSync.ts,chroma-search-budget.ts}-> docs/sync-application-protocol.md -
plugins/claude/**-> docs/plugin-hooks-and-agent-modes.md -
plugins/cursor/**-> docs/cursor-integration.md -
plugins/grok-bot/**-> docs/grok-bot-integration.md -
plugins/cowork/**-> docs/cowork-integration.md -
plugins/openclaw/**-> docs/openclaw-integration.md -
src/integrations/{dsh,pi,t3code}/**-> docs/native-harness-integrations.md -
src/integrations/{kimi,omp,opencode,windsurf}/**-> docs/additional-agent-integrations.md -
scripts/{build-hooks.js,sync-plugin-manifests.js,install*.js}-> docs/installation-and-npx-cli.md -
src/services/notifications/**-> docs/external-notification-integrations.md -
plugins/hermes/**-> docs/hermes-integration.md -
src/integrations/ods/**-> docs/ods-native-integration.md -
sync-hub/**-> docs/sync-hub-worker-processing.md -
sync-api/**-> docs/sync-api-service.md -
sync-hub/{wrangler.toml,src/control-plane/**,src/watchdog/**}-> docs/sync-hub-control-plane.md -
src/services/teambrain/**-> docs/teambrain-workflows.md -
src/services/work-view/**-> docs/work-view-experience.md -
src/ui/my-work/**-> docs/work-view-experience.md -
src/services/hosted-viewer/**-> docs/hosted-viewer-service.md -
src/services/deep-search/**-> docs/deep-search-execution.md -
src/services/update/**-> docs/automatic-update-lifecycle.md -
src/integrations/eve/**-> docs/eve-integration.md