A three-agent research-and-report pipeline with hard ceilings on tokens, cost, and duration. When the ceiling is hit, remaining nodes are skipped instead of running — the workflow finishes with a successful status but partial output. This is the safer default for unattended production workloads.Documentation Index
Fetch the complete documentation index at: https://docs.sirenspec.dev/llms.txt
Use this file to discover all available pages before exploring further.
What it demonstrates
- The top-level
budget:block on_exceeded: skip_remaining— the workflow finishes cleanly instead of crashing- Per-node
max_tokens_per_call— each agent’s response is independently bounded - The
budgetblock embedded in the run summary, so callers can see how close they came to each ceiling
Run it
--trace flag prints the full JSON trace, including the new summary.budget block:
Workflow
docs/cookbook/budget-guarded/workflow.yaml
on_exceeded actions
| Mode | Behaviour when a ceiling is hit |
|---|---|
abort | The workflow fails with BudgetExceededError. |
warn | A warning is logged; execution continues to completion. |
skip_remaining | No further LLM calls are made; the run finishes with success status. |
Per-node max_tokens_per_call
max_tokens_per_call is forwarded to the provider as the max_tokens API
parameter so the model truncates its own response. Combined with the workflow
budget, this gives you two layers of protection: each individual call is bounded
and the cumulative spend is bounded.
Graph
Next steps
Content Approval
Pause for a human reviewer mid-workflow.
Guardrails
Per-call guardrails like injection detection and PII redaction.