Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

agent-protocol

FreeRuns bundled scriptsNot checked

Agent-to-agent communication protocol. Enables skills to communicate via events, build workflow chains, and orchestrate without human intervention.

modbenderby modbender★ 21 GitHub stars

About this skill

Agent-to-Agent Protocol

A foundational communication layer for Clawdbot skills and agents.

Enable your agents to talk to each other, build automated workflows, and orchestrate complex multi-step tasks without human intervention.

Vision

Research-Agent finds article
    ↓ publishes "research.found"
Summary-Agent subscribes to events
    ↓ generates digest
    ↓ publishes "summary.ready"
Notification-Agent subscribes
    ↓ posts to Telegram/Discord

Architecture

1. Event Bus (File-based Message Passing)

  • Agents publish events to ~/.clawdbot/events/
  • Events are JSON files with schema validation
  • Persistent, debuggable, auditable
  • Automatic cleanup of processed events

2. Workflow Engine

  • Define pipelines in JSON or YAML
  • Conditional routing based on event data
  • Error handling, retries, fallbacks
  • Cron integration for scheduled execution

3. Shared Context

  • Agents read/write to shared memory space
  • Context passing between workflow steps
  • State persistence across agent invocations

4. Agent Registry

  • Discover available agents/skills
  • Capability advertisement
  • Permission management

Core Concepts

Events

Events are the fundamental unit of communication:

{
  "event_id": "evt_20260128_001",
  "event_type": "research.article_found",
  "timestamp": "2026-01-28T23:00:00Z",
  "source_agent": "research-agent",
  "payload": {
    "title": "ETH 2.0 Upgrade Complete",
    "url": "https://example.com/article",
    "importance": 9,
    "summary": "Major Ethereum upgrade..."
  },
  "metadata": {
    "session_id": "main",
    "requires_action": true
  }
}

Workflows

Workflows define how agents respond to events:

{
  "workflow_id": "research-to-telegram",
  "name": "Research → Summary → Notification",
  "trigger": {
    "event_type": "research.article_found",
    "conditions": {
      "payload.importance": { "gte": 7 }
    }
  },
  "steps": [
    {
      "agent": "summary-agent",
      "action": "summarize",
      "input": "{{payload}}",
      "output_event": "summary.ready"
    },
    {
      "agent": "notification-agent",
      "action": "notify",
      "input": "{{previous.summary}}",
      "channels": ["telegram"]
    }
  ]
}

Quick Start

1. Installation

cd /root/clawd/skills/agent-protocol
python3 scripts/setup.py

2. Start Event Bus

python3 scripts/event_bus.py start

3. Publish Your First Event

python3 scripts/publish.py \
  --type "test.hello" \
  --source "my-agent" \
  --payload '{"message": "Hello, world!"}'

4. Subscribe to Events

python3 scripts/subscribe.py \
  --types "test.hello" \
  --handler "./my_handler.py"

5. Define a Workflow

cp examples/simple-workflow.json config/workflows/my-workflow.json
python3 scripts/workflow_engine.py --validate

Event Types (Conventions)

Standard Event Types

  • research.article_found - Research agent found relevant content
  • research.topic_suggested - New research topic suggested
  • summary.ready - Summary generated
  • analytics.insight - Personal analytics insight
  • sports.goal_scored - Sports ticker goal event
  • sports.match_started - Match started
  • notification.sent - Notification delivered
  • workflow.started - Workflow execution started
  • workflow.completed - Workflow completed
  • workflow.failed - Workflow failed

Event Naming Convention

<domain>.<action_past_tense>

  • Use lowercase, underscores
  • Domain: broad category (research, sports, notification)
  • Action: what happened (article_found, goal_scored)

Workflow Examples

Example 1: Research → Notification

{
  "workflow_id": "eth-news-alert",
  "trigger": {
    "event_type": "research.article_found",
    "conditions": {
      "payload.keywords": { "contains": ["ethereum", "ETH"] },
      "payload.importance": { "gte": 8 }
    }
  },
  "steps": [
    {
      "agent": "notification-agent",
      "action": "send_telegram",
      "input": {
        "message": "🚨 Important ETH News!\n{{payload.title}}\n{{payload.url}}"
      }
    }
  ]
}

Example 2: Sports Goal → TTS Announcement

{
  "workflow_id": "goal-announcement",
  "trigger": {
    "event_type": "sports.goal_scored",
    "conditions": {
      "payload.team": { "eq": "Barcelona" }
    }
  },
  "steps": [
    {
      "agent": "tts-agent",
      "action": "announce",
      "input": {
        "text": "Goal for Barcelona! {{payload.scorer}} scores! {{payload.score}}"
      }
    }
  ]
}

Example 3: Daily Analytics → Research Topics

{
  "workflow_id": "analytics-to-research",
  "trigger": {
    "event_type": "analytics.daily_report",
    "schedule": "0 9 * * *"
  },
  "steps": [
    {
      "agent": "analytics-a
Full SKILL.md on GitHub

Install agent-protocol in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

DIAGRAMS.mdREADME.mdSUMMARY.mdTEST.mdconfig.example.jsonconfig/protocol.jsondocs/ARCHITECTURE.mddocs/INTEGRATION.mdexamples/conditional-workflow.jsonexamples/handler-example.pyexamples/integration-sports-ticker.pyexamples/multi-step-workflow.jsonexamples/simple-workflow.jsonexamples/sports-tts-workflow.jsonpackage.jsonscripts/__init__.pyscripts/event_bus.pyscripts/protocol.jsscripts/publish.pyscripts/setup.pyscripts/subscribe.pyscripts/workflow_engine.py

FAQ

What does the agent-protocol skill do?

Agent-to-agent communication protocol. Enables skills to communicate via events, build workflow chains, and orchestrate without human intervention.

How do I install the agent-protocol skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the agent-protocol skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare agent-protocol with