> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rust SDK Architecture

> The single source of truth for the cognee-rust workspace layout, crate breakdown, cross-cutting design patterns, and key dependencies.

cognee-rust is a Rust port of the Python [cognee](https://github.com/topoteretes/cognee)
library — an AI memory pipeline that turns raw data into persistent, queryable
knowledge graphs. It targets both edge devices (Android, embedded) with local
models and drop-in parity with the Python `cognee` SDK (90%+ correctness).

**Core pipeline:** `add (ingest)` → `cognify (knowledge-graph extraction)` →
`search (context retrieval)`. See [Operations](https://docs.cognee.ai/rust/core-concepts/main-operations/overview.md) for what each
operation does and [Configuration](https://docs.cognee.ai/rust/configuration.md) for how to configure them.

This page is the single source of truth for the workspace layout, the crate
breakdown, and the cross-cutting design patterns. `.claude/CLAUDE.md` and the
root `README.md` link here rather than duplicating it.

## Workspace structure

```
cognee-rs/
├── Cargo.toml                  # Workspace root (edition 2024, resolver 3)
├── crates/
│   ├── models/                 # Core data types: Data, Dataset, DataInput, Document, DocumentChunk
│   ├── storage/                # File storage abstraction (StorageTrait, LocalStorage)
│   ├── database/               # Relational DB abstraction (RelationalDb and its domain traits)
│   ├── ingestion/              # Ingest pipeline + content hashing + URL crawler
│   ├── chunking/               # Text chunking (word→sentence→paragraph→TextChunker)
│   ├── cognify/                # Full cognify pipeline + improve-stage building blocks
│   ├── search/                 # Search pipeline with multiple retrieval strategies
│   ├── session/                # Session management and session store
│   ├── embedding/              # Multi-provider embedding engine (ONNX, OpenAI, Ollama, Bedrock, Mock)
│   ├── llm/                    # LLM provider abstraction (OpenAI-compatible, Anthropic, Bedrock adapters)
│   ├── graph/                  # Graph DB abstraction (Ladybug embedded graph)
│   ├── vector/                 # Vector DB abstraction (LanceDB default; brute-force on Android; pgvector feature-gated)
│   ├── ontology/               # Ontology resolution (RDF/JSON-LD loader, NoOp resolver)
│   ├── delete/                 # Dataset/data deletion across all backends
│   ├── core/                   # Task pipeline orchestration framework
│   ├── components/             # Shared backend construction (ComponentRegistry + adapter factories)
│   ├── visualization/          # Single-file multi-tab HTML knowledge-graph visualization (d3.js)
│   ├── migration/              # COGX export — portable archives importable by Python cognee
│   ├── observability/          # OpenTelemetry tracing pipeline (OTLP exporter, telemetry feature)
│   ├── telemetry/              # Product-analytics client (send_telemetry → prometh.ai, opt-out)
│   ├── logging/                # Shared file logging (rotation, Python-compatible plain formatter)
│   ├── lib/                    # Top-level library `cognee` aggregating all crates (public api/ module)
│   ├── cognee-lib/             # Deprecated re-export shim keeping the old `cognee-lib` crate name
│   ├── bindings-common/        # Shared SDK facade for the JS, C-API, Python and Java bindings
│   ├── cli/                    # CLI binary (cognee-cli)
│   ├── utils/                  # Shared utilities
│   ├── config-core/            # Configuration boundary: EnvSource, ProcessEnv, MapEnv (the only env access)
│   ├── truth-subspace/         # Truth-subspace alignment math + centroid persistence
│   └── test-utils/             # Mock implementations (MockStorage, MockGraphDB, MockVectorDB)
├── capi/                       # C API bindings (FFI)
├── ts/                         # JavaScript/TypeScript/Node bindings (Neon)
├── python/                     # Python bindings (PyO3)
├── java/                       # Java/JVM bindings (JNI via the jni crate)
├── examples/                   # Usage examples using the cognee crates
├── demo/                       # Demo scripts (host and Android)
├── scripts/                    # Build, check, and deployment scripts
├── docs/                       # Upstream documentation (source of these pages)
├── e2e-cross-sdk/              # Cross-SDK E2E tests (Rust ↔ Python interop)
└── .github/workflows/          # CI (ci.yml, publish-dry-run.yml, release-open.yml,
                                #      release-verify.yml, release-publish.yml,
                                #      capi-release.yml, ts-prebuild.yml, java-prebuild.yml,
                                #      ios.yml, http-parity.yml, ort-mirror.yml, cassette
                                #      recording and cache/community housekeeping)
```

## Crate breakdown

**cognee-models** — Core data types shared across crates: `Data`, `Dataset`, `DataInput`, `Document`, `DocumentChunk`, `Entity`, `KnowledgeGraph`, etc. Pure data structures, no traits.

**cognee-storage** — Abstract file storage layer. Trait: `StorageTrait` (+ `StorageExt`, `StorageWriter`). Impls: `LocalStorage`, `MockStorage`.

**cognee-database** — Relational database abstraction. `RelationalDb` is the one object components hold (`Arc<dyn RelationalDb>`): a supertrait of the domain traits `IngestDb`, `DeleteDb`, `SearchHistoryDb`, `DatasetConfigDb`, `SessionLifecycleDb`, `SessionQaDb` (session Q\&A tables) and `ProvenanceDb` (cognify's provenance ledger and run rows), plus the pipeline-run / sync repositories and lifecycle (`ping`, `close`). Callers upcast to the narrow trait they need. Impl: `DatabaseConnection` (SQLite/Postgres via SeaORM); no code outside the crate depends on the concrete type.

**cognee-ingestion** — Pipeline for ingesting data: streams content, computes hashes, deduplicates, and stores. Main type: `AddPipeline`. No trait abstraction — uses `StorageTrait` and `IngestDb` from sibling crates. A fetched HTML page (URL add) is stored raw and read by `text_loader`; `external_metadata` carries `_cognee.source_uri` for file and URL adds. A local `.html` file is still text-extracted at add time (`beautiful_soup_loader`). Files are routed to a loader by their sniffed content type ([`file_type.rs`](https://github.com/topoteretes/cognee-rs/blob/main/crates/ingestion/src/file_type.rs)): the `data` row stores the sniffed `original_extension`/`original_mime_type` (a local `.html` file keeps its path's), non-UTF-8 bytes named `.txt` fail the add, and a file no loader claims fails with `NoLoaderForFile`.

**cognee-chunking** — Text chunking strategies built on a chunking hierarchy (word → sentence → paragraph). Main entry point: `ExtractTextChunksPipeline`. Traits: `Chunker` (pluggable chunking strategy stamping its `chunker_id` on every chunk; impls `TextChunker`, `RecursiveChunker` (class name `LangchainChunker`, a port of langchain's `RecursiveCharacterTextSplitter`), `CsvChunker`, `JsonListChunker`, `TextChunkerWithOverlap`, `FnChunker`; cognify selects one from `CognifyConfig::chunk_strategy` / `custom_chunker`) and `TokenCounter`. Impls: `WordCounter` (whitespace fallback), `HuggingFaceTokenCounter` (BPE/WordPiece, behind `hf-tokenizer`), `TikTokenCounter` (cl100k\_base BPE, behind `tiktoken`). `TokenCounterKind::resolve()` auto-selects the counter from already-resolved settings: `cognify.token_counter`, the HuggingFace tokenizer id, the embedding provider and the ONNX tokenizer path.

**cognee-cognify** — Knowledge-graph extraction pipeline: classify documents, chunk text, extract entities/relationships via LLM, summarize, store to graph and vector DBs. Entry points: `cognify()` / `cognify_datasets()`; main types: `CognifyConfig`, `CognifyInput`, `CognifyResult`, `FactExtractor`, `SummaryExtractor`. Run orchestration's failure policy — which scope a finished run sweeps, which items it marks complete, and what its run record says — lives in the `rollback` module and calls into `cognee-delete`'s `RunSweeper`. Also houses the `memify` sub-module, which now holds only the improve stages (`apply_feedback_weights_pipeline`, `persist_sessions_in_knowledge_graph`, `distill_sessions_in_knowledge_graph`, `build_truth_subspace`); the public memify pipeline and triplet embedding are removed. And the **global\_context\_index** sub-module (`build_global_context_index`, `GlobalContextIndexMethod`): the dataset's `GlobalContextSummary` bucket and root summaries that `improve()` builds and graph and hybrid completion can prepend.

**cognee-search** — Unified search orchestration across multiple retrieval strategies. Main types: `SearchBuilder`, `SearchOrchestrator`. `SearchType` enum defines 17 search modes with corresponding retriever implementations; the default, `HybridCompletion`, blends vector search over chunks/summaries/entities/edge-facts, and 1-hop graph-neighborhood expansion, then answers via LLM completion. `user_preferences` holds the per-user `UserPreference` / `prefers` store improve writes and the read that personalizes graph, RAG, and hybrid retrieval.

**cognee-session** — Session management and QA-history storage, plus the per-session context rows (`SessionContextEntry`, `StateRowWatermark`) the waiting per-session claim `improve()` holds (`acquire_improve_lock_many`), the guidance applier (`apply_candidate_updates`) and the agent-context extraction (`extract_pending_agent_context`), and the visualization's session events (`map_session_entries_to_events`; `collect_session_events` behind the `session-events` feature). Trait: `SessionStore`. Impls: `FsSessionStore`, `RedisSessionStore`, `RelationalSessionStore` (over any `SessionQaDb`; formerly `SeaOrmSessionStore`).

**cognee-embedding** — Text vectorization engine. Trait: `EmbeddingEngine`. Impls: `OnnxEmbeddingEngine` (local ONNX Runtime, BGE-Small-v1.5), `OpenAICompatibleEmbeddingEngine` (OpenAI/Azure/vLLM/llama.cpp/TEI via HTTP), `OllamaEmbeddingEngine`, `BedrockEmbeddingEngine` (AWS Bedrock InvokeModel — Titan + Cohere families, `bedrock` feature), `MockEmbeddingEngine`. `EmbeddingConfig::from_env()` + `create_engine()` factory select the provider. See [Configuration](https://docs.cognee.ai/rust/configuration/llm-and-embedding.md#embedding).

**cognee-llm** — Async LLM abstraction with structured JSON output. Trait: `Llm` (+ auto-implemented `LlmExt`). Impls: `OpenAIAdapter` (OpenAI-compatible APIs, works with Ollama/vLLM/Azure), `AnthropicAdapter` (native Messages API), `BedrockAdapter` (AWS Bedrock Converse, `bedrock` feature), `MockLlm` (cassette-backed, `testing` feature). An on-device LiteRT adapter is not part of OSS.

**cognee-graph** — Graph database abstraction for knowledge-graph storage and traversal. Trait: `GraphDBTrait` (+ `GraphDBTraitExt`), including the batched `get_neighborhood(ids, depth) -> (nodes, edges)` method that expands a set of seed nodes and returns the **true stored edge direction** (unlike `get_connections`, whose Ladybug impl reports the queried node as the source regardless of stored direction — see `crates/graph/src/traits.rs` and the `get_neighborhood_preserves_edge_direction` test in `crates/graph/src/mock.rs`). Impls: `LadybugAdapter` (embedded Ladybug), `PgGraphAdapter` (feature `postgres`), `MockGraphDB`. Concurrency: file-backed Ladybug assumes a single owning process; cross-process locking is intentionally out of scope (see [roadmap/](https://github.com/topoteretes/cognee-rs/blob/main/docs/roadmap/README.md)). `get_neighborhood_scoped(ids, depth, scope)` is the optional narrowing form — property projection and an opt-in per-seed neighbour cap — whose trait default is `get_neighborhood` narrowed client-side by `apply_neighborhood_scope`, so a backend only overrides it to push the narrowing into the query (`PgGraphAdapter` does; see `COGNEE_TRIPLET_NEIGHBOR_CAP` in [Configuration](https://docs.cognee.ai/rust/configuration/search.md#triplet-retriever-hub-cap)). The graph-view reads — `get_top_degree_node_ids(top_k)` (degree seeds), `get_bounded_neighborhood(seeds, depth, max_nodes, property_keys) -> BoundedNeighborhood` (a neighbourhood capped at `max_nodes` under one deterministic round-robin membership rule, with hop distances and chunking) and `get_entity_type_names(entity_ids)` (`is_a` → EntityType name) — have trait defaults (`default_*`, exported) that Ladybug and Postgres override with bounded native reads returning the same result — except `get_top_degree_node_ids`, whose native read ranks a sample of `DEGREE_SEED_EDGE_SAMPLE_ROWS` (200,000) stored edges, so above that many edges its seeds are approximate.

**cognee-vector** — Vector database abstraction for similarity search. Trait: `VectorDB`. Impls: `LanceDbAdapter` (embedded Apache-Arrow / Lance, on-disk; default on non-Android targets), `BruteForceVectorDB` (pure-Rust in-memory; default on Android and via `vector_db_url = ":memory:"`), `PgVectorAdapter` (Postgres + pgvector extension, feature `pgvector`), `MockVectorDB`. An embedded Qdrant adapter is not part of OSS. `begin_bulk_load` / `end_bulk_load` is a nestable, no-op-by-default hint — cognify wraps one pipeline run in a scope — that lets a backend defer per-row ANN index maintenance to one build at the end; a backend that defers must leave the store correct (exact scans) if the scope never closes, and repairable by `create_missing_vector_indexes` (see [Pluggable Backends](https://docs.cognee.ai/rust/tools/backends.md)).

**cognee-ontology** — RDF/OWL ontology integration for entity validation. Trait: `OntologyResolver`. Impls: `RdfLibOntologyResolver`, `NoOpOntologyResolver` (pass-through).

**cognee-delete** — Cascading deletion of data/datasets across all backends (relational → graph → vector → file storage), plus the run-scoped rollback sweep `cognee-cognify` calls when a run fails. Main types: `DeleteService`, `AuthorizedDeleteService`, `RunSweeper`.

**cognee-core** — Async runtime, task scheduling, and pipeline-execution primitives. Traits: `PipelineWatcher`, `ExecStatusManager`. Impls: `NoopWatcher`, `RayonThreadPool`, `NoopExecStatusManager`.

**cognee-components** — Shared backend construction. Owns `ComponentError`, the `BackendBuildContext` (the resolved, env-free input both callers lower their config into), the adapter factory traits (`VectorDbFactory`, `GraphDbFactory`, `LlmFactory`, `EmbeddingFactory`), and the `ComponentRegistry` (provider-id → factory) with `with_builtins()`. Sits below `cognee` (and below any downstream consumer such as an HTTP server); they delegate their backend construction here, so the two paths can't drift. The registry is the explicit-DI extension seam — external adapter crates implement a factory trait and `register_*` it at their binary entry point. See [Operations](https://docs.cognee.ai/rust/core-concepts/main-operations/overview.md).

**cognee-visualization** — Single-file HTML knowledge-graph visualization (d3.js v7) with four tabs — Graph, Schema, Memory, Semantic — plus a node inspector. `preprocessor` derives the whole payload (node/link normalization, stage + `topological_rank` layout, colour maps, memory map, type-schema graph, operation layer); `html` substitutes it into the frontend assets under `assets/`, which are vendored **verbatim** from Python and must never be hand-edited (see `assets/README.md`). Every HTML it produces works with no network: at render time the d3 CDN `<script>` tag is replaced by a bundled d3 v7.9.0 and the Google Fonts links are dropped (the vendored files stay unchanged). Entry points: `visualize`/`render`/`render_multi_user` (whole graph), plus `visualize_bounded`/`render_bounded` for a bounded subgraph around seed nodes (`VisualizationBounds`) with optional session events on the Memory tab, the JSON payload builders (`build_visualization_payload`, `build_brain_summary_payload`) and the streamed-read event sequence (`prepare_graph_stream`). Surfaces via the CLI `visualize` subcommand. Payload gaps in [roadmap/not-implemented.md](https://github.com/topoteretes/cognee-rs/blob/main/docs/roadmap/not-implemented.md#visualization).

**cognee-migration** — COGX export: writes the graph store as a portable archive that **Python cognee can re-import**, either locally (`cognee.remember(COGXArchiveSource(path))`) or over HTTP (`POST /api/v1/remember`, `content_type=cogx-archive`, packed `.cogx.tar.gz`). COGX is the only one of Python's five export formats with a reader on the other side. Entry points: `write_cogx` (pure, nodes+edges → archive), `export_graph` (reads a `GraphDBTrait`), `pack_archive` (`archive` feature). Surfaces via the CLI `export` subcommand, whose `--dataset` is a **label only**: over the shared store an export always covers the whole store, and with [per-dataset storage](https://docs.cognee.ai/rust/configuration/datasets-and-access.md#per-dataset-storage) it runs outside any dataset and fails. The manifest must declare `source_system = "cognee"` — Python derives id preservation from that exact string. Contract tests in `tests/python_import_contract.rs`; the cross-SDK roundtrip lives in [e2e-cross-sdk](https://github.com/topoteretes/cognee-rs/blob/main/e2e-cross-sdk/README.md).

**cognee-observability** — OpenTelemetry tracing pipeline. Bridges `#[tracing::instrument]` sites into an OTLP exporter. Entry point: `init_telemetry` (tracing layer + RAII `TelemetryGuard`). Activated by `COGNEE_TRACING_ENABLED=true` or a non-empty `OTEL_EXPORTER_OTLP_ENDPOINT`; real exporter behind the `telemetry` feature. See [observability/opentelemetry.md](https://github.com/topoteretes/cognee-rs/blob/main/docs/observability/opentelemetry.md).

**cognee-telemetry** — Product-analytics client (`send_telemetry`). Fire-and-forget POST to `https://test.prometh.ai` per public API call; on by default, with a process-wide switch (`TelemetryConfig`, `set_enabled` / `is_enabled`, exposed by every binding and the CLI's `--no-telemetry`); env opt-outs `TELEMETRY_DISABLED`, `ENV=test|dev`; compiled out with `--no-default-features`. See [observability/send\_telemetry.md](https://github.com/topoteretes/cognee-rs/blob/main/docs/observability/send_telemetry.md).

**cognee-logging** — Shared file-based logging: rotation, the Python-compatible plain-text formatter, and a noise-suppressing `EnvFilter`. Entry point: `init_logging`, called by the CLI and by other embedders. Env-var surface documented in [Configuration: logging](https://docs.cognee.ai/rust/configuration/runtime.md#logging).

**cognee-bindings-common** — Shared SDK facade for the Neon JS, C-API, Python and Java (JNI) bindings: `SdkError` (+ `code()`), `HandleState`, `CogneeServices`, and neon-free JSON wire helpers. Not a new user-facing Rust API — that remains `cognee::api`.

**cognee** — Unified public API facade. Re-exports all crates and adds an `api/` module: `forget`, `update`, `prune`, `recall`, `remember`, `improve`, plus `DatasetManager`. Houses the shared `Settings`/`ConfigManager`, the setting-key registry (`config/keys.rs`: one row per setting binds its env vars, the generic `set`, and `cognee-cli config`) and runtime setters. `ComponentManager` (lazy, version-cached) delegates backend construction to a `cognee-components` `ComponentRegistry`; use `ComponentManager::with_registry` (or `HandleState::from_settings_with_registry` in the bindings) to inject external adapter factories. The registry API is re-exported here so downstream entry points use `cognee::` paths. (The crate lives in `crates/lib/`; it shipped as `cognee-lib` through v0.1.3 and was renamed to `cognee`.)

**cognee-lib** — Deprecated re-export shim (`crates/cognee-lib/`) that keeps the old `cognee-lib` crate name compiling after the rename. It is `pub use cognee::*` with every Cargo feature forwarded 1:1 to `cognee`. New code should depend on `cognee` directly.

**cognee-cli** — Command-line binary (`cognee-cli`). See [CLI Reference](https://docs.cognee.ai/rust/tools/cli.md).

**cognee-utils** — Shared utilities: retry logic, deterministic ID generation (`generate_node_id`, `NAMESPACE_OID`, …), secret redaction (`redact`), and tracing attribute keys.

**cognee-config-core** — The configuration boundary, and the machinery for component-owned config sections (`config_section!`, `ConfigSection`, `ConfigSchema`, `unknown_key`). `EnvSource` (a read-only view of an environment), `ProcessEnv` (the one sanctioned read of the process env; constructing it is clippy-banned outside a declared boundary), `MapEnv` (an in-memory source, for tests or for resolving `Settings` without touching the process env), and `load_dotenv` (`dotenv` feature). A leaf crate with no `cognee-*` dependencies. See [Configuration: configuration model](https://docs.cognee.ai/rust/configuration.md#configuration-model).

**cognee-truth-subspace** — Pure alignment math (cosine projection, query-relevance-weighted truth scoring, stable id signatures) for the hybrid-retriever truth-subspace re-ranking feature, plus VectorDB-backed centroid persistence (`load_centroids`/`upsert_centroids`). Used by cognee-search's `HybridRetriever` (`use_truth_weight`, off by default) and by cognee-cognify.

**cognee-test-utils** — Test helpers and mock implementations for integration tests.

## Architecture patterns

* **Feature strategy** — Most leaf crates define optional features with no defaults (`default = []`); `cognee-components` and `cognee-bindings-common` carry backend defaults. The umbrella library (`cognee`) and the CLI (`cognee-cli`) enable all non-platform-specific features by default, so a plain `cargo build` gives a fully-featured binary. Platform- and deployment-specific extras (e.g. on-device LiteRT inference, embedded Qdrant) are not part of this repository; the `testing` feature stays opt-in. New feature-gated capabilities should be propagated up through `cognee`/`cognee-cli` defaults unless platform- or test-only.
* **Trait-based abstractions** — `StorageTrait`, `IngestDb`, `GraphDBTrait`, `VectorDB`, `EmbeddingEngine`, `Llm`, `SessionStore`, etc. enable backend swapping and mock testing.
* **Open to external providers** — **adding a vector / graph / LLM backend must never require a change to cognee-rs.** An outside crate implements a factory trait, `register_*`s it on a `ComponentRegistry`, and selects it by provider id in configuration. Two rules follow: (1) nothing validates a provider id against a fixed list — the registry's own lookup is the only authority; and (2) every resolved input a provider might need (notably the assembled Postgres URLs in `BackendBuildContext`) is populated for *all* provider ids, never only for the built-in ones, and is never gated on a built-in's cargo feature. A built-in id may be replaced by registering over it. See [guides/external-providers.md](https://github.com/topoteretes/cognee-rs/blob/main/docs/guides/external-providers.md).
* **Prefer `dyn Trait`** — object-safe traits via `&dyn Trait` / `Arc<dyn Trait>` at call sites; monomorphized generics only when performance-critical.
* **Zero-copy where possible** — `WordChunk<'a>`, `SentenceChunk<'a>`, `ParagraphChunk<'a>` borrow `&str` slices via byte-offset tracking.
* **`Arc` for shared ownership** — `Arc<dyn Trait>` in pipelines; `Arc<Mutex<T>>` in mocks.
* **Async-first** — all I/O via tokio; trait methods are `async` since components may be local or remote.
* **Streaming-first** — `DataInput::process_by_chunks()`, `StorageTrait::store_stream()`, `ContentHasher::hash_content_stream()` avoid loading full files into memory.
* **Deterministic IDs** — dataset, entity and chunk ids are `uuid5(NAMESPACE_OID, …)`. `data` rows are the exception: they get a random `uuid4` and are deduplicated by content hash within their dataset, owner and tenant. Chunk IDs: `uuid5(NAMESPACE_OID, "{document_id}-{chunk_index}")`.
* **Configuration at the boundary** — configuration is resolved once, at a config boundary, into a typed struct (`Settings` per SDK instance; `LoggingConfig` and the observability/telemetry settings per process); components receive resolved values through constructors and `BackendBuildContext`, and never read the process environment. Env vars are defaults; everything they set is also settable from code. Enforced by `clippy::disallowed_methods` in the root `clippy.toml` plus the `scripts/check_env_boundary.sh` per-file ratchet on direct-access call sites. See [Configuration: configuration model](https://docs.cognee.ai/rust/configuration.md#configuration-model). Component-specific settings are declared by the component (`config_section!`, returned from its factory's `config_sections()`), so registering a factory registers its settings and a compiled-out feature contributes none.
* **Error types per crate** — each crate defines its own `thiserror` enum (`StorageError`, `ChunkingError`, `IngestionError`, …).

## Key dependencies

| Crate | Purpose |
| - | - |
| `tokio` | Async runtime |
| `sea-orm` (SQLite, Postgres) | Relational DB ORM (metadata, sessions, provenance) |
| `ort` (ONNX Runtime) | Local model inference (embeddings) |
| `lbug` | Embedded graph database (Ladybug) |
| `reqwest` (rustls-tls) | HTTP client (URL crawling, LLM/embedding APIs) |
| `aws-config` / `aws-sigv4` / `aws-credential-types` / `aws-smithy-*` | AWS credential resolution + SigV4 request signing for Bedrock (`bedrock` feature; versions pinned exactly — see the note in the workspace `Cargo.toml`) |
| `scraper` | HTML parsing for URL ingestion |
| `sophia` / `sophia_turtle` / `sophia_jsonld` | RDF/OWL ontology parsing |
| `uuid` (v4, v5) / `sha2` | ID generation / content hashing |
| `serde` / `serde_json` / `schemars` | Serialization + JSON schema |
| `tokenizers` / `tiktoken-rs` | Tokenization (embedding + chunking token counters) |
| `tracing` / `tracing-subscriber` | Structured logging + instrumentation |
| `opentelemetry` / `opentelemetry-otlp` / `tracing-opentelemetry` | OTLP trace export (`telemetry` feature) |
| `async-trait` / `thiserror` / `clap` | Trait async / errors / CLI |
| `pyo3` / `neon` / `jni` | Python / JavaScript / Java bindings |

## Browsing the API docs (rustdoc)

API and type detail are documented inline in the code and rendered by rustdoc —
the rest of these docs link to it rather than restating signatures.

```bash theme={null}
# Build & open the whole workspace's API docs (no external deps):
cargo doc --no-deps --open

# Or a single crate:
cargo doc -p cognee-cognify --no-deps --open
```

CI already runs `cargo doc --no-deps` on every push (no hosted docs.rs site —
build locally). Each crate's `lib.rs` carries a top-level `//!` summary; start
from `cognee` (the facade) and follow the re-exports.

| Area | Crate (package) | Start at |
| - | - | - |
| Public SDK facade | `cognee` | `api` module, `ConfigManager` |
| Ingest | `cognee-ingestion` | `AddPipeline` |
| Chunking | `cognee-chunking` | `Chunker`, `TokenCounter`, `text_chunker` |
| Cognify | `cognee-cognify` | `cognify`, `CognifyConfig` |
| Search | `cognee-search` | `SearchBuilder`, `SearchType`, `HybridRetriever` |
| Embedding | `cognee-embedding` | `EmbeddingEngine`, `EmbeddingConfig` |
| LLM | `cognee-llm` | `Llm`, `OpenAIAdapter`, `AnthropicAdapter`, `BedrockAdapter` |
| Graph | `cognee-graph` | `GraphDBTrait`, `LadybugAdapter` |
| Vector | `cognee-vector` | `VectorDB`, `BruteForceVectorDB`, `PgVectorAdapter` |
| Delete | `cognee-delete` | `DeleteService` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.