AgentWorks

AgentWorks documentation

Tiered LLM Allocation

Overview

Tiered allocation is the workflow's auto-selection mode for runtime LLM choice.

The current resolver lives in agent_go/pkg/orchestrator/agents/workflow/step_based_workflow/tiered_llm.go.

Tiers

Default Tier per Agent Type

Agent Default Tier
Execution Tier 1 (High)
Learning Tier 2 (Medium)

Regular execution steps can adapt from High to Medium after three successful runs with the same step-description hash. Tier selection does not inspect the contents of the learnings folder, and Low is never selected automatically.

A validation or execution failure does not change the selected tier. Normal validation retries continue the same agent conversation with validator feedback, and the controller carries the failure into the final CONCERNS: summary for Pulse. Persistent model/tier changes belong to the LLM/cost/tool/runtime lens of Pulse workflow_review and the existing approval flow. Historical llm_ops_review records remain valid evidence but are no longer scheduled as a separate reviewer.

disable_tier_optimization=true still forces execution agents to Tier 1.

Selection Priority

Execution agents

Current priority in selectExecutionLLM():

  1. step execution_llm, always when set
  2. sub_agent_llm from context, unless dynamic tier selection is enabled
  3. tiered resolution
  4. no valid config => error

Inside tiered resolution, execution uses this order:

  1. workshop tier override from context
  2. preferred_tier from sub-agent context
  3. disable_tier_optimization=true => Tier 1
  4. evaluation mode => Tier 2
  5. default execution tier (Tier 1)

Learning agents

Current priority in selectLearningLLM():

  1. tiered learning resolution
  2. workflow primary model fallback
  3. no valid config => error

Phase LLM

Phase agents are independent of tiered maturity selection.

One exception exists:

Todo Task Behavior

Todo-task steps add two tier-related controls in agent_configs.

Orchestrator tier

Current priority in selectTodoTaskOrchestratorLLM():

  1. orchestrator_llm
  2. todo_task_orchestrator_tier
  3. 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:

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:

In manual mode:

Frontend Notes

Relevant UI files:

The UI still exposes:

Events

StepProgressUpdatedEvent can include:

This is populated for tiered start events using the default execution tier.

Key Files