apache/beam · error · ValueError
Agent did not return a response
Error message
Agent {runner.agent.name} did not return a response What it means
The ADK runner's event stream finished without any event marked is_final_response(), meaning the agent never completed a turn; _invoke_agent reached the end of run_async and has no result to yield for this element.
Solutions
- Check agent configuration for runaway tool loops or missing final-answer behavior
- Enable ADK tracing/logs to see which event the run ended on and fix the agent flow
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at sdks/python/apache_beam/ml/inference/agent_development_kit.py:305 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/5cc59cef5062e586.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/ml/inference/agent_development_kit.py:305
await runner.session_service.create_session(
app_name=app_name,
user_id=user_id,
session_id=session_id,
)
async for event in runner.run_async(
user_id=user_id,
session_id=session_id,
new_message=message,
):
if event.is_final_response():
if event.content and event.content.parts:
return "".join([p.text for p in event.content.parts])
raise ValueError(
f"Agent {runner.agent.name} did not return a response, "
f"final event: {event}")
raise ValueError(f"Agent {runner.agent.name} did not return a response")
def get_metrics_namespace(self) -> str:
return "ADKAgentModelHandler"
View on GitHub (pinned to 12126d8942)