CMP Protocol Overview
Introduction to the Cerememory Protocol (CMP) -- the single transport-agnostic API for living memory. MCP is a transport for CMP, not a separate protocol.
What is CMP?
The Cerememory Protocol (CMP) is a versioned, transport-agnostic protocol that defines every operation for interacting with Cerememory's living memory system. CMP is the language; HTTP, gRPC, and MCP are just different ways of speaking it.
CMP vs. MCP -- they are not peers
A common confusion: MCP is one transport for CMP, not a competing protocol. Everything flows through CMP. HTTP and gRPC expose the full CMP surface; MCP exposes a curated 15-tool subset tailored for LLM agents.
┌────────────────────────────────────────────┐
│ LLM Clients & Agents │
│ Claude · GPT · Gemini · … │
└──────────────────────┬─────────────────────┘
│
┌──────────────┬───────┴───────┬──────────────┐
│ │ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ HTTP │ │ gRPC │ │ MCP │
│ REST │ │ stream │ │ 15 tool │
│ full │ │ full │ │ subset │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└──────────────┴───────┬───────┘
│
┌──────────────────────┴─────────────────────┐
│ CMP — Cerememory Protocol │
│ encode · recall · lifecycle · introspect │
└──────────────────────┬─────────────────────┘
│
┌──────────────────────┴─────────────────────┐
│ Cerememory Engine │
│ Five memory stores · decay · association │
└────────────────────────────────────────────┘Every CMP message includes a protocol header with versioning:
{
"protocol": "cmp",
"version": "1.0",
"request_id": "01916e3a-1234-7000-8000-000000000001",
"timestamp": "2026-03-19T10:00:00Z"
}Four Operation Categories
CMP organizes all operations into four categories:
| Category | Prefix | Purpose |
|---|---|---|
| Encode | encode.* | Store and update memories |
| Recall | recall.* | Query and retrieve memories |
| Lifecycle | lifecycle.* | Manage decay, consolidation, mode changes, and archive workflows |
| Introspect | introspect.* | Observe system state and memory metadata |
Operation Summary
Encode
| Operation | Description |
|---|---|
encode.store | Store a new memory record |
encode.batch | Store multiple records with optional association inference |
encode.update | Update an existing record's content, emotion, or metadata |
encode.store_raw | Store a raw journal entry (verbatim preservation) |
encode.batch_raw | Store multiple raw journal entries |
Recall
| Operation | Description |
|---|---|
recall.query | Multimodal cue-based retrieval with Human/Perfect modes |
recall.associate | Traverse the association graph from a given record |
recall.timeline | Time-bucketed retrieval within a date range |
recall.graph | Retrieve a subgraph of memory nodes and edges |
recall.raw_query | Forensic recall over the preserved raw journal |
Lifecycle
| Operation | Description |
|---|---|
lifecycle.consolidate | Migrate mature episodic memories to semantic store |
lifecycle.decay_tick | Manually trigger a decay computation cycle |
lifecycle.dream_tick | Summarize raw journal entries into episodic/semantic memory |
lifecycle.set_mode | Switch between Human and Perfect recall modes |
lifecycle.forget | Permanently delete records |
lifecycle.export | Export records to a CMA archive (HTTP, gRPC, CLI, MCP) |
lifecycle.import | Import records from a CMA archive (HTTP, gRPC, CLI) |
Introspect
| Operation | Description |
|---|---|
introspect.stats | System-wide statistics, including optional evolution metrics |
introspect.record | Detailed view of a single record |
introspect.decay_forecast | Predict future fidelity for given records |
introspect.evolution | View adaptive parameter adjustments |
Transport Availability
The protocol is transport-agnostic, but each binding exposes a different subset:
| Transport | Coverage |
|---|---|
| HTTP/REST | Core encode, recall, lifecycle, and introspect operations |
| gRPC | Full CMP coverage, including export/import streaming |
| MCP | Curated LLM-friendly tool surface over stdio |
| CLI | Local workflows that wrap engine operations and archive management |
Error Handling
All errors are returned as a standardized CMPError envelope:
{
"code": "RECORD_NOT_FOUND",
"message": "Record not found: 01916e3a-...",
"details": null,
"retry_after": null
}| Code | HTTP Status | Description |
|---|---|---|
RECORD_NOT_FOUND | 404 | Record does not exist |
STORE_INVALID | 400 | Invalid store name |
CONTENT_TOO_LARGE | 413 | Content exceeds size limit |
VALIDATION_ERROR | 400 | Request validation failed |
MODALITY_UNSUPPORTED | 400 | Modality not supported by the configured provider |
WORKING_MEMORY_FULL | 503 | Working memory at capacity |
DECAY_ENGINE_BUSY | 503 | Decay computation in progress |
CONSOLIDATION_IN_PROGRESS | 503 | Consolidation already running |
EXPORT_FAILED | 500 | Archive export failed |
IMPORT_CONFLICT | 409 | Import conflict detected |
FORGET_UNCONFIRMED | 400 | Missing confirm: true |
VERSION_MISMATCH | 400 | Optimistic concurrency conflict |
UNAUTHORIZED | 401 | Missing or invalid API key |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Unexpected server error |
Next Steps
Store and update memories
Query and retrieve memories