ambi-memory
Pluggable three-dimensional memory extension for the Ambi AI agent framework.
Dimensions
| Provider | Description |
|---|---|
| KV (Key-Value) | Exact state storage for reflexion diaries, user settings, and state machine flags. |
| Semantic (Vector) | Long-term conversational recall via embedding + vector search (e.g. OpenAI + Milvus/Qdrant). |
| Summary (Rolling) | Anti-amnesia on context eviction — automatically compresses dropped messages into a persistent summary. |
Usage
[]
= "0.1"
use ;
KV Memory
let kv = new;
let mut state = new;
// Store
state.remember_kv.await?;
// Recall into dynamic context
state.recall_kv_into_context.await?;
Summary Memory (auto-compression on eviction)
let summary_provider = new;
let mut state = new;
// Inject past summary into context
state.inject_summary_context.await?;
// Compress evicted messages (call inside on_evict handler)
state.summarize_evicted_messages.await?;
Semantic Memory
// Use with any backend implementing SemanticMemoryProvider
async
Feature Flags
All providers are trait-only — the crate ships in-memory implementations for testing and single-node deployments. Swap the backend by implementing the corresponding trait against your database (Milvus, Redis, PostgreSQL, etc.).
License
Apache-2.0