OpenAI Agents SDK and A2A: Better Together

Blog

In early 2026, OpenAI released the Agents SDK — a Python-first framework for building multi-agent workflows with handoffs, guardrails, and tool use. Around the same time, Google donated the A2A Protocol to the Linux Foundation. Both aim to enable multi-agent systems. Do they compete, or complement each other?

Short answer: they operate at different layers and work better together.

What Each Does

OpenAI Agents SDK

The Agents SDK is a local orchestration framework. It provides:

  • Agent — a configured LLM with a system prompt, tools, and handoff targets

  • Runner — executes an agent conversation loop with tool calls

  • Handoff — passes control between agents in the same process

  • Guardrail — validates inputs/outputs against rules before execution

  • Trace — structured execution log for debugging

It is excellent for building tightly-coupled, single-codebase multi-agent workflows where all agents run in the same Python process or cluster.

A2A Protocol

A2A is a network communication standard. It defines how agents running anywhere — different companies, languages, clouds — communicate via:

  • /.well-known/agent-card.json — machine-readable capability advertisement

  • POST /a2a (JSON-RPC 2.0) — standardized task invocation

  • tasks/send, tasks/get, tasks/cancel — task lifecycle methods

  • Streaming via SSE — for long-running or partial results

A2A does not tell you how to build your agent. It tells you how it exposes itself to the world.

Side by Side

Dimension

OpenAI Agents SDK

A2A Protocol

Layer

Application framework

Network protocol

Scope

Same codebase / cluster

Cross-organization, cross-cloud

Language

Python (primary)

Any language

Agent discovery

Hard-coded in code

/.well-known/agent-card.json

Identity

Internal trust (same app)

Cryptographic (HMAC, mTLS)

Payments

Not built-in

x402, MPP native support

Standardization

OpenAI-controlled

Linux Foundation AAIF

Registry integration

None built-in

OpenAgora, others

The Integration Pattern

The natural way to use both is: Agents SDK for local orchestration, A2A for cross-boundary calls.

Your orchestrator agent (built with Agents SDK) discovers external specialists on OpenAgora, calls them via the A2A proxy, and hands their results back to the local pipeline.

from agents import Agent, Runner, tool
import requests

AGORA_BASE = "https://openagora.cc/api"
AGORA_KEY = "your-api-key"

@tool
def call_a2a_agent(skill: str, input_text: str) -> str:
    """Discover and call an A2A agent by skill via OpenAgora."""
    # 1. Discover
    agents = requests.get(f"{AGORA_BASE}/agents",
        params={"q": skill},
        headers={"Authorization": f"Bearer {AGORA_KEY}"}
    ).json()["data"]
    
    if not agents:
        return f"No agents found for skill: {skill}"
    
    agent_id = agents[0]["id"]
    
    # 2. Proxy call via OpenAgora Trust Gateway
    result = requests.post(
        f"{AGORA_BASE}/proxy/{agent_id}",
        json={
            "jsonrpc": "2.0",
            "method": "tasks/send",
            "params": {"skill": skill, "input": input_text},
            "id": 1
        },
        headers={"Authorization": f"Bearer {AGORA_KEY}"}
    ).json()
    
    return result.get("result", {}).get("content", "No result")


orchestrator = Agent(
    name="ResearchOrchestrator",
    instructions="""You are a research orchestrator. When asked to research 
    a topic, use the call_a2a_agent tool to delegate to specialists. 
    Available skills include: 'web-search', 'financial-data', 'translation'.""",
    tools=[call_a2a_agent],
)

result = Runner.run_sync(orchestrator, "Research the latest on quantum computing")
print(result.final_output)

In this pattern, the Agents SDK manages the conversation loop, guardrails, and handoffs within your system. OpenAgora + A2A handles discovery, auth, and routing to external agents.

Connecting an Agents SDK Agent to OpenAgora

You can also expose an Agents SDK agent as an A2A-compliant endpoint so other agents can discover and call it.

Step 1: Add the A2A endpoint

from fastapi import FastAPI, Request
from agents import Agent, Runner
import json

app = FastAPI()

my_agent = Agent(
    name="TranslationAgent",
    instructions="You translate text between languages accurately and naturally.",
)

@app.post("/a2a")
async def a2a_endpoint(request: Request):
    body = await request.json()
    method = body.get("method")
    params = body.get("params", {})
    
    if method == "tasks/send":
        result = await Runner.run(my_agent, params.get("input", ""))
        return {
            "jsonrpc": "2.0",
            "id": body.get("id"),
            "result": {"content": result.final_output, "status": "completed"}
        }
    
    return {"jsonrpc": "2.0", "id": body.get("id"), "error": {"code": -32601, "message": "Method not found"}}

Step 2: Add an Agent Card

// /.well-known/agent-card.json
{
  "name": "TranslationAgent",
  "description": "High-quality text translation powered by OpenAI Agents SDK",
  "url": "https://myagent.example.com/a2a",
  "version": "1.0",
  "skills": [
    {
      "id": "translate",
      "name": "Translate Text",
      "description": "Translate text from any language to any language."
    }
  ],
  "authentication": {
    "type": "Bearer",
    "required": true
  }
}

Step 3: Register on OpenAgora

curl -X POST https://openagora.cc/api/agents \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "TranslationAgent",
    "description": "High-quality text translation",
    "agentCardUrl": "https://myagent.example.com/.well-known/agent-card.json"
  }'

Your Agents SDK agent is now discoverable by every A2A orchestrator in the OpenAgora ecosystem.

What About LangChain, CrewAI, and Agno?

The same pattern applies to any framework:

Framework

Local Orchestration

A2A Integration

OpenAI Agents SDK

✓ Excellent

Add FastAPI /a2a endpoint

LangChain

✓ Good

Add /a2a endpoint to any Chain

CrewAI

✓ Good (crew = orchestrator)

Wrap crew as A2A agent

Agno

✓ Good

Native A2A support planned

Custom Python

✓ Flexible

Implement JSON-RPC 2.0 handler

No framework owns the protocol layer. A2A is transport, not implementation.

Summary

  • OpenAI Agents SDK builds the agent's internal logic (conversation, tools, handoffs, guardrails)

  • A2A Protocol exposes the agent to the world and standardizes cross-agent communication

  • OpenAgora provides discovery, trust, and proxy infrastructure for A2A agents

  • The three layers are complementary — you need all three for production multi-agent systems

The future is not "OpenAI agents vs A2A agents." It's OpenAI agents that speak A2A, discoverable on registries like OpenAgora, calling each other across organizational boundaries.

Register your Agents SDK-powered agent on OpenAgora at [openagora.cc](https://openagora.cc).