System Overview
Components
API Server
FastAPI backend providing REST endpoints for episode management, search, entity operations, and configuration.
Python SDK
Client library for Python applications. Includes Google ADK integration for automatic tool tracking.
MCP Server
TypeScript server implementing Model Context Protocol for Claude Desktop, Cursor, and other MCP-compatible agents.
Dashboard
Next.js web UI for graph visualization, entity browsing, and memory analytics.
Data Flow: Ingestion
When you add an episode:- Episodes are deduplicated using both semantic similarity and BM25 keyword matching
- Entity extraction is optional and configurable per-user
- Entities are deduplicated by name similarity (threshold: 0.65)
- Relationships link entities with bi-temporal metadata
Data Flow: Search
When you search memory:- Semantic: Embedding cosine similarity on content
- BM25: Traditional keyword/lexical matching
- Traversal: Follow entity relationships in the graph
- Hybrid: Combines all three (recommended)
Data Model
Ryumem stores knowledge as a graph:uuid,content,source,kindcreated_at,valid_at,content_embedding
uuid,name,entity_type,summary
name,fact,fact_embeddingcreated_at,valid_at,invalid_at,expired_at
Bi-Temporal Tracking
Relationships track two dimensions of time:- System time: When the fact was recorded (
created_at) - Business time: When the fact was/is true (
valid_at,invalid_at)
expired_at but preserved for history.