β‘ Workflows
Budget Router (cost-optimized task routing)
Route tasks to the most cost-efficient agent capable of handling them, using expensive/powerful agents only when the task complexity justifies it.
Bundle files
πORCHESTRATION.mdβ Orchestration
1# ORCHESTRATION.md
2
3## Diagram
4
5 ββββββββββββββββββββββββββββββββββββββββββββ
6 β Incoming Task β
7 ββββββββββββββββββββββ¬ββββββββββββββββββββββ
8 βΌ
9 ββββββββββββββββββββββββββββββββββββββββββββ
10 β Budget Router β
11 β (classify task complexity + cost) β
12 ββββββββββββββββββββββ¬ββββββββββββββββββββββ
13 βΌ
14 ββββββββββββββββββββ
15 β Task tier? β
16 ββββββ¬βββββββ¬βββββββ
17 low β mid β high
18 βββββββββββΌβββββββΌβββββββββββ
19 βΌ βΌ βΌ β
20 βββββββββββ ββββββββ ββββββββββ β
21 β Lite β β Mid β βPremium β β
22 β Agent β βAgent β β Agent β β
23 β(fast/ β β(bal- β β(best β β
24 β cheap) β βanced)β βquality)β β
25 ββββββ¬βββββ ββββ¬ββββ βββββ¬βββββ β
26 β β β β
27 βΌ βΌ βΌ β
28 ββββββββββββββββββββββββββββββββ β
29 β Quality Gate (spot-check) β β
30 ββββββββββββββββ¬ββββββββββββββββ β
31 pass β fail β
32 βββββββββββ΄ββββββββββ β
33 βΌ βΌ β
34 ββββββββββββ ββββββββββββββββ β
35 β Deliver β β Escalate to βββ
36 ββββββββββββ β higher tier β
37 ββββββββββββββββ
38
39
40## Workflow
41Budget Router (cost-optimized task routing)
42
43## Objective
44Route tasks to the most cost-efficient agent capable of handling them, using expensive/powerful agents only when the task complexity justifies it.
45
46## Roles
47- **Budget Router:** classifies incoming tasks by complexity and routes to the appropriate tier.
48- **Lite Agent:** handles simple, routine tasks (fast model, low cost).
49- **Mid Agent:** handles moderate complexity (balanced model).
50- **Premium Agent:** handles complex, high-stakes tasks (best model, highest cost).
51- **Quality Gate:** spot-checks outputs to ensure the chosen tier was adequate.
52
53## When to use
54- High-volume task processing where cost matters.
55- Mixed workloads with varying complexity (support tickets, code reviews, content).
56- When you have agents backed by different models (e.g., GPT-4o-mini vs Claude Opus).
57- Budget-constrained environments that still need quality guarantees.
58
59## Protocol
601. Task arrives at Budget Router.
612. Router classifies task complexity using heuristics:
62 - **Low:** templated, lookup, simple Q&A, formatting.
63 - **Mid:** analysis, summarization, moderate reasoning.
64 - **High:** multi-step reasoning, creative, ambiguous, high-stakes.
653. Router dispatches to the corresponding agent tier.
664. Agent executes and returns result.
675. Quality Gate spot-checks a sample of results (configurable % per tier).
686. If quality fails β escalate to next higher tier and re-execute.
697. Track routing accuracy and adjust classification heuristics over time.
70
71## Tier definitions (example)
72| Tier | Model example | Cost | Speed | Use for |
73|---------|---------------------|------|--------|--------------------------------|
74| Lite | GPT-4o-mini, Haiku | $ | Fast | Templated, lookup, formatting |
75| Mid | GPT-4o, Sonnet | $$ | Medium | Analysis, summarization |
76| Premium | Claude Opus, o1 | $$$ | Slow | Complex reasoning, high-stakes |
77
78## Quality gate
79- **Spot-check rate:** 20% of Lite, 10% of Mid, 5% of Premium
80- **Evaluation:** automated rubric or a Premium agent reviewing the output
81- **Escalation:** if quality < threshold, re-route to next tier
82
83## Rules
84- Always start at the lowest tier that could handle the task (optimize for cost).
85- Never skip tiers during escalation (Lite β Mid β Premium, not Lite β Premium).
86- Track cost per task and cost savings vs. all-Premium baseline.
87- Classification heuristics are living rules β update based on escalation patterns.
88- Human override: users can force a specific tier for critical tasks.
89
90## Metrics
91- **Routing accuracy:** % of tasks that pass Quality Gate at first tier
92- **Cost savings:** actual spend vs. all-Premium baseline
93- **Escalation rate:** % of tasks that needed tier upgrade
94- **Average latency:** per tier
95
96## Deliverables
97- Task routing log (task, classification, tier, result, quality score)
98- Cost report (per tier, total, savings)
99- Escalation report (which tasks needed upgrade and why)
100- Classification accuracy trends
101
Lines: 101 | Words: 571
Install
Copy bundle to your OpenClaw workspace.
curl -fsSL https://raw.githubusercontent.com/cerealskill/openclaw-agents/main/install.sh | bash -s workflow budget-router ENRate this agent
Loading...
Sign in to rate this agent
Includes
- β ORCHESTRATION.md
Info
- Slug
- budget-router
- Lines
- 101
- Words
- 571
