A2A Protocol
RadarOS provides full support for the Agent-to-Agent (A2A) protocol, enabling interoperability between AI agents built on different frameworks.
A2A is an open standard by Google that defines how AI agents communicate with each other via JSON-RPC 2.0 over HTTP. It includes agent discovery, task management, and streaming.
Capabilities
RadarOS supports both sides of A2A:
A2A Server Expose your RadarOS agents as A2A-compliant endpoints. Other frameworks (LangGraph, CrewAI, etc.) can discover and call your agents.
A2A Client Connect to remote A2A agents. Use them as tools, team members, or call them directly.
How It Works
┌──────────────────┐ ┌──────────────────┐
│ RadarOS Agent │ A2A │ Remote Agent │
│ (Server) │◄───────►│ (Any Framework) │
│ │ HTTP/ │ │
│ /.well-known/ │ SSE │ /.well-known/ │
│ agent.json │ │ agent.json │
└──────────────────┘ └──────────────────┘
Discovery — Agents publish an Agent Card at /.well-known/agent.json describing their capabilities
Communication — JSON-RPC 2.0 messages over HTTP (message/send) or SSE (message/stream)
Task Management — Each interaction creates a task with lifecycle states (submitted → working → completed)
Quick Example
Expose an agent as A2A server
import express from "express" ;
import { Agent , openai } from "@radaros/core" ;
import { createA2AServer } from "@radaros/transport" ;
const app = express ();
const agent = new Agent ({
name: "assistant" ,
model: openai ( "gpt-4o" ),
instructions: "You are a helpful assistant." ,
});
createA2AServer ( app , {
agents: { assistant: agent },
provider: { organization: "MyCompany" },
});
app . listen ( 3001 );
// Agent Card: http://localhost:3001/.well-known/agent.json
Call a remote A2A agent
import { A2ARemoteAgent } from "@radaros/core" ;
const remote = new A2ARemoteAgent ({
url: "http://localhost:3001" ,
});
await remote . discover ();
const result = await remote . run ( "Hello!" );
console . log ( result . text );