Cannot run an agent by following the quickstart
I follow the quickstart to write a demo, there is my folder structure:
backend/agents/
├──.venv/
├── creator_checker/
│ ├── __init__.py
│ ├── agent.py
and here is my code:
from google.adk.agents.llm_agent import Agent
root_agent = Agent(
model='gemini-2.5-flash',
name='creator_checker',
description='A helpful assistant for user questions.',
instruction='Answer user questions to the best of your knowledge',
)
And when I try to the agent in the agents folder with the command adk run creator_checker, I met this error:
ValueError: App name mismatch detected. The runner is configured with app name "creator_checker", but the root agent was loaded from "\backend\agents.venv", which implies app name ".venv". Rename the App or its directory so the names match before running the agent.
What's wrong ith my code?
Actually the quickstart doc was so clear:
Install ADK by running the following command:
Which folder? The agent folder or the parent folder?
Run your agent using the adk run command-line tool.
Also which folder?
Also I found if I run the code in my Windows 10 system, it require admin access which doesn't mentioned in the doc
The error is reproducible when you run the same in the agent folder, the code will work when you run it in the parent folder.
https://github.com/google/adk-python/blob/af74eba695c7f4d4b811ed4e4f26221994fc4cb6/src/google/adk/runners.py#L240
You can rename the folder agents->'other name' for temporarily
Hi, there are a changes coming to fix in the newest release! https://github.com/google/adk-python/commit/dc4975dea9fb79ad887460659f8f397a537ee38f https://github.com/google/adk-python/commit/dc4975dea9fb79ad887460659f8f397a537ee38f, please reopen if these issues come back up after the newest release!