app/api/routes/tasks.py.
POST /tasks
Submit a task.
TaskRequest):
Example - single-agent HIPAA:
201 Created, TaskResponse):
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
- The request is validated against the active compliance policy’s
max_permissionsceiling. - An execution record is created and the task is enqueued.
- The agentic executor (LLM + tool dispatcher) starts running. Every tool call passes through
Guard.verify(...)before execution. Allowed calls produce aVerifiedCertificaterecorded in the execution; blocked calls are recorded with their violations. - The execution moves through
queued→planning→executing→verifyingand finishes withcompleted,failed, orcancelled.
See also
- Executions - fetching the result by id.
- Workflows - multi-stage orchestrations.
- Compliance - exporting the audit package for a finished execution.