The identifiers (scope chain)
From broadest to narrowest. A memory can be tagged with several of these and is then retrievable through any matching scope.B2C vs B2B: B2C instances need only
user_id (customer_id is auto-resolved); B2B instances pass user_id under a customer_id. The shape is set per Instance by Who uses this agent? when you create it (B2C and Internal: user_id only; B2B and Agent-to-Agent: both), and shows as Type on the Instances list. See Memory scopes.The two write paths
Which do I use?
- Turn-by-turn chat history →
record_message - Long-term knowledge (a document, a profile, an imported fact) →
memories.create - Production chat agent →
record_messagefor the conversation (Synap turns recorded turns into long-term memory for you), andmemories.createonly for content that is not a recorded turn. Use one path per conversation: recording a conversation and also ingesting the same text extracts it twice. See Conversations and transcripts.
The four fetch interfaces
Each reads from one scope. A memory tagged with multiple identifiers is retrievable through any matching interface.Fetching a brand-new or never-ingested scope returns an empty
ContextResponse (facts == [], etc.), not an error. This is the normal cold-start path. A malformed (non-UUID) conversation_id raises InvalidInputError. See Error handling.The two mode pairs
Two differentmode= axes. Label which one you mean:
…plus a precision knob: fetch calls also take
precision_level: high (default) = results go through an additional relevance-refinement pass before being returned; medium = skips the refinement pass for faster responses (recall isn’t impacted; the same candidate memories are searched, but outputs are less precisely filtered). Independent of mode; combine with either fast or accurate.
Going deeper
The full memory model: memory types, lifecycles, entity resolution, and MACA.