AutoMem Documentation
repository·main·Indexed 21 days ago
https://github.com/verygoodplugins/automemA long-term memory service for AI assistants utilizing a hybrid Graph (FalkorDB) and Vector (Qdrant) approach to store typed relationships and embeddings. It features a dual storage architecture for complex reasoning and multi-hop bridge discovery, neuroscience-inspired memory consolidation cycles, and an MCP SSE Server for bridging the HTTP API to the Model Context Protocol. Supports integrations with Claude, ChatGPT, and Alexa.
What's inside AutoMem
- AutoMem is a long-term memory service for AI assistants that combines graph and vector storage. Unlike standard RAG or vector databases that rely on keyword or semantic similarity alone, AutoMem stores typed relationships between memories. This allows for 'multi-hop bridge discovery,' where the system can recall the reasoning or principles connecting disparate facts (e.g., connecting a specific technology choice to a broader team preference).
Understand the Neutral Agent Memory Benchmark (AMB) results
mainThe Neutral Agent Memory Benchmark (AMB) is used to evaluate AutoMem's performance across different memory scales and question types. The benchmark tracks two primary metrics:
- Accuracy: The percentage of questions answered correctly.
- Recall@5: The percentage of questions where the correct answer session was retrieved within the top 5 retrieved results.
Key benchmark suites include:
- LongMemEval full: 500 questions, testing various session types (knowledge-update, multi-session, etc.).
- LongMemEval mini: 30 stratified questions used as a canary.
- LoCoMo full: 10 conversations containing 1986 questions.
Note: For the most recent and authoritative performance claims, refer to the Neutral Agent Memory Benchmark (AMB) section in the documentation rather than the internal-harness engineering baselines.
What is the Remote MCP Bridge and when to use it?
mainThe Remote MCP server exposes AutoMem over HTTPS, allowing cloud-based AI platforms (like ChatGPT, Claude.ai, and ElevenLabs) to access your memories without a local installation.
When to use it:
- Cloud AI Platforms: Required for ChatGPT, Claude.ai, Claude Mobile, and ElevenLabs Agents because they cannot connect to local MCP servers.
- Claude Desktop: Recommended if you want a shared memory connection that syncs across Claude Desktop, Claude.ai, and iOS.
When NOT to use it:
- Cursor IDE or Claude Code: You should use the local
@verygoodplugins/mcp-automempackage instead of the remote bridge.
Compare 768d and 3072d embeddings
mainWhen configuring AutoMem, choose your embedding dimension based on your deployment requirements:
Use 768d (
text-embedding-3-small) if:- You are cost-conscious.
- Storage is limited.
- Speed is more important than slight accuracy gains.
- You are using the system for personal or development purposes.
- Your dataset is small (<100k memories).
Use 3072d (
text-embedding-3-large) if:- You are in a production deployment.
- Accuracy is critical.
- You require complex multi-hop reasoning.
- You have a large dataset that benefits from higher precision.
- Storage and compute costs are acceptable for your use case.
Understand AutoMem script lifecycles
mainAutoMem scripts are categorized by lifecycle tags, which indicate when and how they should be used. Understanding these tags is critical to avoid accidental data modification or running inappropriate tools in production:
routine: Safe for normal, repeated operations (e.g., backups, monitoring).one-time: Idempotent scripts intended for single runs during upgrades or migrations. Seedocs/MIGRATIONS.md.recovery: "Break-glass" tools used only after data loss or corruption. Seedocs/MONITORING_AND_BACKUPS.md.dev: Helpers for local development or deployment.bench/lab: Evaluation and tuning harnesses for contributors; not required for standard AutoMem operation.
Understand the difference between Internal and Neutral (AMB) benchmarks
mainAutoMem uses two distinct benchmarking methodologies. It is critical to distinguish between them when evaluating performance:
- Internal Harness (LoCoMo / LongMemEval): These are engineering baselines created using Voyage 4 embeddings (
EMBEDDING_PROVIDER=voyage,VECTOR_SIZE=1024). They are used for internal development and tracking recall quality changes. - Neutral Agent Memory Benchmark (AMB): This is a third-party, neutral harness provided by
vectorize-io. This is the authoritative source for outbound/release claims.
AMB Configuration (Regime Stamp): When citing AMB results, always include the following configuration context:
- Harness: AMB neutral harness
- Answerer: Gemini (
gemini-3.1-pro-preview) - Judge: Gemini (
gemini-2.5-flash-lite) - Mode: Single-query / RAG mode
- Provider Stack: Self-spinning Docker (FalkorDB + Qdrant)
- Embeddings: FastEmbed-local
bge-base-en-v1.5(768d) - Settings:
ENRICHMENT_ENABLED=false, no embedding API keys required. - Run Name:
automem-sub
- Internal Harness (LoCoMo / LongMemEval): These are engineering baselines created using Voyage 4 embeddings (
Analyze LoCoMo-mini category performance
mainThe LoCoMo-mini benchmark breaks down performance into several specific categories. Understanding these helps identify if regressions are specific to certain memory patterns:
- Single-hop: Basic retrieval.
- Temporal: Reasoning involving dates and time-based context.
- Multi-hop: Connecting multiple pieces of information.
- Open Domain: General knowledge retrieval.
- Complex (Category 5): High-level reasoning (requires an LLM judge).
Note: Temporal scores may appear artificially low if the evaluator is incorrectly comparing question dates to memory dates instead of answer dates. Complex scores may appear as 100% if the dataset lacks an
answerfield, causing the evaluator to match against an empty string.Configure Embedding dimensions and upgrade safety
mainAutoMem handles embedding dimension changes via the
VECTOR_SIZE_AUTODETECTsetting.- Default behavior:
VECTOR_SIZE_AUTODETECT=trueautomatically adopts your existing collection dimension on startup. This allows you to update the system without manual intervention for existing 3072d or 768d collections. - Recommended setup: Use Voyage (
voyage-4) at 1024d. - OpenAI Fallback: If only an OpenAI key is provided,
text-embedding-3-smallis used and truncated to the configuredVECTOR_SIZEvia Matryoshka embeddings.
- Default behavior:
Secure the MCP Bridge and manage authentication
mainThe MCP bridge handles authentication via
Authorization: Bearer,X-API-Key, or the?api_token=query parameter.Important Security Warning: No-token Fallback
By default, if a client sends no token, the bridge falls back to using the bridge service's own
AUTOMEM_API_TOKENenvironment variable. This means ifAUTOMEM_API_TOKENis set, the bridge is reachable by anyone who knows the URL.To require a client token (disable anonymous access):
- Remove
AUTOMEM_API_TOKENfrom themcp-sse-serverservice environment variables. - Note: Removing this will cause the
/healthupstream probe to reportdegraded/upstream: unconfigured. This is cosmetic; liveness will still return200and tokened MCP calls will function correctly.
Best Practices
- Avoid URL tokens in logs: Using
?api_token=may cause tokens to be logged by proxies. Use header-based authentication for better security. - Token Rotation: Periodically rotate the
AUTOMEM_API_TOKENvia your deployment dashboard (e.g., Railway). - Rate Limiting: For production environments, consider placing a reverse proxy with rate limiting in front of the bridge.
- Remove
How AutoMem's dual storage architecture works
mainAutoMem uses two storage layers to provide hybrid recall:
- FalkorDB (Graph Database): Acts as the canonical record. It stores memories as nodes connected by 11 authorable relationship types. If FalkorDB is unavailable, the API returns a
503error. - Qdrant (Vector Database): Stores embeddings for every memory. It enables semantic search and hybrid queries (semantic similarity, graph traversal, temporal alignment, tag overlap, and importance).
If Qdrant is unavailable, the system can still serve recall in a degraded mode using only the graph. Recall is ranked by a 9-component score combining these layers.
- FalkorDB (Graph Database): Acts as the canonical record. It stores memories as nodes connected by 11 authorable relationship types. If FalkorDB is unavailable, the API returns a
Recommended backup and monitoring schedules
mainDepending on your use case, use the following schedules for health checks and backups:
Use Case Health Check Frequency Backup Frequency Retention Policy Personal Every 5 mins (alert-only) Every 24 hours 7 days, manual recovery Team Every 2 mins (auto-recovery) Every 6 hours 14 days + S3, auto-recovery Production Every 30 seconds (auto-recovery) Every 1 hour 30 days + S3 + cross-region, auto-recovery Metadata enrichment and consolidation behavior
mainAutoMem performs background processes that modify the metadata object:
- Enrichment: Async and just-in-time enrichment processes parse existing metadata and merge generated entity data into
metadata.entities. It also writes operational details undermetadata.enrichment. - Consolidation:
- Creative consolidation adds graph relationships.
- Identity consolidation deduplicates Entity nodes and can synthesize entity identity summaries.
- Cluster consolidation may create
MetaMemorynodes andSUMMARIZESrelationships.
Note: Current consolidation does not merge two ordinary memory records into one. If future updates introduce memory merging, provenance fields like
source_agentsare intended to be merged rather than overwritten.- Enrichment: Async and just-in-time enrichment processes parse existing metadata and merge generated entity data into