-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
🔴 Required Information
Describe the Bug
When configuring an AgentCard with a custom url parameter, the provided URL is ignored during deployment. Instead, the agent card URL is overwritten with an auto-generated URL in the format:
f"{base_url}/{api_version}/{self.api_resource.name}/a2a"
This is hardcoded in _agent_engines_utils.py#L1812, which completely overrides the user-supplied url field.
Steps to Reproduce
- Install
google-cloud-aiplatformwith Vertex AI extras - Configure an
AgentCardwith a custom URL:
agent = AgentCard(
name="agent-name",
description="A helpful assistant agent that can answer questions.",
url="https://custom.url.com/",
)- Deploy the agent
- Fetch the agent card and inspect the
urlfield
Expected Behavior
The url field in the fetched AgentCard should match the custom URL provided during configuration (https://custom.url.com/).
Observed Behavior
The url field is overwritten with an auto-generated URL:
{base_url}/{api_version}/{self.api_resource.name}/a2a
The custom URL provided in AgentCard(url=...) is completely ignored.
Environment Details
- This is reproducable in recent adk version
Model Information
- Irrelevant to model
🟡 Optional Information
Regression
Did this work in a previous version of ADK? If so, which one? No
Additional Context
The relevant code that overrides the URL can be found here:
vertexai/_genai/_agent_engines_utils.py#L1812
It appears that custom url support for AgentCard is either not implemented or unintentionally broken. Should users be able to supply a custom URL, or is this a design limitation that needs to be documented?
Minimal Reproduction Code
from vertexai.preview.reasoning_engines import AgentCard
agent = AgentCard(
name="agent-name",
description="A helpful assistant agent that can answer questions.",
url="https://custom.url.com/",
)
# Deploy agent, then fetch agent card
# Observed: agent_card.url != "https://custom.url.com/"
# Expected: agent_card.url == "https://custom.url.com/"How often has this issue occurred?
- Always (100%)