Skip to content

[FEATURE] Support custom agent card path in Python A2AAgent #2155

@gtadamson

Description

@gtadamson

Problem Statement

The Python A2AAgent assumes the agent card is located at a standard well-known path derived from the endpoint, with no way to override it.

This makes it difficult to integrate with A2A-compatible providers that do not expose their agent card at the canonical location.

Proposed Solution

Add the agent card discovery path as input, similar to the TypeScript SDK’s agentCardPath.

Reference (TypeScript SDK docs): https://strandsagents.com/docs/user-guide/concepts/multi-agent/agent-to-agent/#configuration-options

Note: the A2ACardResolver needs to change as well because it adds a slash between the URL and the agent card path which isn't valid for all use cases.

Use Case

Elastic Agent Builder exposes its A2A agent card at:

GET /api/agent_builder/a2a/{agentId}.json

and its execution endpoint at:

POST /api/agent_builder/a2a/{agentId}

Because this does not use the standard well-known path, Strands Python cannot discover the card in this integration pattern, even though the provider is A2A-compatible.

Reference (Elastic docs): https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/a2a-server#retrieve-agent-metadata-get

Alternatives Solutions

Right now I'm overriding the get_agent_card method locally, which is not ideal. I'm open to other ideas!

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions