Agent Query (Legacy)
POST /v1/agent/query is the legacy alias of POST /v1/ask: same read-only agent turn and same flat charge, but a minimal {status, answer} poll response.
POST /v1/agent/query is the legacy alias of [POST /v1/ask](post-ask). Both endpoints start exactly the same read-only agent turn over the workspace corpus, and both charge the same flat agent_ask unit (100 credits per accepted question, idempotent per turn). The difference is the result surface: the ask endpoints return the full payload with structured citations, the verification verdict, and usage, while the query poll returns a minimal {status, answer} body. New integrations should use /v1/ask; this alias remains supported for integrations built against the original surface.
The request body carries one field, query (up to 20,000 characters), and the submission answers 202 Accepted with a turnId. Poll GET /v1/agent/query/:id roughly every 2 seconds until status leaves processing. Like the ask surface, the alias requires a workspace-scoped key with the read scope, runs the turn under the least-privilege viewer role, and is tenant-isolated: a turn started by another workspace reads as 404.
/v1/agent/queryRequest body (JSON)
/v1/agent/query/:idcurl
Response (completed)
{
"status": "completed",
"answer": "You have 12 open invoices across 4 vendors. Northwind Supplies Ltd accounts for..."
}Poll response fields
Errors
Error responses