Skip to content

Add support for A2A scenarios #88

@EMaher

Description

@EMaher

Title

Support Agent-to-Agent (A2A) APIs in apiops extract and apiops publish

Summary

Add support in apiops extract and apiops publish for API Management Agent-to-Agent (A2A) APIs as documented here:
https://learn.microsoft.com/en-us/azure/api-management/agent-to-agent-api

Background

When importing an A2A agent API, API Management supports specific runtime mediation and agent card transformations. apiops should round-trip these A2A APIs correctly (extract -> publish) without losing required A2A behavior.

Required A2A behavior to support

Runtime mediation + governance

  • Mediate JSON-RPC runtime operations to the A2A backend.
  • Enable governance and traffic control via APIM policies.

Observability attributes (when App Insights is enabled)

Ensure A2A-specific attributes are preserved/configurable according to OpenTelemetry GenAI semantic conventions:

  • genai.agent.id (from configured agent ID)
  • genai.agent.name (from API name)

Agent card transformations

Ensure publish/extract support APIM’s A2A agent card transformations:

  • Replace hostname with API Management instance hostname.
  • Set preferred transport protocol to JSON-RPC.
  • Remove other interfaces in additionalInterfaces.
  • Rewrite security requirements to include APIM subscription key requirement.

Known limitations to account for

  • Only JSON-RPC-based A2A agent APIs are supported.
  • Deserialization of outgoing response bodies is not supported.

Acceptance criteria

  • apiops extract can successfully extract A2A agent API artifacts.
  • apiops publish can successfully publish extracted A2A artifacts.
  • Round-trip (extract -> publish) preserves required A2A semantics and transforms.
  • Non-A2A behavior remains unchanged.
  • Documentation (if needed) reflects A2A support and limitations.

Testing requirements

  • Update the all-types round-trip integration to include an Agent-to-Agent scenario.
  • Add/adjust integration assertions for:
    • JSON-RPC mediation compatibility
    • Agent card transformation expectations
    • Required genai.agent.* observability metadata handling (where applicable)

Out of scope

  • Support for non-JSON-RPC A2A transports.
  • Outgoing response body deserialization enhancements beyond current APIM limitation.

Metadata

Metadata

Assignees

Labels

go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:apimexpertAssigned to ApimExpert (🔵 APIM Expert)type:featureNew capability
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions