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

> remember in cognee-rust: add + cognify + improve in one call, as session or permanent memory.

## What is the remember operation

`remember` is the main write entry point of the memory API. It stores inline text and/or files as memory in one call. Where the turn goes depends on whether you pass a session id: without one, it runs `add`, then `cognify`, then (by default) the `improve` enrichment pass; with one, it stores the turn in the session and starts `improve` for that session in the background.

## What happens under the hood

Stores input as memory: it runs **add + cognify** and then, by default, the
**improve** enrichment pass. Accepts inline text and/or file paths.

* **Session memory** — pass a `--session-id` to scope the turn to a session
  (session-backed QA history). The improve that bridges the session into the
  graph runs as a detached background task: `remember` returns
  once the entry is stored. It is skipped when `improve.auto_enabled` is off
  (`IMPROVE_AUTO_ENABLED=false`) or an `improve.*` setting is invalid, and
  debounced by `improve.debounce_entries` / `improve.debounce_seconds` (state
  kept in the session as an internal `auto_improve_debounce` row; see
  [Configuration: improve](https://docs.cognee.ai/rust/configuration/search.md#improve-self-improvement-loop)).
  The CLI waits for it before exiting and a binding's `close()` before closing
  the handle (`cognee::wait_for_background_tasks`; bindings-common
  `ops::lifecycle::wait_for_background_tasks`). A detached task that panics is
  logged at `error`.
* **Permanent graph memory** — omit `--session-id` and the input is persisted as
  permanent, graph-backed memory. Its self-improvement pass runs `improve()`
  on the dataset (it used to run memify), and follows the same
  gate: off when `improve.auto_enabled` is off or an `improve.*` setting is
  invalid.

## What remember returns

The bindings' `selfImprovement` option now defaults to `true`; pass `false`
to skip the improve. The returned `RememberResult` reports the automatic
improve: `improve` (the
`ImproveResult`), `improve_error` (the error `improve()` returned, or its
errored stages; the remember itself succeeds and `error` stays unset),
`after_run_error` (always unset: Rust has no such step) and `improve_skipped`,
each serialized only when set. A session-mode improve runs detached, so
`improve` stays unset there; the Rust-only `improve_launched` flag, which is not
serialized, says it was started. A host can decline the automatic improve with a reason through
`register_auto_improve_admission` / `clear_auto_improve_admission`; the reason
is reported as `improve_skipped`.

`remember ≈ add + cognify + improve`. rustdoc: `api::remember`.

## Related

> [card] [Recall](https://docs.cognee.ai/rust/core-concepts/main-operations/recall.md)
>
> Query what you stored

> [card] [Improve](https://docs.cognee.ai/rust/core-concepts/main-operations/improve.md)
>
> The enrichment pass remember runs

> [card] [Sessions](https://docs.cognee.ai/rust/core-concepts/sessions-and-caching.md)
>
> Session memory vs permanent memory


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