agentleFS
nirholasnirholas/XActions/skills/a2a-multi-agent/SKILL.md

a2a-multi-agent

Skill648 starsChanged 9 months agoApache-2.0View on GitHub

Runs XActions as an A2A (Agent-to-Agent) compatible agent that serves an Agent Card, accepts JSON-RPC tasks, bridges them onto the 154 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.

  • Sends data out

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every A2A agent publishes a JSON document at /.well-known/agent.json describing its capabilities, skills, and supported protocols.

    line 133

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: A2A Multi-Agent Orchestration

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.

When to Use

  • User wants to connect XActions with external AI agents
  • User needs multi-agent orchestration (decompose → delegate → aggregate)
  • User asks about A2A protocol, agent cards, or inter-agent communication
  • User wants to run the A2A server or manage agent discovery
  • User needs real-time task streaming between agents

Files

FilePurpose
src/a2a/types.jsShared constants, factories, validators
src/a2a/skillRegistry.jsMCP tool → A2A skill bridge
src/a2a/agentCard.jsAgent Card generation (.well-known/agent.json)
src/a2a/taskManager.jsTask lifecycle (create, transition, execute)
src/a2a/bridge.jsA2A ↔ MCP translation layer + NLP
src/a2a/streaming.jsSSE streaming for real-time updates
src/a2a/push.jsWebhook push notifications
src/a2a/auth.jsAPI key + JWT inter-agent auth
src/a2a/discovery.jsAgent registry, skill matching, trust scoring
src/a2a/orchestrator.jsTask decomposer + delegator + orchestrator
src/a2a/server.jsExpress HTTP server (port 3100)
src/a2a/index.jsBarrel export + CLI commands + factory
dashboard/a2a.htmlWeb dashboard for monitoring

Quick Start

Start the A2A server

# 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"

Check health

curl http://localhost:3100/a2a/health

View Agent Card

curl http://localhost:3100/.well-known/agent.json

Send a task

curl -X POST 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"
  }'

Discover an agent

curl -X POST http://localhost:3100/a2a/agents/discover \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://other-agent.example.com"}'

List skills

curl http://localhost:3100/a2a/skills
curl 'http://localhost:3100/a2a/skills?query=scrape'

Architecture

┌─────────────────────────────────────────────────────┐
│                   A2A Protocol Layer                 │
│  ┌──────────┐  ┌──────────┐  ┌──────────────────┐  │
│  │  Agent    │  │   Task   │  │   Streaming /    │  │
│  │  Card     │  │  Manager │  │   Push Notify    │  │
│  └────┬─────┘  └────┬─────┘  └────────┬─────────┘  │
│       │              │                 │             │
│  ┌────┴──────────────┴─────────────────┴──────────┐ │
│  │              HTTP Server (Express)              │ │
│  └────────────────────┬────────────────────────────┘ │
│                       │                              │
│  ┌────────────────────┴────────────────────────────┐ │
│  │        Bridge (A2A ↔ MCP Translation)           │ │
│  └────────────────────┬────────────────────────────┘ │
│                       │                              │
│  ┌────────────────────┴────────────────────────────┐ │
│  │           Skill Registry (140+ tools)           │ │
│  └─────────────────────────────────────────────────┘ │
│                                                      │
│  ┌─────────────┐  ┌────────────┐  ┌──────────────┐  │
│  │  Discovery  │  │   Auth     │  │ Orchestrator │  │
│  │  + Trust    │  │  (JWT/Key) │  │ (Decompose)  │  │
│  └─────────────┘  └────────────┘  └──────────────┘  │
└──────────────────────────────────────────────────────┘

Key Concepts

Agent Card

Every A2A agent publishes a JSON document at /.well-known/agent.json describing its capabilities, skills, and supported protocols.

Skills

XActions converts its 154 MCP tools into A2A skills, each with a unique ID (xactions.<tool_name>), description, input schema, and category tags.

Task Lifecycle

submitted → working → completed
                   → failed
         → canceled
         → input-required → working

Trust Scoring

Remote agents are scored 0-100 based on success ratio (40%), longevity (20%), recency (20%), and volume (20%).

Task Decomposition

Complex natural-language tasks are automatically broken into ordered sub-tasks with dependency tracking ($step1, $step2.field).

Endpoints

MethodPathDescription
GET/.well-known/agent.jsonAgent Card
POST/a2a/tasksCreate task (tasks/send or tasks/sendSubscribe)
GET/a2a/tasks/:idGet task
POST/a2a/tasks/:id/cancelCancel task
GET/a2a/tasks/:id/streamSSE stream
POST/a2a/tasks/:id/messagePush notification
GET/a2a/healthHealth check
GET/a2a/skillsList skills
POST/a2a/orchestrateExecute orchestrated task
POST/a2a/orchestrate/planGet execution plan
GET/a2a/agentsList discovered agents
POST/a2a/agents/discoverDiscover remote agents

Running and driving the server

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.

# Start it (defaults to port 3100)
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 http://localhost:3100/a2a/health

# What can it do?
curl http://localhost:3100/.well-known/agent.json
curl 'http://localhost:3100/a2a/skills?query=scrape'

# Which other agents does it know about?
curl http://localhost:3100/a2a/agents

# Give it a task
curl -X POST http://localhost:3100/a2a/orchestrate \
  -H 'Content-Type: application/json' \
  -d '{"task": "Scrape the profile of @nasa and summarise it"}'

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.