Soul ID
Soul IDAI AGENTS

⚑ 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 EN
Download .tar.gz

Rate this agent

Loading...

Sign in to rate this agent

Includes

  • βœ“ ORCHESTRATION.md

Info

Slug
budget-router
Lines
101
Words
571