Skip to content

feat(subagents): per-agent model selection in frontmatter #649

@Aaronontheweb

Description

@Aaronontheweb

Context

Once the single-file markdown format for sub-agents lands (#647) and multi-model provider architecture exists (#648), the natural next step is letting each sub-agent declare its preferred model inside its frontmatter. Example:

---
name: summarizer
description: Summarize documents and content concisely
tools: [file_read]
model: local-qwen-small    # or "anthropic/claude-haiku"
timeoutSeconds: 60
---

You are a summarization specialist...

Today the only knob is modelRole: Compaction | Main | Fallback, which routes through the three hard-coded roles in NetclawChatClientProvider. That's too coarse: "Compaction" doesn't mean anything semantic about which model — it means "whatever we happened to wire to the Compaction role". Once there are multiple models in play, agents should be able to name their preferred provider/model directly.

Blocked on

Also gated on

Proposal

Add an optional model: field to sub-agent frontmatter. Fall back to modelRole when absent (backward compatible). When both are set, model wins.

Schema:

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsubagentsspawn_agent, SubAgentActor, definition loader, discovery context layer, and related features

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions