SerialMemory Documentation

SerialMemory provides persistent, tenant-isolated memory for AI agents and developer systems. It combines vector search, knowledge graphs, and deterministic reasoning into one unified API.

This documentation focuses on practical usage, patterns, and real-world integration.

Quickstart

terminal
docker run -it serialcoder/serialmemory-mcp

First run flow:

  • 1. The MCP client will ask for your API key.
  • 2. Press Enter to accept the default server URL.
  • 3. The client starts a local MCP bridge.

There is no config file required.

There are no environment variables required.

Core Concepts

Memory Types

SerialMemory stores structured memory in multiple layers:

L0_RAW- Raw user or system input
L1_CONTEXT- Interpreted meaning
L2_SUMMARY- Compressed understanding
L3_KNOWLEDGE- Extracted facts
L4_HEURISTIC- Learned system patterns

Each layer can be queried independently.

All writes are versioned and traceable.

MCP Tools Reference

memory_ingest
memory_search
memory_multi_hop_search
memory_update
memory_delete
crawl_relationships
export_memories
get_graph_statistics
memory_about_user

These tools are exposed through MCP and can be called directly from Claude, Cursor, or custom agents.

Typical Usage Patterns

Before answering a question:

  1. 1. Run memory_search
  2. 2. Use the top results as context
  3. 3. Answer the user

After answering:

  1. 1. Run memory_ingest
  2. 2. Store both the question and the answer
  3. 3. Let SerialMemory extract entities and relationships automatically

Tenant Isolation

SerialMemory enforces tenant isolation at three layers:

Application Layer

Tenant-scoped access control on every API call

Database Layer

Row Level Security policies enforced at PostgreSQL level

Vector Layer

Tenant-isolated embeddings in pgvector

A tenant can never access data belonging to another tenant.

Example Claude Prompt

system prompt snippet
Before answering:
1. Use memory_search for relevant context.
2. Use that context in reasoning.

After answering:
Store important information using memory_ingest.

Roadmap

Live graph streaming (SignalR)
Deterministic replay for reasoning
Time travel debugging for memory state
Self-hosted enterprise mode (on-request)

Ready to integrate?

Get your API key and start building agents with persistent memory.