Skip to content

[Feature Request]: Deprecate static "inherit" policy for subagents in favor of Domain-Based Auto-Routing #188

Description

@yhdmjywx

Problem Statement

A fundamental architectural flaw exists in how the framework delegates models to subagents. Currently, invoke_subagent uses an inherit policy by default, forcing subagents to use the parent agent's globally configured model.

However, as models evolve, the Application Domains between models like Gemini 3.1 Pro and 3.7 Flash have vastly diverged. Pro is specialized for deep logic and complex codebase refactoring, while Flash is specialized for extreme low-latency, high-concurrency, and massive context I/O.

Multi-agent workflows inherently decompose a macro-task into micro-tasks spanning these different domains. For example, a parent agent (running on Pro) might spawn a subagent to aggressively scrape 50 web pages. Forcing this scraper subagent to inherit Pro causes a severe Domain Mismatch. This doesn't just waste compute—it leads to fundamentally poor systemic effectiveness (e.g., high latency, rate limit throttling, and the Pro model "overthinking" simple text extraction).

Proposed Solution

I propose shifting the framework's philosophy from "User-Setting Priority" to true autonomous orchestration by introducing Domain-Based Auto-Routing:

  • Deprecate inherit as the absolute default. Introduce an auto mode for subagent model allocation.
  • When spawning a subagent, the framework (or the parent orchestrator) should evaluate the domain of the sub-task (e.g., Reasoning-heavy vs. Throughput-heavy) and automatically assign the appropriate model tier (e.g., pro vs. flash).
  • A true heterogeneous Multi-Agent system (MoA) must respect the specialized domains of its underlying models, rather than degrading into a monolithic clone of the parent agent.

Alternatives Considered

The current official guideline states: "default to inherit unless the user explicitly requests a different model."

This alternative forces users to heavily prompt-engineer their requests (e.g., constantly reminding the agent to "use a lightweight model for this subtask"). This shifts the orchestration burden entirely onto the user, which directly contradicts the core promise of an autonomous, self-configuring agentic framework.

Additional Context

As Antigravity targets enterprise-grade scaling, "right-sizing" compute based on task domain is not just a cost-saving measure—it is a critical requirement for workflow stability and speed. Addressing this domain mismatch will unlock the true potential of Pro and Flash working together harmoniously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions