01 · Session context
Working memory
Rolling events with configurable TTL and per-user caps.- Ephemeral session state
- Automatic pruning
Memory infrastructure for AI
A Rust-backed memory engine for Python AI assistants. Get 1–10 ms in-RAM recall, durable SQL persistence, and zero required services.
One system. Three memory horizons.
Every query stays on the Rust-backed in-memory index. SQL handles durability quietly in the background, while short-term and working memory keep immediate context close.
01 · Session context
02 · Recent context
03 · Durable recall
RustMemoryIndex
Built for the hot path
MemoryCore splits persistence from retrieval. Writes update SQL and the index together. Reads stay in RAM. Store I/O runs in a worker thread, so your async event loop stays responsive.
Typical in-memory recall
Required external services
Structured memory key
Integrated memory layers
Pythonic by design
SQLite ships with Python and the schema creates itself. Bring an embedder—or pass vectors directly—and start remembering.
from memory_core import build_memory_system
system = build_memory_system()
await system.remember(
user_id="alice",
summary="Prefers Python for scripting tasks",
importance=0.8,
tags=["preferences", "programming"],
embedding=my_vector,
)
result = await system.recall(
user_id="alice",
query_text="programming languages",
query_embedding=query_vector,
limit=5,
)
Implement one async protocol and use raw text everywhere. MemoryCore handles vector generation at the boundary.
The optional SMK assistant index packs topic, kind, tools, difficulty, generality, and importance into a 64-bit key.
Start locally with SQLite. Point one URL at PostgreSQL when the application grows—without changing the memory API.
Give your assistant continuity
Open source, MIT licensed, and designed for the Python applications you already build.