feat: per-role agent and model config in workflow YAML #432

Closed
opened 2026-05-23 09:51:15 +00:00 by xingyue · 0 comments
Owner

Background

Workflows use a single defaultAgent for all roles. As builtin agent gains delegation abilities, different roles may want different agents or models.

Proposal

Allow roles to specify agent and model in workflow YAML:

roles:
  planner:
    goal: "..."
    agent: builtin    # lightweight planning
    model: fast
  developer:
    goal: "..."  
    agent: builtin    # delegates to cursor via tool

Resolution Priority

CLI --agent > role.agent > agentOverrides > defaultAgent

Changes

  • RoleDefinition: add agent: string | null, model: string | null
  • resolveAgentConfig: check role def before config overrides
  • resolveModel: accept per-step model override

Related

  • WorkflowConfig.agentOverrides (existing)
  • Builtin agent delegation issues
## Background Workflows use a single `defaultAgent` for all roles. As builtin agent gains delegation abilities, different roles may want different agents or models. ## Proposal Allow roles to specify agent and model in workflow YAML: ```yaml roles: planner: goal: "..." agent: builtin # lightweight planning model: fast developer: goal: "..." agent: builtin # delegates to cursor via tool ``` ### Resolution Priority CLI --agent > role.agent > agentOverrides > defaultAgent ### Changes - `RoleDefinition`: add `agent: string | null`, `model: string | null` - `resolveAgentConfig`: check role def before config overrides - `resolveModel`: accept per-step model override ## Related - `WorkflowConfig.agentOverrides` (existing) - Builtin agent delegation issues
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#432