Query memories
Retrieves documents matching the query.
Authorizations
API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
Body
Query to run.
If true, the query will be answered along with matching source documents.
If true (effort='very_high' only), attach a provenance record to the response: the source documents and entities the answer was grounded in, the agent's search trajectory, and any sources that failed. Adds one indexed lookup; intended for auditability / compliance use cases.
Alpha: opt this agentic query into cross-user scope. Requires the app admin to have enabled cross-user retrieval in the app's settings, the 'brain-cross-user-agentic-alpha' flag on the app, a per-user token, an agentic effort tier ('medium' or 'high'), and answer=true. Matching documents are never returned in this mode — the only output is the synthesized answer, passed through the app's category filter and accompanied by a privacy disclaimer. If any requirement is missing the query runs user-scoped and a notice is added to errors.
How much compute to spend on retrieval. Mirrors the dial popularized by frontier-model APIs (OpenAI reasoning_effort, etc.). 'minimal' = verbatim single-shot retrieval (fastest). 'low' = LLM rewrites the query for better retrieval and extracts date filters. 'medium' = rewrite + agentic refinement loop (the answer LLM may request additional retrieval rounds, up to 3). 'high' = rewrite + extended refinement (up to 6 rounds). Higher = better recall, more latency, more cost.
minimal, low, medium, high, very_high Only query documents from these sources. Names are case-insensitive and accept either separator, so Google Drive's provider may be given as google_drive, google-drive, or GOOGLE_DRIVE.
reddit, notion, slack, google_calendar, google_mail, google_meet, box, dropbox, github, gitlab, google_drive, vault, web_crawler, trace, microsoft_teams, granola, fathom, fireflies, linear, hubspot, salesforce, coda, confluence, jira, lightfield, gong, pylon, clickup Search options for the query.
Maximum number of results to return.
1 <= x <= 200Response
Successful Response
The ID of the query. This can be used to retrieve the query later, or add feedback to it. If the query failed, this will be None.
Errors that occurred during the query. These are meant to help the developer debug the query, and are not meant to be shown to the user.
The matching documents, each carrying its hyperdoc tree plus query-path score/highlights/summary (ENG-2479 Phase 4).
The answer to the query, if the request was set to answer.
Privacy notice, set when the query ran in cross-user alpha mode: the answer may draw on other members' data and category filtering is best-effort. Show this to the end user alongside the answer.
Auditability record (source documents, entities, search trajectory, failed sources), if the request set provenance=True on a very_high query.
Sources the answer cites, in first-mention order. Each entry resolves an inline [SRC-n] marker in the answer text to the source document it refers to. Present only when the answer-citations flag is on for the app and the answer actually cited something.
The average score of the query feedback, if any.
The query string that was issued.