> ## 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.

# Operations

> What cognee-rust does: the remember / recall / improve / forget memory API and the underlying add / cognify / search pipeline.

What cognee-rust *does*. The primary surface is the **memory API** —
**`remember`**, **`recall`**, **`improve`**, **`forget`** — four high-level
operations that compose the lower-level pipeline (`add → cognify →
search`). Every operation is reachable from each interface (CLI, language
bindings, and the HTTP server, which is not part of the `cognee-rs`
repository) — see [Tools](https://docs.cognee.ai/rust/tools/overview.md). API/type detail lives in
rustdoc (`cargo doc --no-deps --open`); this page is the overview, and each operation has its own page.

## The memory API

Cognee's primary surface is four operations that turn raw input into queryable,
self-improving memory. They live in the [`cognee`](https://github.com/topoteretes/cognee-rs/blob/main/crates/lib/) `api`
module (`cognee::api::{remember, recall, improve, forget}`) and surface as
the always-built `cognee-cli` verbs `remember` / `recall` / `improve` / `forget`.

```
input ──remember──▶ memory (graph + vectors, optionally session)
query ──recall────▶ auto-routed answers
        improve───▶ enriched / bridged memory
        forget────▶ removed memory
```

| Operation | What it does |
| - | - |
| [remember](https://docs.cognee.ai/rust/core-concepts/main-operations/remember.md) | Stores input as memory: add + cognify + improve, as session or permanent memory |
| [recall](https://docs.cognee.ai/rust/core-concepts/main-operations/recall.md) | Queries memory with auto-routing over graph and session sources |
| [improve](https://docs.cognee.ai/rust/core-concepts/main-operations/improve.md) | Runs the self-improvement loop over a dataset |
| [forget](https://docs.cognee.ai/rust/core-concepts/main-operations/forget.md) | Removes a data item, a dataset, everything, or only a dataset's memory |

## Lower-level pipeline

The memory API composes these building blocks. They remain available directly
when you need fine-grained control over each stage. The classic flow is:

```
raw data ──add──▶ stored + deduplicated ──cognify──▶ knowledge graph + vectors ──search──▶ answers
```

| Operation | What it does |
| - | - |
| [add](https://docs.cognee.ai/rust/core-concepts/main-operations/legacy-operations/add.md) | Ingests text, files and URLs, deduplicated per dataset |
| [cognify](https://docs.cognee.ai/rust/core-concepts/main-operations/legacy-operations/cognify.md) | Builds the knowledge graph and vectors from stored data |
| [search](https://docs.cognee.ai/rust/core-concepts/main-operations/legacy-operations/search.md) | Runs one of 17 retrieval strategies |
| [memify](https://docs.cognee.ai/rust/core-concepts/main-operations/legacy-operations/memify.md) | Removed; cognify and improve cover it |

## Additional operations

These live in the [`cognee`](https://github.com/topoteretes/cognee-rs/blob/main/crates/lib/) `api` module (and `DatasetManager`):

| Operation | What it does | rustdoc |
| - | - | - |
| **[delete](https://docs.cognee.ai/rust/core-concepts/main-operations/forget.md#delete)** | Cascading removal of data/datasets across relational → graph → vector → file storage (with dry-run preview). | [`cognee-delete`](https://github.com/topoteretes/cognee-rs/blob/main/crates/delete/) `DeleteService` |
| **update** | Replace one document and re-cognify it. The document **keeps its `data_id`** (a pre-fork `legacy_id` resolves to the row it forked into; an unknown id is `ApiError::UpdateTargetNotFound` and creates nothing): its memory is dropped, the row is re-added pinned to the same id, and cognify rebuilds it. `UpdateResult` is `{ data_id, delete_result, cognify_result }` (the bindings' `deletedDataId` became `dataId`, and `newData` was dropped), and the bindings' `incrementalLoading` option of `update` defaults to `true`. | `api::update` |
| **prune** | Reset system or all state (`prune_system` / `prune_data`). | `api::prune` |
| **cleanup unused data** | Hard-delete the documents no search has touched for `minutes_threshold` minutes (or ever), optionally only in one user's datasets; dry run by default. Needs `ENABLE_LAST_ACCESSED` and is skipped until a search has tracked something. An operator task that deletes without an ACL check — without a user it deletes every owner's unused documents; no CLI, route or binding exposes it. | `api::cleanup_unused_data` |
| **visualize** | Render the graph to a single-file d3.js HTML page (Graph / Schema / Memory / Semantic tabs + inspector). | [`cognee-visualization`](https://github.com/topoteretes/cognee-rs/blob/main/crates/visualization/) |
| **export** | Write the graph as a COGX archive — the portable format Python cognee re-imports, locally or by uploading the packed `.cogx.tar.gz` to its remember endpoint. | [`cognee-migration`](https://github.com/topoteretes/cognee-rs/blob/main/crates/migration/) |

## Operation → interface map

| Operation | CLI | HTTP route | Binding method |
| - | - | - | - |
| remember | `cognee-cli remember` | `POST /api/v1/remember` | `remember()` |
| recall | `cognee-cli recall` | `POST /api/v1/recall` | `recall()` |
| improve | `cognee-cli improve` | `POST /api/v1/improve` | `improve()` |
| forget | `cognee-cli forget` | `POST /api/v1/forget` | `forget()` |
| add | `cognee-cli add` | `POST /api/v1/add` | `add()` |
| cognify | `cognee-cli cognify` | `POST /api/v1/cognify` | `cognify()` |
| add + cognify | `cognee-cli add-and-cognify` | *(two calls)* | — |
| search | `cognee-cli search` | `POST /api/v1/search` | `search()` |
| delete | `cognee-cli delete` | `POST /api/v1/delete` | `delete*()` |
| update | `cognee-cli update` | `POST /api/v1/update` | `update()` |
| visualize | `cognee-cli visualize` | `POST /api/v1/visualize` | `visualize()` |
| export | `cognee-cli export` | *(none yet)* | `exportCogx()` (Java only) |

CLI flags and feature gates: [tools/cli](https://docs.cognee.ai/rust/tools/cli.md). HTTP request/response
shapes: documented with the server, which is not part of the `cognee-rs`
repository (see [HTTP Server Tools](https://docs.cognee.ai/rust/tools/http-server.md)). Binding method
names per language: [tools/bindings](https://docs.cognee.ai/rust/tools/bindings.md).


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