Skip to main content
A task is a single-agent execution. Submit it, poll for the result, or stream events over WebSocket. The route file is app/api/routes/tasks.py.

POST /tasks

Submit a task.
Request body (TaskRequest): Example - single-agent HIPAA:
Response (201 Created, TaskResponse):
The websocket_url streams events as the task runs: tool calls, verify decisions, certificates, blocked attempts.

Error responses

400 - invalid compliance policy or request shape. 401 - missing or invalid API key. 403 - denied by policy ceiling. The body is structured:
422 - the request body did not match the Pydantic model.

What happens server-side

  1. The request is validated against the active compliance policy’s max_permissions ceiling.
  2. An execution record is created and the task is enqueued.
  3. The agentic executor (LLM + tool dispatcher) starts running. Every tool call passes through Guard.verify(...) before execution. Allowed calls produce a VerifiedCertificate recorded in the execution; blocked calls are recorded with their violations.
  4. The execution moves through queuedplanningexecutingverifying and finishes with completed, failed, or cancelled.

See also

  • Executions - fetching the result by id.
  • Workflows - multi-stage orchestrations.
  • Compliance - exporting the audit package for a finished execution.