How gibsonai/memori works
Memori is a persistent-memory SDK and agent integration suite. In the principal workflow, an application’s LLM interaction is captured and attributed, augmented into structured memories, and persisted; later requests retrieve relevant memories for recall or prompt injection. The Python and TypeScript packages expose parallel SDK surfaces, with the TypeScript native engine delegating storage operations through its storage manager. README capabilities also include explicit agent recall, OpenClaw and Hermes integrations, MCP access, and BYODB. Some integration wiring is documented rather than sampled, so those relationships are shown only at the documented boundary.
Main entry points: agent.py Python SDK · recall.py Recall and search · clients LLM adapters · _manager.py Memory augmentation
Components 23
SDK workflows
- Python SDK
memori/agent.py - TypeScript SDK
memori-ts/src/memori.ts - LLM adapters
memori/llm/clients
Memory processing
- Conversation capture
memori/memory/_manager.py - Memory augmentation
memori/memory/augmentation/_manager.py - Recall and search
memori/memory/recall.py - Embeddings
memori/embeddings - Fact ranking
memori/search/_api.py
Persistence
- Python storage
memori/storage/_manager.py - TS storage manager
memori-ts/src/storage/manager.ts - Rust storage manager
core/src/storage/manager.rs
Agent integrations
- OpenClaw plugin
integrations/openclaw/src/index.ts - Hermes provider
integrations/hermes/src/memori_hermes/tools.py - Claude Code MCP
integrations/claude-code/index.ts
Native platform
- Rust memory engine
core/src/lib.rs - TS engine bridge
memori-ts/src/core/engine.ts - Node binding
core/bindings/node/src/engine.rs - Python binding
core/bindings/python/src/lib.rs
Other components
- Agent application
- LLM provider
- Configured datastore
- Memori Cloud API
- Agent clients
Connections 26
- Agent application → Python SDK: uses
- Agent application → TypeScript SDK: uses
- LLM adapters → LLM provider: calls
- Agent application → LLM adapters: registers
- LLM adapters → Conversation capture: captures turns
- Conversation capture → Memory augmentation: schedules
- Memory augmentation → Embeddings: embeds facts
- Memory augmentation → Python storage: enqueues writes
- Python SDK → Conversation capture: manages memory
- Python SDK → Recall and search: requests recall
- Recall and search → Embeddings: embeds query
- Recall and search → Fact ranking: ranks candidates
- Recall and search → Python storage: fetches facts
- TypeScript SDK → TS engine bridge: invokes
- TS engine bridge → Node binding: calls native
- Node binding → Rust memory engine: delegates
- Rust memory engine → Rust storage manager: retrieves and writes
- TS engine bridge → TS storage manager: services storage calls
- TS storage manager → Configured datastore: reads and writes
- Python storage → Configured datastore: reads and writes
- Rust storage manager → Configured datastore: uses host bridge
- Python SDK → Memori Cloud API: sends memory
- OpenClaw plugin → TypeScript SDK: uses SDK
- Hermes provider → Agent clients: offers recall tools
- Agent clients → Hermes provider: requests recall
- Claude Code MCP → Agent clients: connects via MCP