Skip to content

Feature Request: Add planner and thinking_config support to YAML agent configuration #3905

@Yannholo

Description

@Yannholo

Please make sure you read the contribution guide and file the issues in the right place.
Contribution guide.

Is your feature request related to a problem? Please describe.

When defining agents via YAML configuration files, there is no way to configure the planner or thinking_config for LlmAgent.

The LlmAgent Python class supports a planner parameter that accepts a BuiltInPlanner with thinking_config, but the LlmAgentConfig YAML schema does not expose this field. Additionally, when attempting to set thinking_config directly within generate_content_config in YAML, the agent validation explicitly rejects it with:

Value error, Thinking config should be set via LlmAgent.planner.

This creates a situation where:

  1. thinking_config must be set via planner (enforced by validation)
  2. planner is not available in the YAML schema

As a result, users who prefer YAML-based agent definitions cannot leverage Gemini's thinking capabilities (e.g., gemini-2.5-flash with extended thinking) without rewriting their agents in Python.

Describe the solution you'd like

Add support for planner configuration in the YAML schema. This could look like:

name: my_agent
model: gemini-2.5-flash
instruction: |
  You are a helpful assistant.
planner:
  thinking_config:
    include_thoughts: true
    thinking_budget: 256

Alternatively, a simplified syntax could be supported:

name: my_agent
model: gemini-2.5-flash
instruction: |
  You are a helpful assistant.
thinking_config:
  include_thoughts: true
  thinking_budget: 256

Where the YAML loader would automatically wrap this in a BuiltInPlanner when constructing the agent.

Describe alternatives you've considered

Converting YAML agents to Python: This works but defeats the purpose of having YAML configuration support for simpler agent definitions. It also creates inconsistency in codebases that use both YAML and Python-defined agents.

Additional context

  • ADK version: 1.20.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions