diff --git a/src/google/adk/cli/fast_api.py b/src/google/adk/cli/fast_api.py index 7d93b54360..ab103edacf 100644 --- a/src/google/adk/cli/fast_api.py +++ b/src/google/adk/cli/fast_api.py @@ -375,7 +375,13 @@ async def _get_a2a_runner_async() -> Runner: ) for new_route in routes: - app.router.routes.append(new_route) + app.add_api_route( + new_route.path, + new_route.endpoint, + name=new_route.name, + methods=new_route.methods, + tags=["A2A Endpoints"], + ) logger.info("Successfully configured A2A agent: %s", app_name)