Hi All
I have an agent in Agent Engine. I’m able to test it trough the Playground and it works fine.
Now I’m trying to register it in the Gemini Enterprise.
I tried trough the UI, trough the make register-gemini-enterprise target and via the VeerMuchandi/agent_registration_tool tool. I can see the agents are registered but when I test them trough the Gemini Enterprise I get the following error:
{
“error”: {
“code”: 400,
“message”: “Agent finished execution without providing any response.”,
“status”: “FAILED_PRECONDITION”,
“details”: [
{
“@typetypetypetype”: “type .googleapis.com/google.rpc.ErrorInfo”,
“reason”: “AGENT_ENGINE_FAILED_PRECONDITION”,
“domain”: “discoveryengine . googleapis . com”
},
{
“@type”: “type.googleapis. com / google.rpc.RequestInfo”,
“requestId”: “assist_token:NMwKDAjf7uzIBhC1iOq0ARIkNjkxODFmZmEtMDAwMC0yYjg4LTgwNDEtNzQ3NDQ2M2VkY2Zk”
}
]
}
}
My adk is version 1.18.0.
How do I debug this? I can’t see any related sessions in the Agent Engine. In the error logs all I see is ValueError: Session not found …
Thank you for your time having a look at this.
got it working. Here are the steps:
-
adk create agent
-
do a standard deploy, not the accelerated one. Agent Engine - Agent Development Kit
-
register the agent trough the gemini enteprise ui. I waited for 3 weeks to get all the UI options rolled out.
-
use latest python and adk
-
use us-central1 region
I see same error, I am already using
google-cloud-aiplatform[agent_engines,adk]>=1.127.0 and google-adk>=1.18.0
Using us-central1 for agent engine, but Enterprise app is global
I am using Agent Engine deployment steps using agent_engine.create not express deployment.
In Log explorer this’s what I see
Traceback (most recent call last):\n File \“/usr/local/lib/python3.10/threading.py\”, line 1016, in _bootstrap_inner\n self.run()\n File \“/usr/local/lib/python3.10/threading.py\”, line 953, in run\n self._target(*self._args, **self._kwargs)\n File \“/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.10/lib/python3.10/site-packages/vertexai/preview/reasoning_engines/templates/adk.py\”, line 1042, in _asyncio_thread_main\n asyncio.run(_invoke_agent_async())\n File \“/usr/local/lib/python3.10/asyncio/runners.py\”, line 44, in run\n return loop.run_until_complete(main)\n File \“/usr/local/lib/python3.10/asyncio/base_events.py\”, line 649, in run_until_complete\n return future.result()\n File \“/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.10/lib/python3.10/site-packages/vertexai/preview/reasoning_engines/templates/adk.py\”, line 1015, in _invoke_agent_async\n for event in runner.run_async(\nTypeError: 'async_generator’ object is not iterable",
Same issue here unable to get any of the agents integrated. Latest one I tried was the ADK using the cookiecutter project as per doc and it fails as well
Traceback (most recent call last):
File “/code/app/api/factory/python_file_api_builder.py”, line 473, in _async_stream_json_generator
async for chunk in output:
File “/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.10/lib/python3.10/site-packages/vertexai/agent_engines/templates/adk.py”, line 1117, in streaming_agent_run_with_events
async for event in self._tmpl_attrs.get(“in_memory_runner”).run_async(
File “/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.10/lib/python3.10/site-packages/google/adk/runners.py”, line 443, in run_async
async for event in agen:
File “/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.10/lib/python3.10/site-packages/google/adk/runners.py”, line 380, in _run_with_trace
raise ValueError(message)
ValueError: Session not found: temp_session_2b6205c698ad11dd
I also have the same exact issue, trying to connect to a remote MCP server via the gemini enterprise authentication, but the agent fails with the same error.
Anyone found a fix?
From GCP Support , I got this answer: - To fix the issue, our product specialists recommend locking the package versions by google-cloud-aiplatform[adk, agent_engines]<=1.126.1 and redeploy the agent then register to Gemini Enterprise to see if the code can work. You confirmed that a different version combination resolved the issue on your end. Initially, yesterday with said configuration it didnt work for me, may be my agent was not rebuilding fine (?) but later it worked with these versions
1 Like
Thanks for your reply. Unfortunately my issue still persists, probably due to some code I added to handle the Oauth process for an MCP tool I’ve been trying to set up - can’t quite figure this out
Hey mate, the way to fix it, not sure why it fixes it yet but try the following
Install the latest version of the adk
run adk create agent
then adk deploy
For some reason hooking up this agent works
1 Like
That actually worked… But how and why? 