STEP 6 OF 8
Workflows
Agent Studio (sidebar label; route is /workflows) is the drag-and-drop, node-based
orchestration canvas. /workflows lists what you have and offers two starting points: describe
it (a natural-language first draft) or a blank canvas. /workflows/{id} is the ReactFlow
builder itself.
Starting from a blank canvas or a description
# Natural-language -> first-draft nodes/edges
curl -X POST https://your-control-plane-host/api/v1/workflows/ai/generate \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"description": "When a new invoice document lands in the Vault, classify it, route amounts over $5,000 to a human for approval, then post the result to Slack."}'
Or create an empty one and build it node by node from the palette:
curl -X POST "https://your-control-plane-host/api/v1/workflows?tenant_id=$TENANT_ID" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"name": "Invoice approval", "definition": {"nodes": [], "edges": [], "viewport": {}}}'
The definition field is stored exactly in ReactFlow's shape ({nodes, edges, viewport}) — the
canvas reads and writes it directly, no translation layer.
The real node-type palette
The palette isn't hardcoded on the frontend — it's fetched from the backend, so it always matches what the executor actually supports:
curl https://your-control-plane-host/api/v1/workflows/node-types
The current set (app/api/v1/endpoints/workflows.py::get_node_types, dispatched by
app/services/workflow_executor.py):
| id | Name | Purpose |
|----|------|---------|
| trigger | Trigger | Entry point for the workflow |
| agent | Agent | Calls a workforce agent (the real palette id — matches _handle_ai_agent in the executor) |
| classify | Classify | Model-based classification step |
| condition | Condition | Branches on a condition (2 outputs) |
| while | While loop | Loops while a condition holds |
| transform | Transform | Reshapes step output |
| set_state | Set state | Writes to workflow state |
| parallel / merge | Parallel / Merge | Fan-out to N branches / fan back in |
| integration | Integration | Calls a connector action |
| mcp | MCP tool | Calls an MCP-exposed tool |
| human_review | User approval | Pauses for a human decision (2 outputs); routes through Action Gateway pause/resume |
| guardrail | Guardrail | Policy check gate (2 outputs) |
| file_search | File Search | Searches ingested documents |
| output | Output | Terminal node |
Drag a node from the palette, connect handles, then use the side panel to edit the selected step's label and instructions.
Save, test, and activate
# Dry-run without side effects
curl -X POST https://your-control-plane-host/api/v1/workflows/{workflow_id}/simulate \
-H "Authorization: Bearer $TOKEN"
# Real run -- deducts credits
curl -X POST https://your-control-plane-host/api/v1/workflows/{workflow_id}/execute \
-H "Authorization: Bearer $TOKEN"
# Flip from draft to active
curl -X POST https://your-control-plane-host/api/v1/workflows/{workflow_id}/activate \
-H "Authorization: Bearer $TOKEN"
GET /api/v1/workflows/{workflow_id}/executions lists run history; schedules and webhooks
(POST .../schedules, POST .../webhooks) trigger a workflow on a cron or an inbound event
instead of a manual execute call.
Demo sessions carry no real backend JWT, so demo users see two grounded example workflows (AP
invoice approval, compliance evidence collection) loaded from
lib/demo-data/workflows.ts. Save/Test run/Activate work against that local state only
— nothing above hits a real backend for a demo account.
Starting from a Solution Template instead
Complex Use-Case (sidebar label; route is /solutions) is a library of pre-built,
pre-configured templates — each one ships with pre-assigned agents, connectors, and a runnable
workflow already wired together. Pick a template, then configure it with natural language or voice
before deploying:
# Pull one template's full pack (agents, connectors, workflow) for review
curl https://your-control-plane-host/api/v1/solutions/{use_case_key}/pack \
-H "Authorization: Bearer $TOKEN"
# Deploy it -- provisions the real agents, skills, and workflow for your tenant
curl -X POST https://your-control-plane-host/api/v1/solutions/{use_case_key}/provision \
-H "Authorization: Bearer $TOKEN"
The same endpoints are also mounted at /api/v1/solution-templates/{use_case_key}/... — an alias
with identical behavior, not a different implementation.
What's next
Step 7 — Evals & Monitoring: once agents and workflows are running, watch them via traces, threads, and eval regressions.