SerialMemory is a temporal knowledge graph memory system for AI applications. Think of it as a persistent "second brain" that stores, indexes, and retrieves information using semantic search.
- Semantic Search: Find memories by meaning, not just keywords
- Entity Extraction: Automatically identifies people, organizations, dates, and concepts
- Relationship Tracking: Builds a knowledge graph of connections between entities
- Multi-Hop Reasoning: Traverses relationships to find related context
- Event Sourcing: Full audit trail of all changes with confidence decay
- Multi-Tenant: Isolated data per tenant with row-level security
┌──────────────────────────────────────────────────────────────────┐
│ Client Applications │
│ (Claude Desktop, Custom Apps, SDKs) │
└──────────────────────────────┬───────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────┐
│ API Layer │
│ ┌─────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ MCP Server │ │ REST API │ │ Dashboard API │ │
│ │ (Claude) │ │ (Custom Apps) │ │ (Self-Service) │ │
│ └─────────────┘ └──────────────────┘ └──────────────────┘ │
└──────────────────────────────┬───────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────┐
│ Core Services │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Knowledge Graph Service │ │
│ │ - Memory ingestion with entity extraction │ │
│ │ - Semantic search (pgvector) │ │
│ │ - Multi-hop graph traversal │ │
│ │ - User persona management │ │
│ └─────────────────────────────────────────────────────────────┘ │
└──────────────────────────────┬───────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────┐
│ Data Layer │
│ ┌─────────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
│ │ PostgreSQL │ │ Ollama │ │ Redis │ │
│ │ + pgvector │ │ (Embeddings) │ │ (Cache/Rate Limit) │ │
│ └─────────────────┘ └──────────────┘ └─────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
A memory is a piece of information stored in the system. Each memory has:
- Content: The actual text/information
- Embedding: A 1536-dimensional vector for semantic search (OpenAI text-embedding-3-small)
- Entities: Extracted entities (people, organizations, etc.)
- Confidence: A score that decays over time unless reinforced
- Layer: Classification (L0_RAW through L4_HEURISTIC)
Named things extracted from memories:
- PERSON: People's names
- ORG: Organizations and companies
- GPE: Geographic locations
- DATE: Dates and times
- SKILL: Technical skills and capabilities
- PROJECT: Project names
Connections between entities:
- "John" works at "Acme Corp"
- "Acme Corp" located in "San Francisco"
- "Project X" uses "Python"
Starting from a query, the system can:
- Find relevant memories
- Extract entities from those memories
- Find other memories linked to those entities
- Repeat for N hops
This enables questions like "Who knows someone who works at Acme?" to be answered by traversing the knowledge graph.
- AI Second Brain: Personal knowledge management for AI assistants
- Project Context Memory: Per-project isolated memory for development tools
- Customer Support: Historical context for support conversations
- Research Assistants: Persistent knowledge across research sessions