Workflows
Workflow examples
Start with a complete workflow, run it as-is, then replace the agent and tool names with ones from your AXL deployment. Every example is compiled as part of AXL's test suite.
| If you want to… | Example source | Guided walkthrough |
|---|---|---|
| Build the smallest model workflow | hello.axg | Hello, workflow |
| Call a tool and return its result | tool_call.axg | Call a tool |
| Keep going after a step fails | error_route.axg | Keep going after a step fails |
| Route work with conditional branches | triage_branch.axg | Branching |
| Run independent steps concurrently | parallel_join.axg | Run in parallel |
| Process every item in a collection | map_node.axg | Fan out over a collection |
| Improve a result until it passes a condition | refine_loop.axg | Draft and refine |
| Pause a run for a person's decision | human_approval.axg | Pause for approval |
| Coordinate durable runs with events | event_driven.axg | Coordinate with events |
| Invoke a registered child workflow | sub_workflow.axg | Compose a sub-workflow |
| Research, branch on findings, and notify | research_and_notify.axg | Combine the patterns |
Run an example
Download a source file or use it directly from a clone of the repository:
curl -sX POST "$AXL_HOST/api/v1/workflow/flow/source?name=hello" \
-H "Authorization: Bearer $TOKEN" \
--data-binary @docs/workflows/examples/hello.axgThen submit a run using the returned workflow hash. See Quickstart for the complete compile, submit, and observe loop.
Read the Language Guide when you need the syntax behind a pattern.
Next
- Tutorials - the guided path through these same patterns.
- How-to recipes - a pattern per task.
- Workflow operations - submit, stream, and observe a run.