Skip to main content

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.

PyPI Python 3.10+ Tests License: MIT


⚠️ Public Testing Phase — Ariadne works and the benchmarks are real, but it hasn't been battle-tested in production at scale by a wide community. If you're running serious business-critical systems, you might want to wait. Giving it a try though? The numbers speak for themselves. We'd love your feedback.


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
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

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[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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arriadne-0.8.0.tar.gz (400.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arriadne-0.8.0-py3-none-any.whl (151.3 kB view details)

Uploaded Python 3

File details

Details for the file arriadne-0.8.0.tar.gz.

File metadata

  • Download URL: arriadne-0.8.0.tar.gz
  • Upload date:
  • Size: 400.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arriadne-0.8.0.tar.gz
Algorithm Hash digest
SHA256 be0194d17ff0a7a035fa0dd2ce2645dcccd93b02c723bbbe254610d731bef4f2
MD5 a7a78e13aeb7aca81afc85fad43c065d
BLAKE2b-256 f25ea1bfae7d96c3d4e99b16a16346713b3ce9f544d37b46fe044f3259b63fed

See more details on using hashes here.

File details

Details for the file arriadne-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: arriadne-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 151.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arriadne-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc6e00b30155f85f2c8e5182a05e34e225ee20ccbbba1c177c72bcbd023fa68
MD5 33bdb46b2d18223787d976f38316600f
BLAKE2b-256 e4f2e089ece4aa3948354d9fa2995788ef07530a94d7d088e57952c0058fe26d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page