Documentation Index
Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
Use this file to discover all available pages before exploring further.
user_id (and customer_id) is strongly recommended — it scopes the in-process anticipation cache to that user so bundles prefetched for one user can never be served on another user’s lookup. These will become required in a future release.
Parameters
The conversation to fetch context for.
Optional list of query strings to bias retrieval. When omitted, the most relevant recent context is returned.
Maximum number of items to return per context type.
Context types to include. Defaults to all available types (facts, preferences, episodes, emotions, temporal events).
Retrieval mode:
"fast"— direct query, low latency (~50–100ms). Best for in-the-loop prompt assembly."accurate"— LLM-enhanced queries, higher quality (~200–500ms). Best when you can afford the extra latency.
External user id. Strongly recommended — scopes anticipation cache lookups to the right user and avoids deriving scope from a not-yet-written conversation row.
External customer id, forwarded alongside
user_id for the same scoping reason.Returns
AContextResponse containing the retrieved context.
Facts learned about the user during this conversation.
Stated or inferred preferences relevant to this conversation.
Episodic memories tied to this conversation.
Detected emotional signals.
Time-anchored events relevant to the conversation.
Compacted/summary context for this conversation, when available.
Correlation id, source (
cache or cloud), TTL, and retrieval timestamp.Example
Raises
InvalidInputError— whenmodeis not"fast"or"accurate".AuthenticationError— when the API key is missing or invalid.NetworkError— when the SDK cannot reach Synap.