-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Session not found errors when using adk web with an App object #3522
Copy link
Copy link
Closed
Labels
web[Component] This issue will be transferred to adk-web[Component] This issue will be transferred to adk-web
Description
Describe the bug
When using adk web to test an agent, if the agent uses an App object then a Session not found error is raised at the very first input event.
To Reproduce
- Create a new agent with
adk create - Use a very basic agent, as follows
from google.adk.agents.llm_agent import Agent
from google.adk.apps import App
root_agent = Agent(
model='gemini-2.5-flash',
name='greeter_agent',
description='An agent that provides a friendly greeting.',
instruction='Reply with Hello, World!',
)
app = App(
name="agents",
root_agent=root_agent,
)- Run the UI with
adk web - Send any input to the agent
- You will see the following error in the console
2025-11-12 17:57:26,521 - ERROR - adk_web_server.py:1431 - Error in event_generator: Session not found: 294d0036-c513-4c60-b1b7-ee4a34e4ef09
Traceback (most recent call last):
File "/home/user/test-agent/.venv/lib/python3.12/site-packages/google/adk/cli/adk_web_server.py", line 1421, in event_generator
async for event in agen:
File "/home/user/test-agent/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 443, in run_async
async for event in agen:
File "/home/user/test-agent/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 380, in _run_with_trace
raise ValueError(message)
ValueError: Session not found: 294d0036-c513-4c60-b1b7-ee4a34e4ef09
- Comment out the
appdeclaration (i.e., leave only theroot_agentdeclaration), then try again - The agent works as expected
Expected behavior
The agent should return a response in both cases.
Screenshots
N/A
Desktop (please complete the following information):
- OS: Ubuntu Linux
- Python version(python -V): 3.12.3
- ADK version(pip show google-adk): 1.18.0
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-2.5-flash
Additional context
N/A
Reactions are currently unavailable
Metadata
Metadata
Labels
web[Component] This issue will be transferred to adk-web[Component] This issue will be transferred to adk-web