You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your AI agents forget everything. Give any LLM agent a memory that survives restarts, cloud outages, and API bills. No cloud. No Python. No embeddings API. Still GraphRAG. This 25 MB binary gives them a brain.
Your AI agents forget everything. Give any LLM agent a memory that survives restarts, cloud outages, and API bills. No cloud. No Python. No embeddings API. Still GraphRAG. This 25 MB binary gives them a brain.
Remember a memory with an optional explicit entity graph
sqlite-graphrag remember \
--name integration-tests-postgres \
--type feedback \
--description "prefer real Postgres over SQLite mocks" \
--body "Integration tests must hit a real database."
Database busy after retries (moved from 13 in the legacy line)
20
Internal or JSON serialization error
75
EX_TEMPFAIL: all concurrency slots busy
77
Available RAM below minimum required to load the embedding model
Performance
Measured on a 1000-memory database
In-process warm-model latency remains far lower than one-shot subprocess latency
Stateless CLI invocations typically spend about one second reloading the embedding model per heavy command
Warm in-process recall can stay well below the stateless subprocess timing once the model is already resident
First init downloads the quantized model once and caches it locally
Embedding model uses approximately 1100 MB of RAM per process instance after the v1.0.3 RSS calibration
Safe Parallel Invocation
Counting semaphore with up to four simultaneous slots
Each invocation loads multilingual-e5-small consuming roughly 1100 MB of RAM after the v1.0.3 measurement pass
MAX_CONCURRENT_CLI_INSTANCES remains the hard ceiling at 4 cooperating subprocesses
Heavy commands init, remember, recall, and hybrid-search are clamped lower dynamically when available RAM cannot sustain the requested parallelism safely
Lock files live at ~/.cache/sqlite-graphrag/cli-slot-{1..4}.lock using flock
A fifth concurrent invocation waits up to 300 seconds then exits with code 75
Use --max-concurrency N to request the slot limit for the current invocation; heavy commands may still be reduced automatically
Memory guard aborts with exit 77 when less than 2 GB of RAM is available
SIGINT and SIGTERM trigger graceful shutdown via shutdown_requested() atomic
Troubleshooting FAQ
Common issues and fixes
Default behavior always creates or opens graphrag.sqlite in the current working directory
Database locked after crash requires sqlite-graphrag vacuum to checkpoint the WAL
First init takes roughly one minute while fastembed downloads the quantized model
Permission denied on Linux means the cache directory lacks write access for your user
Namespace detection falls back to global when no explicit override is present
Parallel invocations that exceed the effective safe limit receive exit 75 and SHOULD retry with backoff; during audits start heavy commands with --max-concurrency 1
Compatible Rust Crates
Invoke sqlite-graphrag from any Rust AI framework via subprocess
Each crate calls the binary through std::process::Command with --json flag
No shared memory or FFI required: the contract is pure stdout JSON
Pin the binary version in your Cargo.toml workspace for reproducible builds
All 18 crates below work identically on Linux, macOS and Windows
rig-core
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","project goals","--k","5","--json"]).output().unwrap();
swarms-rs
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["hybrid-search","agent memory","--k","10","--json"]).output().unwrap();
autoagents
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["remember","--name","task-context","--type","project","--description","current sprint goal","--body","finish auth module"]).output().unwrap();
graphbit
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","decision log","--k","3","--json"]).output().unwrap();
agentai
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["hybrid-search","previous decisions","--k","5","--json"]).output().unwrap();
llm-agent-runtime
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","user preferences","--k","5","--json"]).output().unwrap();
anda
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["stats","--json"]).output().unwrap();
adk-rust
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","tool outputs","--k","5","--json"]).output().unwrap();
rs-graph-llm
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["hybrid-search","graph relations","--k","10","--json"]).output().unwrap();
genai
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","model context","--k","5","--json"]).output().unwrap();
liter-llm
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["remember","--name","session-notes","--type","user","--description","session recap","--body","discussed architecture"]).output().unwrap();
llm-cascade
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","fallback context","--k","3","--json"]).output().unwrap();
async-openai
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","system prompt history","--k","5","--json"]).output().unwrap();
async-llm
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["hybrid-search","chat context","--k","5","--json"]).output().unwrap();
anthropic-sdk
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","tool use patterns","--k","5","--json"]).output().unwrap();
ollama-rs
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","local model outputs","--k","5","--json"]).output().unwrap();
mistral-rs
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["hybrid-search","inference context","--k","10","--json"]).output().unwrap();
llama-cpp-rs
use std::process::Command;let out = Command::new("sqlite-graphrag").args(["recall","llama session context","--k","5","--json"]).output().unwrap();