Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
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 4 808
4 REPLIES 4

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.

 

 

 

For my test if I use session_service_builder to build app,  it will return this error, when I remove it, it will be fine
```

app = AdkApp(
agent=root_agent,
enable_tracing=True,
env_vars=env_vars,
session_service_builder=session_service_builder
)
```

Yes I'm in

<PII Removed by Staff>

Hello @kevinfe ,
The error suggests that the app name must be a valid full resource name, not just a placeholder.
Please use the full Reasoning Engine resource name or the correct reasoning engine ID when creating the session.