-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
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:
thinking_configmust be set viaplanner(enforced by validation)planneris 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: 256Alternatively, 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: 256Where 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