Store session context
store_contextRecords the outcome of a session to the user's NC memory, so that later sessions can recall it. summary and context are composed by the caller from the conversation itself; they are not collected from the user. All three core fields are required, and storage is cheap — more detail retrieves better than less.
WHAT IS WORTH RECORDING: a session that produced something a later session would otherwise have to reconstruct — a decision and the reasoning behind it, a fix and why it worked, a constraint discovered, a piece of state that changed. A session that only answered a self-contained question leaves nothing to recall. Recall returns what earlier sessions stored and nothing else, so an outcome that is never recorded here is not available to any later session.
FIELDS:
summary: what was asked and what was decided. 50-75 tokens max. One tight paragraph.
user_query: the user's VERBATIM opening question or request, copied exactly — full text, no truncation. Future recall matches against the user's own words, not only the summary.
context: full detail of the conversation — decisions, code, configs, errors, reasoning. Target 2000–8000 tokens: enough that a reader six months from now needs no follow-up. Technical details, file paths, error messages and CLI commands belong here untruncated.
conversation_id: matches the id used for recall_context in the same session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | Full technical detail of the conversation. Target 2000-8000 tokens. Do not compress or truncate. Storage is cheap. | |
| persona | No | ||
| summary | Yes | What was asked and what was decided. 50-75 tokens max. Plain prose. Do not include code or raw output here. | |
| billable | No | ||
| user_query | No | The user's original question or request, verbatim. Full text, no truncation. Used for future recall matching against the user's own words. | |
| artifact_url | No | URL to an artifact associated with this memory. Format: nc-doc://[document_id] or https URL. | |
| client_project | No | ||
| company_client | No | ||
| conversation_id | Yes | Thread identifier — must match the one used in recall_context this session. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Present on a fresh store. | |
| error | No | Present when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`. | |
| message | No | ||
| success | Yes | ||
| memory_id | No | On a deduplicated store: the existing memory's id. | |
| deduplicated | No | True when identical content was stored by this caller inside the dedup window; `memory_id` then names the EXISTING memory and nothing new was written. |