Workflows

Workflows & Pipelines

Individual agent calls are useful. Chaining them into automated workflows that branch, loop, and run in parallel — that's where the real leverage is. Open Astra includes a workflow engine with conditionals and parallel execution, plus a simpler pipeline system for sequential agent chaining. Add prompt management, A/B testing, and webhooks and you have a complete automation platform.

Workflows, pipelines, experimentation, and prompt management are all included in every license. Build as many workflows as you need.

Why this matters

  • Automate multi-step processes — research, draft, review, publish in one API call with branching and error handling
  • Test before you commit — A/B test different agent configurations, run parameter sweeps, and hold tournaments to find the best setup
  • Manage prompts as code — version, hot-swap, and roll back prompts without redeploying
  • Connect to your stack — webhooks with HMAC signing push events to your CI, Slack, or any HTTP endpoint

Workflows

A workflow consists of named steps that can be agent calls, tool invocations, conditions, or parallel groups.

bash
# Create a workflow
curl -X POST http://localhost:3000/workflows \
  -H "Authorization: Bearer ${JWT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Content Pipeline",
    "description": "Research, draft, review, and publish",
    "definition": {
      "steps": [
        { "type": "agent", "id": "research", "agentId": "research-agent", "message": "Research {{topic}}", "outputVar": "research_output" },
        { "type": "agent", "id": "draft", "agentId": "writer-agent", "message": "Write article using: {{research_output}}", "outputVar": "draft" },
        { "type": "agent", "id": "review", "agentId": "review-agent", "message": "Review: {{draft}}", "outputVar": "feedback" },
        { "type": "condition", "id": "check", "expr": "feedback.approved", "then": "publish", "else": "revise" },
        { "type": "agent", "id": "publish", "agentId": "ops-agent", "message": "Publish: {{draft}}" },
        { "type": "agent", "id": "revise", "agentId": "writer-agent", "message": "Revise using: {{feedback}}", "outputVar": "draft" }
      ]
    }
  }'

Step types

TypeDescriptionKey fields
agentCall an agent with a messageagentId, message, outputVar
toolInvoke a tool directlytoolName, params, outputVar
conditionBranch based on an expressionexpr, then, else
parallelRun multiple steps concurrentlysteps[]

Executing a workflow

bash
# Execute a workflow
curl -X POST http://localhost:3000/workflows/wf_abc123/run \
  -H "Authorization: Bearer ${JWT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "topic": "Edge computing for IoT" } }'

# Response
{
  "run": {
    "id": "run_def456",
    "status": "success",
    "vars": { "research_output": "...", "draft": "...", "feedback": "..." },
    "error": null
  }
}

Pipelines

Pipelines are simpler than workflows — a linear chain of agent stages. Each stage's output becomes the next stage's input. Max 20 stages, max 100K input characters.

bash
# Run a sequential pipeline (chain agents in order)
curl -X POST http://localhost:3000/pipelines/run \
  -H "Authorization: Bearer ${JWT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "Analyze the security posture of our API gateway",
    "stages": [
      { "agentId": "security-agent" },
      { "agentId": "report-agent", "systemPromptSuffix": "Format as executive summary" }
    ]
  }'

Pipeline templates

Pipeline templates are predefined in a pipeline-templates.yml file. List available templates with GET /pipeline-templates and execute them with POST /pipeline-templates/execute.

More workflow features

FeatureDescriptionDocs
Prompt ManagementVersion, hot-swap, and restore prompts with TTL-based overridesPrompts
ExperimentationPlayground, batch inference, A/B tests, parameter sweeps, and tournamentsExperimentation
WebhooksHMAC-signed event delivery with test mode and delivery inspectorWebhooks

Endpoint reference

MethodEndpointDescription
POST/workflowsCreate workflow
GET/workflowsList workflows (limit 100)
GET/workflows/:idGet workflow
DELETE/workflows/:idDelete workflow
POST/workflows/:id/runExecute workflow
GET/workflows/:id/runsList runs (limit 50)
POST/pipelines/runRun pipeline
GET/pipeline-templatesList templates
POST/pipeline-templates/executeExecute template