Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error with default-app-name when creating session in ADK agent deployment on AI Engine

HI all

We deployed a demo agent to AI Engine using ADK for testing, using VertexAiSessionService for session persistence. Then, after getting the agent instance by calling agent_engines.get("xxxx"), when we call create_session, it reports an error saying 'App name default-app-name is not valid'."
The complete error message as follows๏ผš

Error Details: {"detail":"Agent Engine Error: An error occurred during invocation. Exception: App name default-app-name is not valid. It should either be the full ReasoningEngine resource name, or the reasoning engine id.\nRequest Data: {'user_id': 'test_user_123'}"}
How to solve this error๏ผŸ
0 1 55
1 REPLY 1

Hi @kevinfe,

Welcome to the Google Cloud Community!

Your AI Engine agent appears to be unable to establish user sessions due to the error: "App name default-app-name is not valid."

Here are the potential ways that might help with your use case:

  • Permission: Make sure that the service account used by your Agent Engine has the permissions it needs to access your Reasoning Engine. Your Agent Engine typically requires the roles/aiplatform.user role on the Reasoning Engine project. If your Agent Engine and Reasoning Engine are in different projects, youโ€™ll likely need to grant cross-project access.
  • Google Cloud Logging: Check Google Cloud Logging for your Agent Engine and Reasoning Engine. Review the logs for error messages or warnings that could offer insights into the cause of the failure.
  • Review Configuration: Thoroughly review your config.yaml, deployment.yaml, and environment variables to make sure that all references to default-app-name have been removed.

Was this helpful? If so, please accept this answer as โ€œSolutionโ€. If you need additional assistance, reply here within 2 business days and Iโ€™ll be happy to help.