◈ AWS AGENTCORE BLUEPRINTS
PART V · MULTI-AGENT AND ARCHITECTURE · CHAPTER 30 / 36
TOCCONSULTING.FR
AMAZON BEDROCK / ARCHITECTURE C01 / A2A

A2A AND MULTI-AGENTPRACTICAL

CHAPTER 30 / 36
TOPIC scaffold an A2A agent, run it, call it
REV 2026.07
IN PLAIN WORDS

You will scaffold an A2A agent with one command, run it, and call it over JSON-RPC, then see how a client discovers it through its Agent Card. Terms: A2A = the agent-to-agent protocol; serve_a2a = the SDK helper that runs the A2A server on port 9000; Agent Card = the JSON that advertises the agent's skills; message/send = the JSON-RPC method to talk to it.

[ 1 ] SCAFFOLD AND SERVE AN A2A AGENT (main.py is generated for you)
$ npm install -g @aws/agentcore $ agentcore create --protocol A2A # pick Strands (or LangGraph, Google ADK) $ agentcore dev # run locally (or: python main.py) # the server listens on port 9000 at /
# main.py (generated)
from strands import Agent, tool
from strands.multiagent.a2a.executor import StrandsA2AExecutor
from bedrock_agentcore.runtime import serve_a2a
from model.load import load_model

@tool
def add_numbers(a: int, b: int) -> int:
    """Return the sum of two numbers."""
    return a + b

agent = Agent(model=load_model(),
              system_prompt="You are a helpful assistant.", tools=[add_numbers])

if __name__ == "__main__":
    serve_a2a(StrandsA2AExecutor(agent))   # A2A server on port 9000
[ 2 ] CALL IT, AND READ ITS AGENT CARD
$ curl -X POST http://localhost:9000/ -H "Content-Type: application/json" -d '{ "jsonrpc":"2.0","id":"req-001","method":"message/send", "params":{"message":{"role":"user", "parts":[{"kind":"text","text":"what is 101 * 11?"}],"messageId":"id-123"}}}' $ curl http://localhost:9000/.well-known/agent-card.json # the discovery card $ agentcore deploy # to AWS (set up Cognito auth)
[ 3 ] CALL A DEPLOYED A2A AGENT FROM A CLIENT (and how a supervisor delegates)
import asyncio, os, httpx
from uuid import uuid4
from a2a.client import A2ACardResolver, ClientConfig, ClientFactory
from a2a.types import Message, Part, Role, TextPart

async def ask(text):
    headers = {"Authorization": f"Bearer {os.environ['BEARER_TOKEN']}",
        "X-Amzn-Bedrock-AgentCore-Runtime-Session-Id": str(uuid4())}
    async with httpx.AsyncClient(headers=headers, timeout=300) as http:
        card = await A2ACardResolver(httpx_client=http,
            base_url=os.environ["AGENTCORE_RUNTIME_URL"]).get_agent_card()
        client = ClientFactory(ClientConfig(httpx_client=http, streaming=False)).create(card)
        msg = Message(kind="message", role=Role.user,
            parts=[Part(TextPart(kind="text", text=text))], message_id=uuid4().hex)
        async for event in client.send_message(msg):
            print(event)

asyncio.run(ask("what is 101 * 11"))
THE MULTI-AGENT PATTERN
The client above is exactly what a supervisor agent does to delegate: it resolves a specialist's Agent Card, then sends it a message and uses the result. Build a few specialist A2A agents (pricing, support, refunds) and one orchestrator that calls them. For in-process work instead, use Strands agents-as-tools, swarm, or graph. See the samples' orchestrator example.
A2A servers must be ARM64 and listen on port 9000 at /. Errors come back as JSON-RPC errors with HTTP 200. Use the same auth (OAuth or SigV4) the agent was deployed with.
SRC: AWS AgentCore Developer Guide (deploy A2A servers, A2A protocol contract) + awslabs samples (05-hosting-a2a, multi-agents)
DRAWN 2026.06, REV 2026.07.26
◄ PREVIOUS · CH 29
A2A and Multi-Agent, Plain Language
NEXT · CH 31 ►
Architecture Patterns, Plain Language
AWS AGENTCORE BLUEPRINTS · CONTENTS
Back to tocconsulting.fr Cover & Table of Contents
PART I · FOUNDATIONS
01AgentCore Overview, Plain LanguageCONCEPT02AgentCore, Key Terms in Plain LanguageCONCEPT03AgentCore, Common Mistakes ExplainedCONCEPT04Inside an AgentCore Agent, BlueprintCONCEPT05Harness, Practical 1, Strands PathPRACTICAL06Harness, Practical 2, Managed HarnessPRACTICAL
PART II · CORE SERVICES
07AgentCore Runtime, Plain LanguageCONCEPT08AgentCore Runtime, PracticalPRACTICAL09AgentCore Memory, Plain LanguageCONCEPT10AgentCore Memory, PracticalPRACTICAL11AgentCore Gateway, Plain LanguageCONCEPT12AgentCore Gateway, PracticalPRACTICAL13AgentCore Identity, Plain LanguageCONCEPT14AgentCore Identity, PracticalPRACTICAL
PART III · TOOLS AND OPERATIONS
15AgentCore Code Interpreter, Plain LanguageCONCEPT16AgentCore Code Interpreter, PracticalPRACTICAL17AgentCore Browser, Plain LanguageCONCEPT18AgentCore Browser, PracticalPRACTICAL19AgentCore Observability, Plain LanguageCONCEPT20AgentCore Observability, PracticalPRACTICAL21AgentCore Evaluations, Plain LanguageCONCEPT22AgentCore Evaluations, PracticalPRACTICAL
PART IV · GOVERNANCE AND TRANSACTIONS
23AgentCore Policy, Plain LanguageCONCEPT24AgentCore Policy, PracticalPRACTICAL25AgentCore Registry, Plain LanguageCONCEPT26AgentCore Registry, PracticalPRACTICAL27AgentCore Payments, Plain LanguageCONCEPT28AgentCore Payments, PracticalPRACTICAL
PART V · MULTI-AGENT AND ARCHITECTURE
29A2A and Multi-Agent, Plain LanguageCONCEPT30A2A and Multi-Agent, PracticalPRACTICAL31Architecture Patterns, Plain LanguageCONCEPT32Multi-Tenant Agents, Plain LanguageCONCEPT33Agent Security and Threat Model, Plain LanguageCONCEPT34Governance at Org Scale, Plain LanguageCONCEPT35Governance at Org Scale, PracticalPRACTICAL36Multi-Region and Distribution, Plain LanguageCONCEPT