roar-sdk
ROAR Protocol — Python SDK. 5-layer agent communication standard.
Design by @kdairatchi — ProwlrBot/roar-protocol
Install
pip install roar-sdk # core: types, client, server (pydantic only)
pip install 'roar-sdk[http]' # + httpx for HTTP transport
pip install 'roar-sdk[websocket]' # + websockets transport
pip install 'roar-sdk[ed25519]' # + Ed25519 signing (cryptography)
pip install 'roar-sdk[server]' # + fastapi + uvicorn for serving
pip install 'roar-sdk[server,ed25519]' # full stack
Quick Start
from roar_sdk import AgentIdentity, ROARMessage, MessageIntent, ROARClient, ROARServer
# Layer 1: identity
agent = AgentIdentity(display_name="my-agent", capabilities=["code"])
# Layer 4: build and sign a message
msg = ROARMessage(
**{"from": agent, "to": other},
intent=MessageIntent.DELEGATE,
payload={"task": "review"},
)
msg.sign("shared-secret")
# Layer 3: send over HTTP
client = ROARClient(agent, signing_secret="shared-secret")
response = await client.send_remote(
to_agent_id=other.did,
intent=MessageIntent.DELEGATE,
content={"task": "review"},
)
What's in the Box
| Module | What it gives you |
|---|---|
AgentIdentity, AgentCard |
Layer 1 — W3C DID-based agent identity |
AgentDirectory, SQLiteAgentDirectory |
Layer 2 — in-memory and persistent discovery |
ROARHub |
Layer 2 — federated hub with REST API |
DiscoveryCache |
Layer 2 — TTL+LRU discovery cache |
ROARClient, ROARServer |
Layer 3 — HTTP client and server |
create_roar_router |
Layer 3 — FastAPI router (HTTP + WebSocket + SSE) |
ROARMessage, MessageIntent |
Layer 4 — unified message format |
sign_ed25519, verify_ed25519 |
Layer 4 — asymmetric signing |
DelegationToken, issue_token |
Layer 4 — scoped capability grants |
EventBus, StreamFilter |
Layer 5 — real-time event streaming |
IdempotencyGuard |
Layer 5 — deduplication |
DIDDocument, DIDKeyMethod, DIDWebMethod |
Identity — W3C DID documents |
AutonomyLevel, CapabilityDelegation |
Identity — graduated autonomy model |
MCPAdapter, A2AAdapter, ACPAdapter |
Adapters — MCP, A2A, ACP bridges |
detect_protocol |
Adapters — auto-detect incoming protocol |
Server Example
from fastapi import FastAPI
from roar_sdk import AgentIdentity, MessageIntent, ROARMessage, ROARServer
from roar_sdk.router import create_roar_router
identity = AgentIdentity(display_name="code-reviewer", capabilities=["code-review"])
server = ROARServer(identity, signing_secret="shared-secret")
@server.on(MessageIntent.DELEGATE)
async def handle_delegate(msg: ROARMessage) -> ROARMessage:
return ROARMessage(
**{"from": server.identity, "to": msg.from_identity},
intent=MessageIntent.RESPOND,
payload={"review": "LGTM"},
context={"in_reply_to": msg.id},
)
app = FastAPI()
app.include_router(create_roar_router(server, rate_limit=60))
# uvicorn main:app --port 8089
Protocol Adapters
from roar_sdk import MCPAdapter, A2AAdapter, ACPAdapter
from roar_sdk.adapters.detect import detect_protocol, ProtocolType
# Auto-detect incoming format
protocol = detect_protocol(raw_json)
if protocol == ProtocolType.MCP:
msg = MCPAdapter.mcp_to_roar(tool_name, params, agent)
elif protocol == ProtocolType.A2A:
msg = A2AAdapter.a2a_task_to_roar(task, sender, receiver)
elif protocol == ProtocolType.ACP:
msg = ACPAdapter.acp_message_to_roar(acp_msg, ide, agent)
Links
Metadata
Release files for roar-sdk 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| roar_sdk-0.3.2.tar.gz | 39.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| roar_sdk-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.3 kB
Release files / roar_sdk-0.3.2.tar.gz
| Download URL | roar_sdk-0.3.2.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
096e49e76d2cd47bf479c0e3298274e7fa08c51d159c88e1e4933b68e69af4ec
|
|
BLAKE2b-256 checksum How to use checksums |
0ecba99924ac5c81a6d4a72936ffaead4a851dedca0ad89a6892b454a0d7437c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / roar_sdk-0.3.2-py3-none-any.whl
| Download URL | roar_sdk-0.3.2-py3-none-any.whl |
|---|---|
| Size | 53.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d35c5115d5ab5f0656d3777e95b5e3f9b2301f0bf1803b812133f2cc463de09c
|
|
BLAKE2b-256 checksum How to use checksums |
36d20154df1b08ae769908ed4af41bff2191fdf2967dc94196813e481f905c76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for roar-sdk 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.