You don't need to rip out your REST APIs to join the agent-to-agent world. A new pattern from AWS and Cisco engineers shows how to add A2A protocol support to legacy REST services with nothing more than a thin translation layer, no business logic rewrites and no parallel infrastructures.
The Orthogonal Paradigms Problem
REST APIs and A2A (Agent-to-Agent) are designed for fundamentally different coordination models. REST optimizes for deterministic, stateless client-server calls against stable endpoints. A2A, built on JSON-RPC 2.0, optimizes for reasoning-driven agent collaboration with agent cards, capability negotiation, and multi-step task delegation.
Most enterprises already deployed REST-based agents before A2A was standardized. Those agents sit outside the emerging A2A framework. Running separate REST and A2A stacks doubles deployment pipelines, auth implementations, and operational costs. Refactoring to share business logic risks regressions and testing burdens.
The Agentic Overlay Pattern
An agentic overlay is a thin wrapper that sits on the same application or behind a gateway. It receives A2A messages, extracts the payload from the JSON-RPC 2.0 parts (data kind), and forwards it as a REST call to the unchanged existing endpoint. The overlay also translates REST responses back into A2A-compliant message objects.
A concrete example implementation shows a Flask-based calculator service gaining A2A endpoints (.well-known/agent-card.json, /a2a, /a2a/capabilities, /a2a/health) by adding about 150 lines of Python. The overlay passes authentication headers through to the REST backend and handles both SendMessage and SendStreamingMessage methods under A2A Spec 0.3.
Two Implementation Paths
For single-service use cases, you add the overlay directly into the application. The same Flask app registers both REST blueprints and A2A routes, running on the same host and port. This works well for supervisor agents that need limited agentic scope, such as intent classification and routing.
For multi-service orchestration, Amazon Bedrock AgentCore Gateway decouples the overlay from any single application. One agentic overlay can front up to 10 targets per gateway, coordinating services like an order-of-operations endpoint and an arithmetic endpoint to handle compound expressions. AgentCore Identity supports OAuth 2.0 providers (Okta, GitHub, Slack), and AgentCore Observability feeds metrics, logs, and spans into Amazon CloudWatch.
What This Enables Next
A2A isn't a new API. It's a new interface to your existing API. That shift makes adoption an incremental retrofit instead of a rewrite. Enterprises can now bring REST-based agents into the standardized A2A ecosystem without rebuilding stable, production-tested systems. The calculator example code is available for Flask, and AgentCore provides the infrastructure for production-scale deployments.
Source: Retrofit, don't rebuild: Agentic overlays for transforming legacy enterprise services
Domain: aws.amazon.com
Comments load interactively on the live page.