Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.powabase.ai/llms.txt

Use this file to discover all available pages before exploring further.

Workflows are DAG-based automation pipelines that execute a fixed sequence of blocks (LLM calls, code execution, conditions, agent runs). Unlike agents that decide what to do dynamically, workflows follow a predetermined graph. They can be executed directly, streamed, or triggered externally via webhooks.

Common Patterns

Create a workflow, define its graph with PUT /api/workflows/{id}/graph, then execute. For external triggers, deploy the workflow and arm it to get a webhook URL. Webhooks are single-use — re-arm after each trigger. Use the streaming endpoint for real-time block execution updates.

CRUD

GET /api/workflows

List workflows.
limit
integer
Max results
offset
integer
Pagination offset
requests.get(f"{BASE_URL}/api/workflows", headers=headers)

POST /api/workflows

Create a workflow.
{ "name": "My Workflow" }
requests.post(f"{BASE_URL}/api/workflows", headers=headers, json={"name": "My Workflow"})

GET /api/workflows/

Get workflow with blocks and edges.
id
string
required
Workflow ID
requests.get(f"{BASE_URL}/api/workflows/{wf_id}", headers=headers)

PATCH /api/workflows/

Update workflow metadata.
id
string
required
Workflow ID
requests.patch(f"{BASE_URL}/api/workflows/{wf_id}", headers=headers, json={"name": "Renamed"})

DELETE /api/workflows/

Delete a workflow.
id
string
required
Workflow ID
requests.delete(f"{BASE_URL}/api/workflows/{wf_id}", headers=headers)

Graph

PUT /api/workflows//graph

Save the complete graph — blocks and edges.
id
string
required
Workflow ID
{
  "blocks": [
    { "id": "input", "type": "input", "config": {}, "position": {"x": 0, "y": 0} }
  ],
  "edges": [
    { "source": "input", "target": "output" }
  ]
}
requests.put(f"{BASE_URL}/api/workflows/{wf_id}/graph", headers=headers, json={"blocks": [...], "edges": [...]})

Deploy

POST /api/workflows//deploy

Deploy the workflow (enables webhook triggering).
id
string
required
Workflow ID
requests.post(f"{BASE_URL}/api/workflows/{wf_id}/deploy", headers=headers)

POST /api/workflows//undeploy

Undeploy the workflow.
id
string
required
Workflow ID
requests.post(f"{BASE_URL}/api/workflows/{wf_id}/undeploy", headers=headers)

POST /api/workflows//arm

Arm webhook for a single external trigger.
id
string
required
Workflow ID
response = requests.post(f"{BASE_URL}/api/workflows/{wf_id}/arm", headers=headers)
print(response.json())  # { webhook_id, secret }

Execution

POST /api/workflows//execute

Execute the workflow synchronously.
id
string
required
Workflow ID
{ "input": { "text": "..." } }
requests.post(f"{BASE_URL}/api/workflows/{wf_id}/execute", headers=headers, json={"input": {"text": "..."}})

POST /api/workflows//execute/stream

Execute with streaming SSE.
id
string
required
Workflow ID
requests.post(f"{BASE_URL}/api/workflows/{wf_id}/execute/stream", headers=headers, json={"input": {"text": "..."}}, stream=True)

GET /api/workflows//executions

List execution history.
id
string
required
Workflow ID
requests.get(f"{BASE_URL}/api/workflows/{wf_id}/executions", headers=headers)

GET /api/workflows//executions//logs

Get per-block execution logs.
id
string
required
Workflow ID
eid
string
required
Execution ID
requests.get(f"{BASE_URL}/api/workflows/{wf_id}/executions/{exec_id}/logs", headers=headers)

Error Responses

StatusCodeDescription
400invalid_graphThe workflow graph is invalid (e.g., cycles, disconnected blocks, missing required config)
404workflow_not_foundNo workflow exists with the given ID
409already_deployedThe workflow is already deployed — undeploy first to make changes