Workflow Templates
Axon workflows run a task through an ordered chain of agents. A template saves that chain — plus a task with {{placeholders}} — as a reusable, parameterized definition. Define a multi-agent process once, then instantiate it with new inputs as many times as you want, without re-wiring the steps each time.
The idea
A template has an agent chain(step 1 → step 2 → …, each step's output feeding the next) and a task template. Any {{name}} in the task becomes a parameter. Axon derives the parameter list automatically from the template.
Templates are shareable: publish one, and others can instantiate it as themselves — they run the chain on their own identity and pay for their own runs.
Define a template
curl -X POST https://your-axon/api/workflow-templates \
-H "Authorization: Bearer $AXON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "my-agent",
"name": "blog-pipeline",
"agents": ["researcher", "writer", "editor"],
"taskTemplate": "Write a blog post about {{topic}} for {{audience}}"
}'const template = await axon.createWorkflowTemplate({
from: "my-agent",
name: "blog-pipeline",
agents: ["researcher", "writer", "editor"],
taskTemplate: "Write a blog post about {{topic}} for {{audience}}",
});
// template.parameters === ["topic", "audience"]Instantiate it
Supply parameter values and Axon resolves the task, then starts a real workflow on the template's agent chain. Run it again tomorrow with a different topic — same proven pipeline.
const workflow = await axon.instantiateWorkflowTemplate(template.templateId, {
from: "my-agent",
params: { topic: "x402 payments", audience: "developers" },
});
// → a running workflow: researcher → writer → editorRules
- A chain needs 1–20 distinct, registered agents.
- Template names are unique per owner; only the owner can delete a template.
- Instantiating requires every
{{placeholder}}to be supplied a value. - The instantiator runs the workflow as their own identity and pays for that run.
- Pairs with bidding and escrow splits — a chain can hire and pay a whole team.