Skip to content

AttributeError: 'AgentEngine' object has no attribute 'async_create_session' after ADK 2.4 upgrade #6369

Description

@jorgemontalvao-tre-ba

Here's a clearer and more professional version of your bug report:


Yesterday, after noticing the ADK 2.4 release, I upgraded all dependencies to ensure my environment was fully up to date:

uv tool upgrade
uv lock --upgrade

I then created a new minimal project following the official guide:

https://google.github.io/agents-cli/guide/getting-started/#prefer-to-type-commands-yourself

# Create a minimal agent project
agents-cli create my-agent --prototype --yes

# Install dependencies and start the dev playground
cd my-agent
agents-cli install
agents-cli playground

Next, I deployed the agent to Google Cloud:

agents-cli deploy

The deployment completed successfully, and I was also able to access and test the agent in the GCP Agent Platform Playground without any issues.

Following the documentation for obtaining an agent instance:

https://docs.cloud.google.com/gemini-enterprise-agent-platform/scale/runtime/use-an-adk-agent#get-agent-instance

the following call works correctly:

adk_app = client.agent_engines.get(...)

However, when I follow the next step in the documentation to create a session:

https://docs.cloud.google.com/gemini-enterprise-agent-platform/scale/runtime/use-an-adk-agent#create-session

I receive the error shown below:

AttributeError: 'AgentEngine' object has no attribute 'async_create_session'

Image

Additionally, according to the "Supported Operations" section of the documentation:

https://docs.cloud.google.com/gemini-enterprise-agent-platform/scale/runtime/use-an-adk-agent#supported-operations

the following call returns no results:

adk_app.operation_schemas()

Based on my previous experience, I would expect this method to return a JSON document listing the available operations, including async_create_session.

While investigating the issue, I noticed that the generated agents-cli-manifest.yaml contains:

is_a2a: true

In older projects that work correctly, this value is set to false. I suspected this might be related to the problem, but even after manually changing it to false before deployment and redeploying the agent, the issue persists.

Expected behavior

  • adk_app.operation_schemas() should return the supported operation schemas.
  • The returned operations should include async_create_session.
  • Session creation should work as described in the documentation.

Actual behavior

  • adk_app.operation_schemas() returns no schemas.
  • Session creation fails with the reported error.
  • Changing is_a2a to false does not resolve the issue.

Metadata

Metadata

Labels

agent engine[Component] This issue is related to Vertex AI Agent Enginerequest clarification[Status] The maintainer need clarification or more information from the author

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions