Register and manage this OpenClaw instance as an A2A agent in the A2A API Gateway. Other agents discover this instance through the gateway registry, so registration is required before receiving inbound tasks.
This skill is strictly an OpenClaw sidecar — it uses the A2A API Gateway's existing admin API to register, deregister, heartbeat, and check status. The gateway's admin endpoints are the contract; OpenClaw is just a participant. Never assume what other registered agents look like or how they connect — they could be MC2, another OpenClaw, or anything else that speaks A2A. These scripts call the gateway's admin API as-is.
All scripts read from a shared a2a.conf file (located in the a2a-client skill directory). The gateway URL must be configured — there are no hardcoded defaults.
Priority order: CLI flags → env vars → a2a.conf → auto-detected defaults
SettingAuto-detected DefaultDescriptionGateway URL_none — required_A2A API Gateway URL ( A2A_GATEWAY_URL)Agent Namehostname -s (lowercase)Display name ( AGENT_NAME)Agent Slughostname -s (lowercase)URL-safe identifier ( AGENT_SLUG)Agent URLhttp://{Tailscale IP}:{port}Agent endpoint ( AGENT_URL)Capabilitieschat,code,researchComma-separated ( AGENT_CAPABILITIES)Auth TypebearerAuth method ( AGENT_AUTH_TYPE)API Key_empty_For listener auth ( A2A_GATEWAY_API_KEY)
bash
# Interactive setup — creates a2a.conf for you
./a2a-setup.sh
# Non-interactive (env vars required)
A2A_GATEWAY_URL=http://GATEWAY_IP:8090 A2A_GATEWAY_API_KEY=your-key ./a2a-setup.sh --non-interactive
bash
./a2a-setup.sh [--non-interactive] [--conf PATH]
Creates or updates the shared a2a.conf file. In interactive mode, prompts for all values with auto-detected defaults. In non-interactive mode, reads from environment variables.
bash
# Interactive (recommended first time)
./a2a-setup.sh
# Non-interactive (for scripting)
A2A_GATEWAY_URL=http://GATEWAY_IP:8090 \
A2A_GATEWAY_API_KEY=your-key \
AGENT_SLUG=my-agent \
./a2a-setup.sh --non-interactive
bash
./register.sh [--gateway-url URL] [--name NAME] [--slug SLUG] [--url URL] [--capabilities CAPS]
Registers this OpenClaw instance in the A2A API Gateway. The script:
GET /v0/admin/bootstrapGET /v0/admin/agents)POST /v0/admin/agents to create itPUT /v0/admin/agents/{id} to update itIdempotent — safe to run multiple times.
bash
# Register with defaults (from a2a.conf / auto-detected)
./register.sh
# Override specific values
./register.sh --name "My Agent" --slug my-agent --url http://MY_IP:8100
# Override gateway URL
./register.sh --gateway-url http://GATEWAY_LAN_IP:8090
bash
./deregister.sh [--gateway-url URL] [--slug SLUG]
Removes this OpenClaw instance from the gateway registry. Other agents will no longer be able to discover or route tasks to it.
bash
./deregister.sh
bash
./heartbeat.sh [--gateway-url URL] [--slug SLUG]
Sends a heartbeat to the gateway ( PATCH /v0/admin/agents/{id}/heartbeat) to signal that this instance is alive and reachable. Useful for cron jobs or periodic health checks.
bash
# One-time heartbeat
./heartbeat.sh
# In a cron (every 5 minutes)
*/5 * * * * /path/to/skills/a2a-register/heartbeat.sh
bash
./status.sh [--gateway-url URL] [--slug SLUG]
Checks whether this OpenClaw instance is registered in the gateway and shows its current configuration (URL, capabilities, status).
bash
./status.sh
./a2a-setup.sh to create your a2a.conf./register.sh to add this instance to the gatewaya2a-server skill's start.sh to begin receiving tasks./heartbeat.sh periodically (or set up a cron)./status.sh to verify registration./deregister.sh when going offlineEndpointMethodPurpose/v0/admin/bootstrapGETObtain admin JWT/v0/admin/agentsGETList all registered agents/v0/admin/agentsPOSTRegister a new agent/v0/admin/agents/{id}PUTUpdate an existing agent/v0/admin/agents/{id}DELETERemove an agent/v0/admin/agents/{id}/heartbeatPATCHSignal liveness
VariableDescriptionA2A_GATEWAY_URLGateway URL (required if not in a2a.conf)A2A_GATEWAY_API_KEYAPI key for listener authAGENT_NAMEAgent display nameAGENT_SLUGAgent identifierAGENT_URLAgent endpoint URLAGENT_CAPABILITIESComma-separated capabilitiesLISTENER_PORTListener port (default: 8100)