AI agent memory system — sub-millisecond hybrid search (FAISS + FTS5 + RRF), knowledge graph, temporal awareness, LLM-powered extraction, entity resolution, conversation memory. Zero infrastructure. OpenAI/Anthropic/Ollama support.
Project description
Ariadne
Memory for AI agents. Sub-millisecond search. Zero infrastructure.
⚠️ v0.8.0 — Production-ready release with conversation summarization, auto-management, YAML/TOML config, and database backups. See CHANGELOG for details.
Quick Start
from arriadne import AriadneMemory
mem = AriadneMemory(db_path="memory.db")
# Auto-detects ONNX embeddings — zero config
mem.remember("VPS has 4 cores, 8GB RAM", importance=0.8)
results = mem.recall("server specs", k=5)
pip install arriadne
Why
|| | Ariadne | Mem0 | ChromaDB | sqlite-vec | ||---|:---:|:---:|:---:|:---:| || Vector search | 0.03ms | 12ms | 2.39ms | 0.99ms | || Hybrid search (FTS + vector) | ✅ RRF | ❌ | ❌ | ❌ | || Knowledge graph | ✅ BFS | ❌ | ❌ | ❌ | || Auto-embeddings | ✅ ONNX (local) | ✅ cloud | ❌ | ❌ | || Auto-dedup | ✅ MinHash LSH | ❌ | ❌ | ❌ | || Temporal facts | ✅ | ❌ | ❌ | ❌ | || Memory lifecycle | ✅ Ebbinghaus | ❌ | ❌ | ❌ | || LLM extraction | ✅ 12 providers + callable | ✅ | ❌ | ❌ | || Host agent passthrough | ✅ no API key needed | ❌ | ❌ | ❌ | || Entity resolution | ✅ | ✅ | ❌ | ❌ | || Conversation summarization | ✅ new | ❌ | ❌ | ❌ | || Auto-management | ✅ new | ❌ | ❌ | ❌ | || YAML/TOML config | ✅ new | ❌ | ❌ | ❌ | || Database backup API | ✅ new | ❌ | ❌ | ❌ | || NLI contradiction detection | ✅ | ❌ | ❌ | ❌ | || Community detection | ✅ | ❌ | ❌ | ❌ | || Runs locally | ✅ | ⚠️ | ✅ | ✅ | || No daemon | ✅ | ❌ (PG+Qdrant) | ✅ | ✅ | || REST API | ✅ | ✅ | ❌ | ❌ | || LangChain / LlamaIndex | ✅ | ✅ | ✅ | ❌ |
Features
Sub-Millisecond Vector Search
FAISS-powered. 80× faster than ChromaDB, 33× faster than sqlite-vec. Auto-upgrades from exact to approximate search as your data grows.
| Engine | Latency |
|---|---|
| FAISS (Ariadne) | 0.03ms |
| sqlite-vec | 0.99ms |
| ChromaDB | 2.39ms |
Hybrid Retrieval
Vector similarity + BM25 keywords fused with Reciprocal Rank Fusion. Cached query embeddings for repeated lookups.
results = mem.recall("how to deploy to production", k=5)
# Searches both keyword and semantic similarity, fuses with RRF
for r in results:
print(f"[{r['search_type']}] {r['content'][:80]}")
Zero-Config Embeddings
Auto-downloads a quantized ONNX model on first use (~90MB). No API keys, no cloud, works offline. LRU-cached for repeated queries.
# Just works — no embedding_provider parameter needed
mem = AriadneMemory("memory.db")
mem.remember("Paris is the capital of France") # auto-embedded
Falls back to keyword matching if ONNX is unavailable.
Agent-First Architecture
Ariadne is a memory layer for AI agents that already have an LLM. No separate API key needed — it uses the agent's own model for extraction.
# Option 1: Pass the agent's LLM directly
ariadne = AriadneMemory(llm_config={
"provider": "callable",
"callable": agent.complete, # your agent's own LLM function
})
# Option 2: Auto-detect from Hermes config
# (reads ~/.hermes/config.yaml + .env automatically)
ariadne = AriadneMemory(llm_config={"provider": "openai", ...})
# Option 3: Standalone with any provider
ariadne = AriadneMemory(llm_config={
"provider": "openai",
"model": "gpt-4o-mini",
"api_key": "sk-...",
})
Knowledge Graph
BFS graph traversal with typed, weighted edges. Bidirectional — edges are traversed in both directions.
mem.add_edge("Paris", "France", "located_in")
mem.add_edge("Nginx", "VPS", "runs_on")
g = mem.graph("VPS", hops=2)
# Returns: VPS ↔ Nginx, VPS ↔ France (via Paris)
Auto-Deduplication
MinHash LSH near-duplicate detection. Catches paraphrases, not just exact matches.
mem.remember("The server runs Ubuntu 24.04")
mem.remember("Ubuntu 24.04 is running on the server")
# Second store detects near-duplicate (LSH similarity > threshold)
Temporal Facts
Track when facts become valid, invalid, or expired. Query what was true at a given time.
mem.add_temporal_fact(
text="User prefers dark mode",
subject="User", predicate="prefers", obj="dark_mode",
)
mem.query_temporal(subject="User") # all temporal facts about User
Memory Lifecycle
Ebbinghaus forgetting curve + priority-based eviction. Memories that matter survive; noise gets cleaned up.
mem.consolidate() # merge similar memories
mem.evict() # remove low-priority noise
mem.run_lifecycle() # tier promotion/demotion (hot → warm → cold)
Agent Tools
OpenAI function-calling compatible tool definitions for any LLM. 26 tools for full memory management.
tools = AriadneMemory.get_tools()
# remember, recall, graph, link, forget, stats, temporal, entities, ...
Import / Export
Migrate from other systems or export your data.
mem.import_from_text("plain text document")
mem.import_from_markdown("notes.md")
data = mem.export_json() # full export to dict
Conversation Summarization
Compress long conversations into structured, memory-ready summaries. Unlike extraction (which pulls individual facts), this captures the conversation's arc, decisions, and key context.
summary = mem.summarize_conversation(messages, level="detailed")
# Returns: title, summary, topics, decisions, action_items, facts, outcome
# Auto-store as a memory
mem.summarize_conversation(messages, auto_store=True)
Auto-Management
Background thread runs lifecycle and consolidation automatically. No cron jobs needed.
# Auto-management starts by default (configurable)
mem = AriadneMemory(
"memory.db",
auto_lifecycle_interval=3600, # Run lifecycle every hour
auto_consolidate_threshold=10000, # Consolidate at 10K memories
)
YAML/TOML Configuration
# Load from file
config = AriadneConfig.from_file("ariadne.yaml")
mem = AriadneMemory(config=config)
# Environment variable overrides
# ARIADNE_DB_PATH=/data/memory.db ariadne serve
config = AriadneConfig.from_env()
# Export config
config.to_file("ariadne.toml")
Database Backup API
# Create backup via API
curl -X POST http://localhost:8899/backup
# List backups
curl http://localhost:8899/backup/list
CLI Commands
ariadne init # Initialize database
ariadne add "memory content" # Add a memory
ariadne search "query" # Search memories
ariadne consolidate # Merge duplicates
ariadne lifecycle # Run tier management
ariadne entities # List knowledge graph entities
ariadne stats # Show statistics
ariadne serve # Start REST API server
Benchmark
Measured on a 4-core 8GB VPS with 1K memories and ONNX embeddings (all-MiniLM-L6-v2, 384-dim):
| Operation | Latency |
|---|---|
| Vector search (FAISS) | 0.03ms |
| FTS search (BM25) | 0.6ms |
| Hybrid search (RRF) | 1.78ms (cached) |
| Graph traversal (2 hops) | 0.09ms |
| Single insert | 0.5ms |
| Batch insert (1K) | 0.1ms/mem |
| ONNX embed (cached) | <0.01ms |
| ONNX embed (cold) | 27ms |
Install
pip install arriadne
Optional extras:
pip install "arriadne[llm]" # LLM extraction (OpenAI, Anthropic, Ollama, etc.)
pip install "arriadne[server]" # REST API server
pip install "arriadne[yaml]" # YAML config file support
pip install "arriadne[entities]" # spaCy NER for entity resolution
pip install "arriadne[all]" # Everything
pip install "arriadne[dev]" # Development tools
Requirements: Python 3.10+, SQLite (built-in). ONNX model auto-downloads on first use.
Hermes Integration
Ariadne is the default memory provider for Hermes Agent. It auto-detects Hermes's LLM and uses it for extraction — zero configuration.
hermes plugin install arriadne
hermes config set memory.provider ariadne
That's it. For the full setup guide — including config options, migration from Mnemosyne, and troubleshooting — see the Hermes Integration Guide.
Links
- Docs: ariadne.mantes.net
- PyPI: pypi.org/project/arriadne
- GitHub: github.com/kyssta-exe/Ariadne
- Changelog: CHANGELOG.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arriadne-0.9.0.tar.gz.
File metadata
- Download URL: arriadne-0.9.0.tar.gz
- Upload date:
- Size: 478.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7925b8afdd0987dfcc3bef48d08b73114fa488fb7adb22ccb70d54c0f9399fe0
|
|
| MD5 |
e5b7d7b33826d5aaa501f20193df973c
|
|
| BLAKE2b-256 |
40cc0195de31ffc266f41136ebe5b78a48547858e522e0f3fd8ebe74a4f85b21
|
File details
Details for the file arriadne-0.9.0-py3-none-any.whl.
File metadata
- Download URL: arriadne-0.9.0-py3-none-any.whl
- Upload date:
- Size: 231.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aba02452ee4dec8245a0c8b00928c86b964caa16a3902acca6749c5a44692d3
|
|
| MD5 |
62e64957539dbd0f22738cde83460c10
|
|
| BLAKE2b-256 |
109bb5530ba2e103762e6a9952229423265828d65e053457ac4aa625c25b7933
|