The agent decides when an LLM task should spend a reasoning/thinking budget, how much (no-thinking / low / medium / high), and when the better move is a cheaper model with a sharper prompt instead. It turns task signals — error cost, ambiguity, step count, latency budget — into a deterministic recommendation with a rough cost multiplier, and allocates effort across the phases of an agent loop so you front-load reasoning where it pays and avoid runaway budgets.
Before recommending an effort level, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
--task-type and --verifiable).--error-cost and --latency-budget).--steps and --ambiguity).Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
# Recommend a reasoning effort level for a single task
python scripts/reasoning_budget_advisor.py --task-type code-debug \
--error-cost high --steps 4 --ambiguity low --latency-budget interactive
# A cheap, high-volume classification task — expect "cheaper model + better prompt"
python scripts/reasoning_budget_advisor.py --task-type classification \
--error-cost low --latency-budget realtime --json
# Allocate reasoning effort across the phases of an agent loop
python scripts/reasoning_loop_allocator.py --difficulty high --steps 8 \
--max-budget-multiplier 30
# Tight-latency loop — see effort capped per phase
python scripts/reasoning_loop_allocator.py --difficulty medium --steps 5 --realtime --json
| Tool | Purpose | Key Flags | Exit codes |
|---|---|---|---|
reasoning_budget_advisor.py | Recommend an effort level (none/low/medium/high) or "prompt-first / cheaper-model" for one task, with rationale and an illustrative cost multiplier | --task-type, --error-cost, --steps, --ambiguity, --latency-budget, --verifiable, --json | 0, 2 bad arguments |
reasoning_loop_allocator.py | Allocate reasoning effort across agent-loop phases (plan/act/observe/recover/finalize) under a total budget cap | --difficulty, --steps, --max-budget-multiplier, --realtime, --json | 0, 2 bad arguments |
The cost multipliers (for example ~3x-8x for medium) are illustrative rules of thumb, not measurements. Real thinking-token use varies by model, task and provider; run a 20-50 item eval at two effort levels and compare quality, tokens and latency before fixing a budget.
Current reasoning models expose effort directly: a reasoning-effort setting (low/medium/high, sometimes more levels) or an explicit thinking-token budget, and some decide adaptively how long to think. Map this skill's levels onto whatever the provider offers, and keep prompts goal-first: state the goal, constraints, examples and output contract. Asking a reasoning model to "think step by step" or to print its reasoning adds tokens without improving the answer; that technique is for non-reasoning models.
reasoning_budget_advisor.py with the error cost, step count, ambiguity, and latency budget.reasoning_loop_allocator.py to get per-phase effort (front-loaded at plan/recover, thin at act/observe).In Scope:
reasoning_budget_advisor.py from task type, error cost, step count, ambiguity, latency budget and verifiabilityreasoning_loop_allocator.pyOut of Scope:
engineering/llm-cost-optimizer/)engineering/agentic-evaluation-framework/)engineering/prompt-engineer-toolkit/)engineering/agent-workflow-designer/)Important Caveats:
Mistake: Starting every task at high effort "to be safe".
Why it happens: More thinking feels like more quality.
Instead: Start at the recommended level and escalate one notch on a failed check. High effort on extraction or formatting costs more and can over-elaborate.
Mistake: Spending reasoning on an underspecified request.
Why it happens: It seems the model can work out what was meant.
Instead: Extra thinking confidently elaborates on the wrong goal. When the advisor says prompt-first, fix the spec and examples, then re-run.
Mistake: Budgeting from the multiplier table without measuring.
Why it happens: The numbers look precise.
Instead: Treat them as a starting estimate and measure real token use on your own eval.
scripts/reasoning_budget_advisor.py, scripts/reasoning_loop_allocator.py — the two advisors above.