AgentWorks documentation
Tiered LLM Allocation
Overview
Tiered allocation is the workflow's auto-selection mode for runtime LLM choice.
- Manual mode: preset and step configs choose explicit models
- Tiered mode: the runtime resolves Tier 1/2/3 from a per-agent-type default plus a few explicit overrides
- Phase LLM: configured separately and not part of the tier resolver
The current resolver lives in agent_go/pkg/orchestrator/agents/workflow/step_based_workflow/tiered_llm.go.
Tiers
- Tier 1: High reasoning
- Tier 2: Medium reasoning
- Tier 3: Low reasoning
Default Tier per Agent Type
| Agent | Default Tier |
|---|---|
| Execution | Tier 1 (High) |
| Learning | Tier 2 (Medium) |
| Conditional | Tier 1 (High) |
Learning-maturity-based auto-downgrade has been removed. Tier selection no longer
looks at the contents of the learnings folder. To run a step on a cheaper tier,
use one of the explicit overrides below (preferred_tier, workshop tier
argument, or the per-step execution_llm override).
disable_tier_optimization=true still forces execution and conditional agents
to Tier 1.
Selection Priority
Execution agents
Current priority in selectExecutionLLM():
- step
execution_llm, always when set sub_agent_llmfrom context, unless dynamic tier selection is enabled- tiered resolution
- no valid config => error
Inside tiered resolution, execution uses this order:
- workshop tier override from context
preferred_tierfrom sub-agent contextdisable_tier_optimization=true=> Tier 1- evaluation mode => Tier 2
- default execution tier (Tier 1)
Learning agents
Current priority in selectLearningLLM():
- tiered learning resolution
- workflow primary model fallback
- no valid config => error
Conditional agents
Conditional agents use the tier resolver directly:
disable_tier_optimization=true=> Tier 1- otherwise default conditional tier (Tier 1)
Phase LLM
Phase agents are independent of tiered maturity selection.
- planning/evaluation-design/debugging-style phase work uses the configured
presetPhaseLLM - the phase LLM is set separately from Tier 1/2/3
- if no phase LLM is configured, those phase paths can fail
One exception exists:
- final output generation prefers Tier 2 in tiered mode and only falls back to
presetPhaseLLMif Tier 2 cannot be resolved
Todo Task Behavior
Todo-task steps add two tier-related controls in agent_configs.
Orchestrator tier
orchestrator_llm: exact model override, highest prioritytodo_task_orchestrator_tier: explicit tier override in tiered mode- default: Tier 1
Current priority in selectTodoTaskOrchestratorLLM():
orchestrator_llmtodo_task_orchestrator_tier- Tier 1
Sub-agent tier selection
preferred_tier is always a REQUIRED parameter on call_sub_agent and
call_generic_agent. The orchestrator must reason about task difficulty on
every delegation — this is prompt discipline, not a conditional feature. Calls
without preferred_tier are rejected by the handler.
How the chosen tier translates into an actual model depends on runtime config:
- Tier resolver configured + no pinned
execution_llm→preferred_tierresolves to the matching Tier 1/2/3 model. Cost optimization is active. - Parent step has
execution_llmset →sub_agent_llmcontext key wins at resolution inselectExecutionLLM. The pinned LLM is used for all sub-agents. Thepreferred_tiervalue is recorded in events/logs but does not change model choice. - No tier resolver + no pin → falls through to the orchestrator's parent
LLM.
preferred_tieris informational only.
There is no enable_dynamic_tier_selection flag and no way to turn tier
selection off. If you want all sub-agents to share one model, pin
execution_llm on the parent step — the tier parameter stays required but its
value is ignored at resolution time.
Manual vs Tiered Mode
In tiered mode:
- per-step
execution_llmstill overrides the execution selector directly - per-step
learning_llmhas been removed; use tiered allocation instead - runtime otherwise uses the tier resolver
orchestrator_llmandsub_agent_llmstill work because they are separate todo-task overrides
In manual mode:
- explicit step/preset model config is used
- tier resolver is absent
Frontend Notes
Relevant UI files:
frontend/src/components/PresetModal.tsxfrontend/src/components/WorkflowLLMConfigModal.tsxfrontend/src/components/events/orchestrator/StepEditPanel.tsxfrontend/src/components/workflow/BulkStepConfigModal.tsx
The UI still exposes:
- preset tier configuration
- independent Phase LLM
- todo-task orchestrator tier
- dynamic tier selection toggle
- direct
orchestrator_llmandsub_agent_llmoverrides
Events
StepProgressUpdatedEvent can include:
used_tierused_tier_label
This is populated for tiered start events using the default execution tier.
Key Files
agent_go/pkg/orchestrator/agents/workflow/step_based_workflow/tiered_llm.goagent_go/pkg/orchestrator/agents/workflow/step_based_workflow/controller_agent_factory.goagent_go/pkg/orchestrator/agents/workflow/step_based_workflow/controller_todo_task.goagent_go/pkg/orchestrator/agents/workflow/step_based_workflow/controller.goagent_go/pkg/orchestrator/agents/workflow/step_based_workflow/final_output.goagent_go/pkg/orchestrator/agents/workflow/step_based_workflow/workflow_events.go