Feature: Add Agent-to-Agent (A2A) Protocol Support with AgentCardBuilder #1245
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive support for the Agent-to-Agent (A2A) protocol by introducing the
AgentCardBuilder
class and associated documentation. This implementation serves as the foundational boilerplate code for all future A2A integrations within the OpenAI Agents SDK, providing a standardized way for agents to describe their capabilities and participate in agent-to-agent communication protocols.The
AgentCardBuilder
enables agents to generate standardized agent cards that describe their capabilities, skills, and metadata for interoperability with A2A servers and other agent systems, establishing the core infrastructure needed for broader A2A ecosystem integration.Key features:
/.well-known/agent.json
)Test plan
test_agent_card_builder.py
passa2a.utils
constants for well-known pathsa2a
dependency installation and usageThe functionality has been tested with:
Checks
a2a.md
documentation and updatedagents.md
make lint
andmake format
- All ruff and mypy checks passChanges Made
Core Implementation:
AgentCardBuilder
class insrc/agents/agent_card_builder.py
as foundational A2A infrastructureDocumentation:
docs/a2a.md
with A2A protocol documentationa2a
dependencydocs/agents.md
with A2A protocol referencea2a.md
to navigation inmkdocs.yml
Dependencies:
a2a = ["a2a-sdk>=0.2.16; python_version >= '3.10'"]
optional dependency inpyproject.toml
Features: