Skip to content

Workflows

AgentOps workflows chain registered agents into multi-step runs with templating, schedules, webhooks, cancel/retry, and optional HITL approval.

UI

  1. Open Workflows in the dashboard.
  2. Pick a template (data analysis, documents, monitoring, support) or New workflow.
  3. Add steps — choose an agent, set input JSON, optionally enable Require approval.
  4. Use templates like {{today}}, {{step1.output}}, {{input.field}}.
  5. Save, then Execute. Watch live status (running → completed / failed / awaiting_approval).

REST API

Create:

curl -X POST http://localhost:8001/api/v1/workflows \
  -H "Authorization: Bearer $JWT" \
  -H "X-API-Key: $TENANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Sales Report",
    "steps": [
      {"agent": "sales-fetcher", "input": {"date": "{{today}}"}},
      {"agent": "report-generator", "input": {"data": "{{step1.output}}"}},
      {"agent": "email-sender", "input": {"report": "{{step2.output}}", "to": "ceo@company.com"}}
    ],
    "schedule": "0 9 * * *"
  }'

Execute / status / cancel / retry:

Method Path
POST /api/v1/workflows/{id}/execute
GET /api/v1/workflows/{id}/status?run_id=
GET /api/v1/workflows/{id}/runs
POST /api/v1/workflows/{id}/cancel
POST /api/v1/workflows/{id}/retry
POST /api/v1/workflows/{id}/webhook
GET /api/v1/workflows/templates

Templating

Token Meaning
{{today}} ISO date
{{stepN.output}} Output of step N (1-based)
{{input.field}} Field from execute payload

HITL on steps

Set "require_approval": true on a step (or rely on policy required_approval). The run pauses with status awaiting_approval. Approve or reject via HITL; on approve the engine resumes with hitl_approved.

Security notes

  • Workflow actions are fail-closed when OPA is unavailable.
  • Agent webhook endpoints are SSRF-checked.
  • Soft/hard budgets can stop steps when spend exceeds the limit.

See also: Cost & budgets · HITL · API Reference