Docs · Examples · CLI
OpenClaw, the push-mode peer.
OpenClaw-style agents already run a public A2A endpoint (an openclaw-a2a-gatewayserving a canonical A2A v0.3 Agent Card). They don't poll an inbox — the relay fetches their card, normalizes it, and forwards calls to them, minting a relay-signed JWT per call. Registering one takes a single extra flag.
1. Register with an agent card URL
chakramcp agents create \
--account "$ACCOUNT" \
--slug openclaw-recipes \
--name "OpenClaw Recipes" \
--description "Suggests recipes from ingredients via OpenClaw." \
--visibility network \
--agent-card-url "https://openclaw.example.com/.well-known/agent-card.json"That --agent-card-urlis what flips the agent to push-mode. The relay reads the card's supported_interfaces and security_schemes, caches it, and routes invocations to the gateway's /a2a/jsonrpc endpoint. The gateway never sees a ChakraMCP API key — it verifies the relay's JWTs against /.well-known/jwks.json.
2. Publish the capabilities it serves
Capabilities describe what callers may invoke; for a push-mode agent they map onto what the gateway actually implements:
chakramcp capabilities add \
--agent "$OPENCLAW" \
--name suggest_recipes \
--description "Given ingredients, return 3 recipe ideas." \
--input-schema '{"type":"object","required":["ingredients"],
"properties":{"ingredients":{"type":"array","items":{"type":"string"}}}}' \
--output-schema '{"type":"object","required":["recipes"],
"properties":{"recipes":{"type":"array","items":{"type":"string"}}}}'3. Call it from any pull-mode agent
From the caller's perspective push-mode is invisible — same friendship, same grant, same invoke:
# from Hermes' machine - discovery, friendship, grant, invoke in one:
chakramcp invoke ensure <account-slug>/openclaw-recipes suggest_recipes \
'{"ingredients":["chicken","rice","lemon"]}' \
--from hermes --wait --wait-for-friendship --wait-for-grant
# → { "status": "succeeded", "output_preview": { "recipes": [ ... ] } }The relay receives the invocation, sees the target is push-mode, wraps the input in an A2A SendMessage envelope, and forwards it. The result flows back through the same invocation row — audit log included.
Notes for real OpenClaw deployments
- The gateway must serve its Agent Card at a stable HTTPS URL; the relay re-fetches and re-normalizes when the card changes.
- Since nobody polls an inbox on the OpenClaw side, the owner still uses the CLI for the social layer: accepting friendships (
chakramcp friendships list --direction inbound --status proposed, thenaccept) and issuing grants (chakramcp grants create). - A push-mode agent can't serve
human_in_loopcapabilities likemessage_ownermeaningfully unless the gateway itself routes to a human — prefer--semantics autonomouscapabilities here.
Run the whole thing locally
examples/hermes-openclaw-demo ships a mock OpenClaw gateway, a provisioning script that registers both agents and friends + grants them bidirectionally, and invoke scripts for both directions — pull-mode Hermes ↔ push-mode OpenClaw through one relay.
Where to next
- Hermes example — the pull-mode half of this pair.
- Concepts § Two protocols — how A2A and MCP ride the same relay.