Experimental. Cognee-RS is a Rust port of the Python
cognee SDK, built
for on-device AI memory (phone, smartwatch, embedded) and aiming for behavioral
parity with Python cognee. The source lives at
github.com/topoteretes/cognee-rs.
There is no pip install / hosted step — you build the CLI from source with Cargo.remember, recall, improve, forget — composing the
add → cognify → search pipeline. The fastest way in is the cognee-cli binary.
Prerequisites
- A Rust toolchain (edition 2024, MSRV 1.91) — install via rustup.
- An OpenAI-compatible LLM API key. The CLI hard-fails at startup if no LLM key is configured. A local endpoint (e.g. Ollama) works too — you still pass a dummy key.
Build the CLI
Configure the LLM
A.env file in the working directory is auto-loaded. The only required setting
is the LLM API key:
Embeddings need a key by default too. On desktop/server the default
embedding provider is OpenAI (
text-embedding-3-small), reusing
LLM_API_KEY / LLM_ENDPOINT — so setting LLM_API_KEY alone is enough for
the full pipeline. To run embeddings fully local, set EMBEDDING_PROVIDER=onnx
(or ollama).Fully local with Ollama
Fully local with Ollama
Your first memory
rememberingests the data, builds the knowledge graph, and runs a self-improvement pass (disable with--no-improve).recallauto-routes the search type for you when--query-typeis omitted.
On desktop/server, the default vector index is LanceDB and persistent.
The pure-Rust brute-force vector index is in-memory and selected on Android,
or when you set
VECTOR_DB_URL=:memory:. For Postgres-backed vectors, build
with the pgvector feature and point VECTOR_DB_PROVIDER=pgvector at a
Postgres instance.Lower-level pipeline
remember / recall wrap the explicit stages, which exist as separate
subcommands for fine-grained control:
cognee-cli <command> --help for the full flag list.
Language bindings
The ergonomicCognee class — new(settings) → warm() → add() /
cognify() / search() / remember() — is exposed by the bindings, which keep
the component graph alive across calls in one process:
- Python (PyO3):
from cognee_py import Cognee - JavaScript/TypeScript (Neon):
import { Cognee } from '@cognee/cognee-ts' - C (FFI):
#include "cognee_sdk.h"
Next Steps
Cognee-RS on GitHub
Full README, architecture docs, and the crate-by-crate workspace breakdown.
Python Quickstart
The same remember / recall loop in the Python SDK.