Skip to content

[BUG]: Need option for custom url in agent card for a vertex ai A2A agent #4776

@chnd777

Description

@chnd777

🔴 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

  1. Install google-cloud-aiplatform with Vertex AI extras
  2. Configure an AgentCard with a custom URL:
   agent = AgentCard(
       name="agent-name",
       description="A helpful assistant agent that can answer questions.",
       url="https://custom.url.com/",
   )
  1. Deploy the agent
  2. Fetch the agent card and inspect the url field

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%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent engine[Component] This issue is related to Vertex AI Agent Engine

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions