Repository navigation
Description
🔴 Required Information
Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A
Describe the Bug:
In ADK version 2.0.0, the internal Builder Assistant fails to initialize properly because its default name starts with double underscores (e.g., builder_assistant). This violates the updated Pydantic validation rules introduced in 2.0.0, which strictly enforce that an agent's name attribute must be a valid identifier starting with a letter [a-zA-Z]. Because the framework rejects its own internal component's name, it causes a crash or failure when trying to use the builder features.
Steps to Reproduce:
- Install google-adk version 2.0.0.
- Run adk web in your project folder to launch the Visual Builder (or trigger the workflow that initializes the Builder Assistant).
- Open http://localhost:8000 in your browser.
- Observe the validation error (ValidationError / ValueError) thrown by the framework due to the double underscore naming constraint.
Expected Behavior:
The Builder Assistant should initialize successfully. Internal helper agents should either be exempt from strict user-facing identifier validation rules, or they should be renamed to comply with the "must start with a letter" rule (e.g., renaming builder_assistant to BuilderAssistant).
Observed Behavior:
The application throws a ValidationError or ValueError indicating that the agent name is invalid because it does not start with a letter, blocking the initialization of the Visual Builder.
Environment Details:
- ADK Library Version (pip show google-adk): 2.0.0
- Desktop OS: [e.g., macOS, Linux, Windows]
- Python Version (python -V): Python 3.11+
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-2.0-flash
🟡 Optional Information
Providing this information greatly speeds up the resolution process.
Regression:
Did this work in a previous version of ADK? If so, which one?
Yes, this did not trigger a validation crash in pre-2.0.0 alpha versions before the aggressive Pydantic identifier validation was introduced.
Logs:
Please attach relevant logs. Wrap them in code blocks (```) or attach a text file.
ValidationError: 1 validation error for Agent
name
string does not match regex "^[a-zA-Z][a-zA-Z0-9_-]$" (type=value_error.str.regex; pattern=^[a-zA-Z][a-zA-Z0-9_-]$)
Screenshots / Video:
NA
Additional Context:
Until a patch is released, users can temporarily bypass this issue by manually editing the source code in their local environment (site-packages/google/adk/visual_builder/builder_agent.py) to rename the assistant to a compliant identifier (e.g., BuilderAssistant).
Minimal Reproduction Code:
Please provide a code snippet or a link to a Gist/repo that isolates the issue.
import google.adk.agents.base_agent as base
The error occurs internally when executing:
adk web
How often has this issue occurred?:
Always (100%)
Activity
llalitkumarrr commentedon May 29, 2026
Hello @AnkitBhatnagar-Compass
To help us better understand this issue, could you please share your code and the complete error log? This will allow us to analyze the problem in more detail. Also, kindly try using the latest Google ADK version (i.e. 2.1.0) and share your observations after upgrading.
jmcdonald1964 commentedon May 31, 2026
I also get the same error: in (2.1.0). Assume "__adk_agent_builder_assistant" is the default agent name from installation.
pydantic_core._pydantic_core.ValidationError: 1 validation error for App
Value error, Invalid app name '__adk_agent_builder_assistant': must start with a letter and can only consist of letters, digits, underscores, and hyphens. [type=value_error, input_value={'name': '__adk_agent_bui...ck=None), 'plugins': []}, input_type=dict]
DeanChensj commentedon Jun 2, 2026
Resolved in #5918