Profile
Query a profile
Ask a natural-language question about a user’s memory or historical data. This endpoint retrieves insights from the user’s ingested events, documents, and summaries, returning a concise, deterministic text answer.
POST /query
Purpose
Use this endpoint when you want to query what the system already knows about a user — such as preferences, communication patterns, relationships, or routines.
Typical use cases include:
Asking “Who does this user collaborate with most?”
Determining “When does this user prefer meetings?”
Retrieving user-specific insights for model grounding or decision logic.
Endpoint
Headers
Request Body
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | The user ID whose memory or profile to query. |
| string | Yes | A natural-language question to answer based on the user’s stored data. |
| boolean | Optional | If |
Example Request
Example cURL
Example Response
Response Fields
Field | Type | Description |
|---|---|---|
| string | ID of the queried user. |
| string | Deterministic natural-language answer derived from user data. |
Behavior
Responses are generated deterministically and grounded in the user’s stored data.
Setting
"use_cache": truewill reuse recent results for identical queries, improving performance.The
answerfield always returns concise, factual text suitable for direct use in chat, LLM reasoning, or analytics.Cached results expire automatically when new data is ingested for the user.
Error Responses
HTTP Code | Error Code | Description |
|---|---|---|
|
| The request body is malformed or missing required fields. |
|
| API key missing or invalid. |
|
| No user exists with the provided |
|
| Internal service failure. Retry after a short delay. |
Example:
Example Implementation (Python)
Best Practices
Keep questions clear, factual, and user-specific (avoid ambiguous prompts).
Enable
use_cachefor repeated dashboard or agent queries to reduce latency.Ensure the user has relevant ingested data before querying.
Combine
/querywith/summaryto cross-check results.For multi-turn agents, store answers locally to maintain continuity across sessions.
Related Endpoints
Endpoint | Description |
|---|---|
GET | Retrieve a deterministic, purpose-based user summary. |
POST | Retrieve top-k relevant memory snippets for grounding. |
POST | Add new events or documents for future queries. |
Summary:
Use POST /query to ask natural-language questions about a user’s profile and history.
This endpoint is ideal for fetching precise, deterministic insights — powering personalized reasoning and memory recall across your agents.
Join our Discord Community