Expand description
Top-level API functions mirroring the Python SDK. High-level API functions for Cognee-Rust.
These are the top-level convenience functions that compose the lower-level pipeline primitives (add, cognify, search, delete, memify) into user-friendly operations matching the Python SDK.
- [
forget] – Unified deletion API - [
update] – Data replacement (delete + re-add + re-cognify) - [
prune] – Selective backend cleanup - [
recall] – Smart search with session routing - [
remember] – One-call add + cognify + optional improve - [
improve] – Bidirectional session-graph bridge
Re-exports§
pub use datasets::DatasetDb;pub use datasets::DatasetManager;pub use error::ApiError;pub use error::DatasetError;pub use forget::DatasetRef;pub use forget::ForgetResult;pub use forget::ForgetTarget;pub use forget::forget;pub use improve::ImproveParams;pub use improve::ImproveResult;pub use improve::improve;pub use pipeline_runs::reset_dataset_pipeline_run_status;pub use pipeline_runs::reset_pipeline_run_status;pub use prune::PruneResult;pub use prune::PruneTarget;pub use prune::prune_data;pub use prune::prune_system;pub use recall::RecallResult;pub use recall::recall;pub use remember::RememberItemInfo;pub use remember::RememberResult;pub use remember::RememberStatus;pub use remember::remember;pub use remember::remember_entry;pub use update::UpdateResult;pub use update::update;pub use user::get_or_create_default_user;
Modules§
- datasets
- High-level dataset management facade.
- error
- Shared error types for the high-level API functions.
- forget
- Unified deletion API –
forget(). - improve
- Bidirectional session-graph bridge —
improve(). - notebooks
cognee_lib::notebooks— per-user notebook CRUD facade.- pipeline_
runs - Python-parity reset helpers for the
pipeline_runstable. - prune
- Selective backend cleanup –
prune_data()andprune_system(). - recall
- Smart search with session routing –
recall(). - remember
- One-call add + cognify + optional improve –
remember(). - update
- Data replacement API –
update(). - user
- Default user management.
Structs§
- Recall
Item - A single recall result item.
- Recall
Options - Advanced tuning options forwarded from
cognee_lib::api::recall::RecallOptions.
Enums§
- Recall
Scope - Scope selector. Mirrors Python’s
RecallScope = Literal["auto", "graph", "session", "trace", "graph_context", "all"](cognee/memory/entries.py:75).Autois the sentinel returned bynormalize_scope(None)and is resolved into concrete sources insiderecall().Allnever appears in a normalized list — it expands to the four concrete sources during normalization. - Recall
Source - Source tag for recall results. Mirrors the discriminator strings emitted
by Python’s
_search_session,_search_trace,_fetch_graph_context, and_run_graphhelpers incognee/api/v1/recall/recall.py. - Scope
Input - Untyped input accepted by
normalize_scope– mirrors Python’sOptional[Union[str, list[str]]](entries.py:81). HTTP/CLI layers can build aScopeInputdirectly from JSON; callers with a strongly-typedVec<RecallScope>can pass it viarecall()’sscopeparameter without going through this helper.
Functions§
- normalize_
scope - Normalize the recall
scopeparameter to a concrete source list, mirroring Python’snormalize_scopeatcognee/memory/entries.py:81-115.