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.
Parameters
The user identifier to fetch context for. Must match a
user_id you’ve previously ingested or initialized a conversation for.Optional conversation identifier. When provided, results are biased toward memories relevant to the active conversation and the SDK can inject periodic user summaries into the response.
One or more search queries to find relevant user memories. If omitted, returns the most recent and highest-confidence user-scoped memories.
Maximum number of memory items to return. Defaults to
10. Maximum 50.Filter results to specific memory types. If omitted, all types are included.
| Value | Description |
|---|---|
fact | Factual information about the user |
preference | Stated or inferred user preferences |
episode | Notable events from the user’s history |
emotion | Sentiment and emotional context |
temporal_event | Time-bound events (deadlines, appointments, recurring dates) |
Retrieval mode that controls the speed-quality tradeoff.
| Value | Description |
|---|---|
fast | Vector search only. Lowest latency (~50-100ms). Default. |
accurate | Full vector + graph + re-ranking. Highest quality (~200-500ms). |
Customer identifier the user belongs to. Required for B2B instances. For B2C instances, this is auto-resolved from
user_id and can be omitted.Returns
AContextResponse with the following fields:
Array of fact memories relevant to the query. Each includes
content, confidence, entities, source, and relevance_score.Array of preference memories.
Array of episode memories.
Array of emotion memories.
Array of time-bound event memories.
Response metadata including
correlation_id, source (cache | cloud | anticipation), ttl_seconds, and retrieved_at.Example
Raises
InvalidInputError— whenmodeis not"fast"or"accurate".SDKNotInitializedError— when called beforeawait sdk.initialize().AuthenticationError— when the API key is invalid or revoked.ContextNotFoundError— whenuser_iddoes not exist for this instance.
See also
sdk.customer.context.fetch— customer-scoped contextsdk.client.context.fetch— organizational (client) contextsdk.context.fetch— unified scope-chain fetch