adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Making a GraphQL Toolset (just like OpenAPI Toolset) and failing deployment to agent engine

Open rushiiltecho opened this issue 11 months ago • 1 comments

Despite the agent working on the local playground, the deployment is failing through Agent Engine. Here is an attachment document with the description of this issue: https://docs.google.com/document/d/1mfKr-VkjZ11JEo0OK19l8Gv1LbWXKgAILMUHmr_s9tA/edit?usp=sharing

Refer to the following github repo for trying to recreate the issue: https://github.com/Ashwin-Python/linear_graphql_adk_agent

Since Linear is based on the GraphQL Ecosystem of API Documentation, we came up with this approach and were able to make it work for the local playground; Though, upon trying deployment, it is failing "silently" without any errors except, it is giving:

google.api_core.exceptions.InvalidArgument: 400 Reasoning Engine resource [projects/1023299171373/locations/us-central1/reasoningEngines/5158851382920347648] failed to start and cannot serve traffic. Please refer to our documentation (https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/troubleshooting/deploy) for checking logs and other troubleshooting tips. 3: Reasoning Engine resource [projects/1023299171373/locations/us-central1/reasoningEngines/5158851382920347648] failed to start and cannot serve traffic. Please refer to our documentation (https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/troubleshooting/deploy) for checking logs and other troubleshooting tips.
We tried deploying Google Drive Agent (supported by google-adk internally) with the same deployment script to understand if the issue is with the deployment script but it turned out to be correctly deploying. Upon more searching through the documentation and other sources, it was a plausible pickling/unpickling issue on Agent Engine side but nothing concrete in the code suggests that (neither do the Logs suggest any issues) before it breaks and shows the above error message.

Would be happy to give more context, if required. This is an urgent requirement and any help would be appreciated from the community as well

rushiiltecho avatar Dec 04 '25 08:12 rushiiltecho

We have tried with this script (below) and it turned out to not be a pickling issue, and yes to the best of our knowledge we're using these pickle-safe good patterns.

import pickle
from agent import root_agent # Or however you instantiate your main agent

# This will raise an error if the agent or any of its tools are not pickleable.
try:
    pickled_agent = pickle.dumps(root_agent)
    print("✅ Agent was successfully pickled!")

    unpickled_agent = pickle.loads(pickled_agent)
    print("✅ Agent was successfully unpickled!")

except Exception as e:
    print(f"❌ Pickling failed: {e}")

So it doesn't seem to be a pickling issue as this script succeeded. Please help.

rushiiltecho avatar Dec 04 '25 08:12 rushiiltecho