Skip to main content
POST
http://127.0.0.1:8765
/
a2a
Deploy API: A2A Server
curl --request POST \
  --url http://127.0.0.1:8765/a2a \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "jsonrpc": "<string>",
  "method": "<string>",
  "id": "<string>",
  "params.message.role": "<string>",
  "params.message.parts": [
    {}
  ]
}
'

A2A API

A2A (Agent-to-Agent) protocol endpoints for agents deployed via A2A(agent).get_router().

Base URL + Playground

# Start A2A server
from praisonaiagents import Agent
from praisonaiagents.a2a import A2A
import uvicorn

agent = Agent(instructions="You are a helpful assistant")
app = A2A(agent).get_router()
uvicorn.run(app, host="0.0.0.0", port=8000)
Base URL: http://localhost:8000

Endpoints

GET /.well-known/agent.json

Retrieve the Agent Card for discovery.
none
none
No parameters required.
curl http://localhost:8000/.well-known/agent.json
Response:
{
  "name": "Assistant",
  "description": "Helpful AI Assistant",
  "url": "http://localhost:8000/a2a",
  "version": "1.0.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": false,
    "stateTransitionHistory": false
  },
  "skills": [
    {
      "id": "chat",
      "name": "Chat",
      "description": "General conversation"
    }
  ]
}

GET /status

Check server status.
none
none
No parameters required.
curl http://localhost:8000/status
Response:
{
  "status": "ok",
  "name": "Assistant",
  "version": "1.0.0"
}

POST /a2a

Send JSON-RPC messages to the agent.
jsonrpc
string
required
JSON-RPC version (must be “2.0”)
method
string
required
A2A method name (message/send)
id
string
required
Request ID
params.message.role
string
required
Message role (“user”)
params.message.parts
array
required
Message parts array
curl -X POST http://localhost:8000/a2a \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "message/send",
    "id": "request-123",
    "params": {
      "message": {
        "role": "user",
        "parts": [
          {"type": "text", "text": "Hello, agent!"}
        ]
      }
    }
  }'
Response:
{
  "jsonrpc": "2.0",
  "id": "request-123",
  "result": {
    "message": {
      "role": "agent",
      "parts": [
        {"type": "text", "text": "Hello! How can I help you today?"}
      ]
    }
  }
}

Message Part Types

TypeFieldsDescription
texttextPlain text content
fileuri, mimeTypeFile attachment

Errors

A2A errors follow JSON-RPC 2.0 format:
{
  "jsonrpc": "2.0",
  "id": "request-123",
  "error": {
    "code": -32600,
    "message": "Invalid request"
  }
}
CodeMessage
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error