ask-matt
MAmattpocock/skills336k近 7 天新增 5,004 个 star
Runs XActions as an A2A (Agent-to-Agent) compatible agent that serves an Agent Card, accepts JSON-RPC tasks, bridges them onto the 165 MCP tools, streams progress over SSE, and discovers and delegates to other agents. Use when connecting XActions to external AI agents, building multi-agent orchestration, serving or reading an agent card, running the A2A server, or debugging inter-agent auth, discovery, streaming, or task delegation.
Turn XActions into an A2A-compatible agent that can discover, communicate with, and delegate tasks to other AI agents using Google's Agent-to-Agent protocol.
| File | Purpose |
|---|---|
src/a2a/types.js | Shared constants, factories, validators |
src/a2a/skillRegistry.js | MCP tool → A2A skill bridge |
src/a2a/agentCard.js | Agent Card generation (.well-known/agent.json) |
src/a2a/taskManager.js | Task lifecycle (create, transition, execute) |
src/a2a/bridge.js | A2A ↔ MCP translation layer + NLP |
src/a2a/streaming.js | SSE streaming for real-time updates |
src/a2a/push.js | Webhook push notifications |
src/a2a/auth.js | API key + JWT inter-agent auth |
src/a2a/discovery.js | Agent registry, skill matching, trust scoring |
src/a2a/orchestrator.js | Task decomposer + delegator + orchestrator |
src/a2a/server.js | Express HTTP server (port 3100) |
src/a2a/index.js | Barrel export + CLI commands + factory |
dashboard/a2a.html | Web dashboard for monitoring |
# Via CLI
node src/a2a/server.js
# Directly
node src/a2a/server.js
# With session cookie for browser automation
node src/a2a/server.js --cookie "YOUR_X_SESSION_COOKIE"
Every /a2a route needs Authorization: ApiKey <key> (or a bearer token);
only the agent card is public. Create a key with
node src/a2a/index.js --create-key my-agent --preset standard. The
readonly preset cannot run write tools; standard can, and writes still go
through the MCP approval gate (XACTIONS_MCP_REQUIRE_APPROVAL=1) and the daily
action caps. Push-notification and discovery URLs must be public http(s)
addresses unless XACTIONS_A2A_ALLOW_PRIVATE=true.
curl -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/health
curl http://localhost:3100/.well-known/agent.json
curl -X POST -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/tasks \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tasks/send",
"params": {
"message": {
"role": "user",
"parts": [{"type": "text", "text": "get profile for @nichxbt"}]
}
},
"id": "1"
}'
curl -X POST -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/agents/discover \
-H 'Content-Type: application/json' \
-d '{"url": "https://other-agent.example.com"}'
curl -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/skills
curl -H "Authorization: ApiKey $XACTIONS_A2A_KEY" 'http://localhost:3100/a2a/skills?query=scrape'
┌─────────────────────────────────────────────────────┐
│ A2A Protocol Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Agent │ │ Task │ │ Streaming / │ │
│ │ Card │ │ Manager │ │ Push Notify │ │
│ └────┬─────┘ └────┬─────┘ └────────┬─────────┘ │
│ │ │ │ │
│ ┌────┴──────────────┴─────────────────┴──────────┐ │
│ │ HTTP Server (Express) │ │
│ └────────────────────┬────────────────────────────┘ │
│ │ │
│ ┌────────────────────┴────────────────────────────┐ │
│ │ Bridge (A2A ↔ MCP Translation) │ │
│ └────────────────────┬────────────────────────────┘ │
│ │ │
│ ┌────────────────────┴────────────────────────────┐ │
│ │ Skill Registry (one per MCP tool) │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────┐ ┌────────────┐ ┌──────────────┐ │
│ │ Discovery │ │ Auth │ │ Orchestrator │ │
│ │ + Trust │ │ (JWT/Key) │ │ (Decompose) │ │
│ └─────────────┘ └────────────┘ └──────────────┘ │
└──────────────────────────────────────────────────────┘
Every A2A agent publishes a JSON document at /.well-known/agent.json describing its capabilities, skills, and supported protocols.
XActions converts its 165 MCP tools into A2A skills, each with a unique ID (xactions.<tool_name>), description, input schema, and category tags.
submitted → working → completed
→ failed
→ canceled
→ input-required → working
Remote agents are scored 0-100 based on success ratio (40%), longevity (20%), recency (20%), and volume (20%).
Complex natural-language tasks are automatically broken into ordered sub-tasks with dependency tracking ($step1, $step2.field).
| Method | Path | Description |
|---|---|---|
| GET | /.well-known/agent.json | Agent Card |
| POST | /a2a/tasks | Create task (tasks/send or tasks/sendSubscribe) |
| GET | /a2a/tasks/:id | Get task |
| POST | /a2a/tasks/:id/cancel | Cancel task |
| GET | /a2a/tasks/:id/stream | SSE stream |
| POST | /a2a/tasks/:id/message | Push notification |
| GET | /a2a/health | Health check |
| GET | /a2a/skills | List skills |
| POST | /a2a/orchestrate | Execute orchestrated task |
| POST | /a2a/orchestrate/plan | Get execution plan |
| GET | /a2a/agents | List discovered agents |
| POST | /a2a/agents/discover | Discover remote agents |
The CLI has no A2A subcommand. The A2A agent is an HTTP server, and every operation is one of the endpoints in the table above.
# Issue a key for the calling agent once; every /a2a route needs it
node src/a2a/index.js --create-key my-agent --preset standard
export XACTIONS_A2A_KEY=xa2a_...
# Start it (binds 127.0.0.1:3100; set A2A_HOST to listen elsewhere)
node src/a2a/server.js
# Or on another port, with a session attached
A2A_PORT=3200 XACTIONS_SESSION_COOKIE=your_auth_token node src/a2a/server.js
# Is it up?
curl -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/health
# What can it do?
curl http://localhost:3100/.well-known/agent.json
curl -H "Authorization: ApiKey $XACTIONS_A2A_KEY" 'http://localhost:3100/a2a/skills?query=scrape'
# Which other agents does it know about?
curl -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/agents
# Give it a task
curl -X POST -H "Authorization: ApiKey $XACTIONS_A2A_KEY" http://localhost:3100/a2a/orchestrate \
-H 'Content-Type: application/json' \
-d '{"task": "Scrape the profile of @nasa and summarise it"}'
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
OBobra/superpowers331k近 7 天新增 5,757 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star