v38

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-1793196344.2 KB
Memories

Query memories

Retrieves documents matching the query.

post/memories/query

Request body

querystring required

Query to run.

answerboolean

If true, the query will be answered along with matching source documents.

provenanceboolean

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.

effort'minimal' | 'low' | 'medium' | 'high' | 'very_high'

How much compute the retrieval pipeline should spend on this query.

Mirrors the convention popularized by OpenAI's reasoning_effort and similar dials on Anthropic / Gemini APIs. minimal is the cheapest and fastest path; high does the most. Tiers map to behavior via EFFORT_CONFIG.

sourcesDocumentProviders[]

Only query documents from these sources.

max_resultsinteger

Maximum number of results to return.

Example request

{
  "answer": true,
  "options": {
    "filter": {}
  },
  "query": "What does Hyperspell do?",
  "sources": [
    "vault"
  ]
}

Response

Successful Response

query_idstring nullable

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.

errorsobject[] nullable

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.

answerstring nullable

The answer to the query, if the request was set to answer.

scorenumber nullable

The average score of the query feedback, if any.

querystring nullable

The query string that was issued.