Open
Description
We deployed a demo agent to Agent 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'.
Environment details
- OS type and version: MacOS
- Python version: 3.11
- pip version: 25.0
google-cloud-aiplatform
version: 1.89.0
Steps to reproduce
- Used ADK sample code to deploy an agent to Vertex AI Agent Engine
- Deployment was successful and received a resource name
- Tried to interact with the deployed agent using Vertex AI SDK
- All API calls fail with error "App name default-app-name is not valid"
Code example
import vertexai
from vertexai import agent_engines
from vertexai.preview.reasoning_engines import AdkApp
# Agent deployment code
app = AdkApp(
agent=root_agent,
enable_tracing=True,
env_vars=env_vars,
session_service_builder=session_service_builder
)
remote_agent = agent_engines.create(
app,
display_name="Travel Concierge",
requirements=[
"google-adk (>=0.0.2)",
"google-cloud-aiplatform[agent_engines] (>=1.88.0)",
"google-genai (>=1.5.0,<2.0.0)",
"pydantic (>=2.10.6,<3.0.0)",
"absl-py (>=2.2.1,<3.0.0)",
"pydantic (>=2.10.6,<3.0.0)",
"requests (>=2.32.3,<3.0.0)",
],
extra_packages=[
"./travel_concierge", # The main package
"./eval", # The initial state files
],
)
print(f"Created remote agent: {remote_agent.resource_name}")
# Attempting to use the deployed agent
vertexai.init(project=project_id, location=location, staging_bucket="gs://xxxxxxxx")
remote_agent = agent_engines.get("123124123123")
print(remote_agent.operation_schemas())
# This line fails with the error
sessions = remote_agent.list_sessions(user_id=user_id)
Stack trace
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}