Skip to main content
cognee-rust is built on trait abstractions so each storage/compute backend can be swapped via configuration. Pick providers with the env vars / config keys in configuration.md; the trait + adapter detail is in rustdoc (cargo doc -p <crate> --no-deps --open).
ConcernTrait (crate)ProvidersSelected by
LLMLlm (cognee-llm)OpenAIAdapter (OpenAI/Ollama/vLLM/llama.cpp), MockLlm (testing)LLM_PROVIDER, LLM_MODEL, LLM_ENDPOINT
EmbeddingsEmbeddingEngine (cognee-embedding)OnnxEmbeddingEngine (local BGE-Small), OpenAICompatibleEmbeddingEngine, OllamaEmbeddingEngine, MockEmbeddingEngineEMBEDDING_PROVIDER (+ MOCK_EMBEDDING)
Vector DBVectorDB (cognee-vector)BruteForceVectorDB (in-memory, default), PgVectorAdapter (feature pgvector), MockVectorDB (testing)VECTOR_DB_PROVIDER (brute-force/pgvector)
Graph DBGraphDBTrait (cognee-graph)LadybugAdapter (embedded), PgGraphAdapter (feature postgres)GRAPH_DATABASE_PROVIDER (ladybug/kuzu/postgres)
Relational DBIngestDb/SearchHistoryDb/DeleteDb (cognee-database)DatabaseConnection — SQLite / Postgres via SeaORMDB_PROVIDER, DATABASE_URL
File storageStorageTrait (cognee-storage)LocalStorage (file://), MockStorageSTORAGE_BACKEND
Session storeSessionStore (cognee-session)FsSessionStore, RedisSessionStore, SeaOrmSessionStoreCOGNEE_SESSION_STORE (server)
OntologyOntologyResolver (cognee-ontology)RdfLibOntologyResolver, NoOpOntologyResolverONTOLOGY_RESOLVER
Tokenizer (chunking)TokenCounter (cognee-chunking)WordCounter, HuggingFaceTokenCounter (feature), TikTokenCounter (feature)COGNEE_TOKEN_COUNTER
Notes:
  • Embedded by default. A plain build runs entirely locally: in-memory brute-force vector index, embedded Ladybug (graph), SQLite (relational), local file storage. No native vector-store dependencies are required.
  • Feature gates. pgvector, pggraph/postgres, and the hf-tokenizer/tiktoken counters are cargo features, on by default in cognee-lib/cognee-cli — see architecture.md §feature strategy.
  • Closed-source companions. Embedded Qdrant (cognee-vector-qdrant) and on-device LiteRT inference (cognee-llm-litert, Android) live in the closed cognee-cloud-rs repository and are not part of OSS.
  • Full Postgres stack (relational + graph + vector on one Postgres) is the one remaining adapter milestone — see roadmap/.
MockEmbeddingEngine, MockGraphDB, MockVectorDB, and MockStorage (the testing feature) back the test suite — see test patterns.