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.

What is a Workflow?

A Workflow is a directed acyclic graph (DAG) of blocks connected by edges. Each block performs a specific action — calling an LLM, running code, evaluating a condition, or executing an agent. Data flows from block to block through the edges. Unlike orchestrations (where the coordinator decides what happens), workflows follow a fixed, predetermined path every time.

Block Types

BlockDescriptionKey Config
inputEntry point — accepts user input or webhook payloadVariable name for downstream blocks
outputExit point — returns the workflow resultResult template with block references
llmCalls a language model with a prompt templateModel, temperature, system prompt, input references
agentRuns an existing agent with a messageAgent ID, message template
conditionBranches the flow based on a boolean expressionJavaScript expression evaluated against block outputs
codeExecutes custom Python or JavaScript codeLanguage, source code, input variable mappings

Graph Execution

When you execute a workflow, the engine evaluates blocks in topological order. Each block receives the outputs of its upstream blocks as input. Condition blocks create branches — only the matching branch continues execution. The workflow finishes when all output blocks have been reached.
Workflow execution DAG: Input block → LLM block (processes input) → Condition block (branches based on result) → Branch A: Output A / Branch B: Output B. Blocks are connected by directional edges showing data flow.

Programmatic vs Copilot

You can build workflows two ways. The programmatic approach uses the PUT /api/workflows/{id}/graph endpoint to define blocks and edges as JSON. The Copilot approach uses natural language — describe what you want, and the AI copilot generates the workflow graph for you. Both produce the same underlying graph structure.

Deployment & Webhooks

Workflows can be deployed and armed for webhook execution. Once armed, you get a webhook URL and secret. External systems can trigger the workflow by POSTing to the webhook URL. Each arm produces a single-use webhook — after it fires, you need to re-arm for the next execution.
Webhook securityThe webhook secret is returned when you arm the workflow. Include it in your webhook payload to verify that the request is legitimate. Each arm generates a new secret.

Next Steps

Workflows (Programmatic)

Build a workflow step by step using the API.

Workflows (Copilot)

Build a workflow using natural language.

Workflows API Reference

Full endpoint documentation.