For conversation-level context fetch and compaction during agent interactions, use the Python SDK which provides
sdk.conversation.context.fetch() and sdk.conversation.context.compact() with automatic authentication, retries, and streaming support.Fetch Client Context
Retrieve organizational context scoped to your application (client). Client-scoped memories are visible to all users across all customers. This is typically used for product knowledge, documentation, and announcements that were ingested via bootstrap ingestion.Request Body
One or more search queries to find relevant organizational memories. If omitted, returns the most recent and highest-confidence client-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 your organization or product |
preference | Organizational preferences and standards |
episode | Significant organizational events |
temporal_event | Time-bound organizational events (launches, deadlines) |
Retrieval mode that controls the speed-quality tradeoff.
| Value | Description |
|---|---|
fast | Vector search only. Lowest latency (~50-100ms). |
accurate | Full vector + graph + re-ranking. Highest quality (~200-500ms). Default. |
Response
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.
Response metadata including
total_results, query_time_ms, tokens_used, scope, and mode.Example
Response
Client context is cached with a 30-minute TTL. Repeated queries within the TTL window are served from cache without re-querying the storage engines. New bootstrap ingestions automatically invalidate the cache.
Fetch Customer Context
Retrieve context scoped to a specific customer organization. Customer-scoped memories are visible to all users within that customer. This is useful for fetching shared organizational knowledge, company policies, and team-wide context.Request Body
The customer identifier to fetch context for.
One or more search queries to find relevant customer memories. If omitted, returns the most recent and highest-confidence customer-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 customer organization |
preference | Customer organizational preferences |
episode | Significant events within the customer organization |
emotion | Sentiment and emotional context within the organization |
temporal_event | Time-bound events (project deadlines, fiscal year, etc.) |
Retrieval mode that controls the speed-quality tradeoff.
| Value | Description |
|---|---|
fast | Vector search only. Lowest latency (~50-100ms). |
accurate | Full vector + graph + re-ranking. Highest quality (~200-500ms). Default. |
Whether to also include client-scoped (organizational) context in the results. Defaults to
true. When enabled, results merge customer-scoped and client-scoped memories, with customer-scoped memories taking priority.Response
Array of fact memories relevant to the query.
Array of preference memories.
Array of episode memories.
Array of emotion memories.
Response metadata including
total_results, query_time_ms, tokens_used, scope, and mode.Example
Response