Errors

Every error response from /v1/agents/* shares the same JSON envelope.

Envelope

{
  "ok": false,
  "agent": "competitive-landscaping",
  "error": {
    "code": "invalid_input",
    "message": "missing required field: 'query'"
  }
}

Error codes

CodeHTTPWhen
unauthorized401Missing or invalid Bearer token / session cookie.
invalid_input400Request body failed schema validation (missing field, wrong type).
quota_exceeded402Free-plan lifetime quota exhausted. Upgrade to Pro.
forbidden403Authenticated user does not own the resource.
not_found404Agent name or referenced resource (e.g. run_id) does not exist.
agent_failed500The pipeline raised an unhandled exception. Includes the exception message.
timeout504Cloud Run cut the request at the 60-minute limit before the pipeline finished.

504 timeout behaviour

Cloud Run hard-caps every HTTP request at 60 minutes. If the underlying pipeline runs longer than that, the connection is terminated and the caller sees a 504 — but the pipeline keeps running server-side and the run is still persisted to the database. The result is reachable via the dashboard (/history) under the same account.