Skip to content

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.

text
        ┌────────────────────────────────────────────┐
        │             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:

json
{
  "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:

CategoryPrefixPurpose
Encodeencode.*Store and update memories
Recallrecall.*Query and retrieve memories
Lifecyclelifecycle.*Manage decay, consolidation, mode changes, and archive workflows
Introspectintrospect.*Observe system state and memory metadata

Operation Summary

Encode

OperationDescription
encode.storeStore a new memory record
encode.batchStore multiple records with optional association inference
encode.updateUpdate an existing record's content, emotion, or metadata
encode.store_rawStore a raw journal entry (verbatim preservation)
encode.batch_rawStore multiple raw journal entries

Recall

OperationDescription
recall.queryMultimodal cue-based retrieval with Human/Perfect modes
recall.associateTraverse the association graph from a given record
recall.timelineTime-bucketed retrieval within a date range
recall.graphRetrieve a subgraph of memory nodes and edges
recall.raw_queryForensic recall over the preserved raw journal

Lifecycle

OperationDescription
lifecycle.consolidateMigrate mature episodic memories to semantic store
lifecycle.decay_tickManually trigger a decay computation cycle
lifecycle.dream_tickSummarize raw journal entries into episodic/semantic memory
lifecycle.set_modeSwitch between Human and Perfect recall modes
lifecycle.forgetPermanently delete records
lifecycle.exportExport records to a CMA archive (HTTP, gRPC, CLI, MCP)
lifecycle.importImport records from a CMA archive (HTTP, gRPC, CLI)

Introspect

OperationDescription
introspect.statsSystem-wide statistics, including optional evolution metrics
introspect.recordDetailed view of a single record
introspect.decay_forecastPredict future fidelity for given records
introspect.evolutionView adaptive parameter adjustments

Transport Availability

The protocol is transport-agnostic, but each binding exposes a different subset:

TransportCoverage
HTTP/RESTCore encode, recall, lifecycle, and introspect operations
gRPCFull CMP coverage, including export/import streaming
MCPCurated LLM-friendly tool surface over stdio
CLILocal workflows that wrap engine operations and archive management

Error Handling

All errors are returned as a standardized CMPError envelope:

json
{
  "code": "RECORD_NOT_FOUND",
  "message": "Record not found: 01916e3a-...",
  "details": null,
  "retry_after": null
}
CodeHTTP StatusDescription
RECORD_NOT_FOUND404Record does not exist
STORE_INVALID400Invalid store name
CONTENT_TOO_LARGE413Content exceeds size limit
VALIDATION_ERROR400Request validation failed
MODALITY_UNSUPPORTED400Modality not supported by the configured provider
WORKING_MEMORY_FULL503Working memory at capacity
DECAY_ENGINE_BUSY503Decay computation in progress
CONSOLIDATION_IN_PROGRESS503Consolidation already running
EXPORT_FAILED500Archive export failed
IMPORT_CONFLICT409Import conflict detected
FORGET_UNCONFIRMED400Missing confirm: true
VERSION_MISMATCH400Optimistic concurrency conflict
UNAUTHORIZED401Missing or invalid API key
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Unexpected server error

Next Steps

Encode Operations

Store and update memories

Recall Operations

Query and retrieve memories