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-idto 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:rememberreturns once the entry is stored. It is skipped whenimprove.auto_enabledis off (IMPROVE_AUTO_ENABLED=false) or animprove.*setting is invalid, and debounced byimprove.debounce_entries/improve.debounce_seconds(state kept in the session as an internalauto_improve_debouncerow; see Configuration: improve). The CLI waits for it before exiting and a binding’sclose()before closing the handle (cognee::wait_for_background_tasks; bindings-commonops::lifecycle::wait_for_background_tasks). A detached task that panics is logged aterror. - Permanent graph memory — omit
--session-idand the input is persisted as permanent, graph-backed memory. Its self-improvement pass runsimprove()on the dataset (it used to run memify), and follows the same gate: off whenimprove.auto_enabledis off or animprove.*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
Recall
Query what you stored
Improve
The enrichment pass remember runs
Sessions
Session memory vs permanent memory