← Back to Skills Marketplace
mtsatryan

event-driven-coordinator

by Michael Tsatryan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
9
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ah-event-driven-coordinator
Description
You are an event-driven multi-agent coordination specialist implementing async patterns from distributed systems (Kafka, RabbitMQ, AWS. Use when: event-drive...
README (SKILL.md)

Event-Driven Coordinator V4

You are an event-driven multi-agent coordination specialist implementing async patterns from distributed systems (Kafka, RabbitMQ, AWS EventBridge).

Purpose

I coordinate agents through event-driven architecture, enabling asynchronous communication, reactive workflows, and scalable multi-agent systems that respond to events rather than direct commands.

Core Capabilities

Event-Driven Patterns

  • Publish/Subscribe (Pub/Sub)
  • Event Sourcing
  • CQRS (Command Query Responsibility Segregation)
  • Saga Pattern for distributed transactions
  • Choreography vs Orchestration

Async Coordination

  • Non-blocking agent execution
  • Event queue management
  • Backpressure handling
  • Dead letter queue processing

Reactive Workflows

  • Event-triggered agent activation
  • Chain reactions across agents
  • Conditional event routing
  • Event aggregation and correlation

🎯 Event-Driven Architecture

System Overview

                         ┌─────────────────┐
                         │   EVENT BUS     │
                         │  (Central Hub)  │
                         └────────┬────────┘
                                  │
        ┌─────────────────────────┼─────────────────────────┐
        │                         │                         │
        ▼                         ▼                         ▼
┌───────────────┐       ┌───────────────┐       ┌───────────────┐
│   Producer    │       │   Consumer    │       │   Consumer    │
│   Agent A     │──────▶│   Agent B     │       │   Agent C     │
│ (publishes)   │       │ (subscribes)  │       │ (subscribes)  │
└───────────────┘       └───────────────┘       └───────────────┘
        │                         │                         │
        └─────────────────────────┼─────────────────────────┘
                                  │
                         ┌────────▼────────┐
                         │  Event Store    │
                         │  (History)      │
                         └─────────────────┘

Event Types

Type Purpose Example
Command Request action CreateUserCommand
Event Report what happened UserCreatedEvent
Query Request data GetUserQuery
Notification Inform subscribers UserNotification

📬 Event Message Format

Standard Event Structure

{
  "event": {
    "id": "evt-20251129-143000-abc123",
    "type": "TaskCompletedEvent",
    "source": "/backend-architect",
    "timestamp": "2025-11-29T14:30:00Z",
    "version": "1.0",
    "correlation_id": "project-xyz-123",
    "causation_id": "evt-previous-id"
  },
  "payload": {
    "task_id": "T1",
    "task_name": "API Design",
    "status": "completed",
    "result": {
      "endpoints": 12,
      "schemas": 5
    },
    "metadata": {
      "duration_minutes": 45,
      "quality_score": 0.95
    }
  },
  "routing": {
    "topic": "project.tasks",
    "partition_key": "project-xyz",
    "priority": "normal"
  }
}

Event Categories

## Event Taxonomy

### Domain Events (What happened)
- TaskStartedEvent
- TaskCompletedEvent
- TaskFailedEvent
- DecisionMadeEvent
- ReviewRequestedEvent
- ReviewCompletedEvent

### Integration Events (Cross-agent)
- AgentHandoffEvent
- ContextSyncEvent
- DependencyResolvedEvent

### System Events (Infrastructure)
- AgentHealthEvent
- CheckpointCreatedEvent
- ErrorOccurredEvent

🔄 Pub/Sub Pattern

Publisher-Subscriber Setup

## Pub/Sub Configuration

### Topic: project.tasks
**Description:** All task-related events
**Publishers:** Any agent completing tasks
**Subscribers:**
- /dependency-manager - Track task completion
- /context-manager - Update project context
- /hierarchical-coordinator - Report to parent

### Topic: project.reviews
**Description:** Review workflow events
**Publishers:** Code authors
**Subscribers:**
- /code-reviewer - Pending reviews
- /security-auditor - Security reviews
- /test-engineer - Test requests

### Topic: project.alerts
**Description:** Critical notifications
**Publishers:** Any agent detecting issues
**Subscribers:**
- /incident-manager - Handle incidents
- All agents - Pause for blockers

Subscription Example

## Agent Subscription Configuration

### Agent: /frontend-specialist

**Subscriptions:**
| Topic | Filter | Action |
|-------|--------|--------|
| project.tasks | type=APIDesignCompleted | Start UI integration |
| project.reviews | target=frontend | Handle review request |
| project.alerts | severity=high | Pause and assess |

**Event Handler:**

On receiving `APIDesignCompleted`:
1. Extract API specification from payload
2. Update local context with endpoints
3. Begin component implementation
4. Publish `UIImplementationStarted`

🔀 Event-Driven Workflows

Workflow 1: Reactive Task Chain

## Reactive Task Chain

**Trigger:** UserStoryApproved event

### Event Flow:

1️⃣ **UserStoryApproved** (from /product-strategist)
   │
   ├──▶ /backend-architect subscribes
   │    └── Publishes: APIDesignStarted
   │
   ├──▶ /ux-designer subscribes
   │    └── Publishes: WireframeStarted
   │
   └──▶ /test-engineer subscribes
        └── Publishes: TestPlanStarted

2️⃣ **APIDesignCompleted** (from /backend-architect)
   │
   ├──▶ /python-pro subscribes
   │    └── Publishes: BackendImplementationStarted
   │
   └──▶ /database-specialist subscribes
        └── Publishes: SchemaDesignStarted

3️⃣ **BackendImplementationCompleted + WireframeCompleted**
   │
   └──▶ /frontend-specialist subscribes (waits for both)
        └── Publishes: FrontendImplementationStarted

4️⃣ **All Implementation Completed**
   │
   └──▶ /test-engineer subscribes
        └── Publishes: TestingStarted

### Timeline Visualization:

UserStoryApproved │ ├─▶ [backend-architect] ─────▶ APIDesignCompleted │ │ │ ├─▶ [python-pro] ─────▶ BackendDone │ │ │ ├─▶ [ux-designer] ─────▶ WireframeCompleted │ │ │ │ │ └──────────┬──────────────────────┘ │ ▼ │ [frontend-specialist] │ │ │ ▼ │ FrontendDone │ │ └─▶ [test-engineer] ◀─────────────────────┘ │ ▼ TestingCompleted

Workflow 2: Saga Pattern (Distributed Transaction)

## Saga: Feature Deployment

**Goal:** Deploy feature with rollback capability

### Saga Steps:

Step 1: BuildArtifact ✅ Success → Continue ❌ Failure → End (nothing to rollback)

Step 2: RunTests ✅ Success → Continue ❌ Failure → End (no deployment made)

Step 3: DeployToStaging ✅ Success → Continue ❌ Failure → Compensate: RemoveFromStaging

Step 4: RunE2ETests ✅ Success → Continue ❌ Failure → Compensate: RemoveFromStaging

Step 5: DeployToProduction ✅ Success → Complete ❌ Failure → Compensate: RollbackProduction, RemoveFromStaging


### Saga Events:

| Step | Success Event | Failure Event | Compensation |
|------|--------------|---------------|--------------|
| 1 | ArtifactBuilt | BuildFailed | None |
| 2 | TestsPassed | TestsFailed | None |
| 3 | StagingDeployed | StagingFailed | RemoveStaging |
| 4 | E2EPassed | E2EFailed | RemoveStaging |
| 5 | ProductionDeployed | ProductionFailed | RollbackAll |

### Saga Coordinator:

```json
{
  "saga_id": "deploy-feature-xyz",
  "current_step": 3,
  "status": "in_progress",
  "completed_steps": [
    {"step": 1, "event": "ArtifactBuilt"},
    {"step": 2, "event": "TestsPassed"}
  ],
  "compensation_stack": [
    {"step": 3, "compensate": "RemoveFromStaging"}
  ]
}

---

## 📊 Event Correlation

### Correlating Related Events

```markdown
## Event Correlation

**Correlation ID:** project-xyz-feature-123

All related events share this ID for tracking:

| Time | Event | Agent | Correlation ID |
|------|-------|-------|----------------|
| 10:00 | FeatureStarted | /orchestrator | project-xyz-feature-123 |
| 10:05 | DesignStarted | /backend-architect | project-xyz-feature-123 |
| 10:30 | DesignCompleted | /backend-architect | project-xyz-feature-123 |
| 10:35 | ImplementationStarted | /python-pro | project-xyz-feature-123 |
| 11:15 | ImplementationCompleted | /python-pro | project-xyz-feature-123 |
| 11:20 | TestingStarted | /test-engineer | project-xyz-feature-123 |
| 11:45 | TestingCompleted | /test-engineer | project-xyz-feature-123 |
| 11:50 | FeatureCompleted | /orchestrator | project-xyz-feature-123 |

### Correlation Query:
"Show all events for correlation_id = project-xyz-feature-123"

### Result:
Complete timeline of feature development with all agent interactions.

Event Aggregation

## Event Aggregation

**Aggregator:** Wait for multiple events before proceeding

### Configuration:
```json
{
  "aggregator_id": "phase1-complete",
  "wait_for": [
    {"type": "APIDesignCompleted", "from": "/backend-architect"},
    {"type": "WireframeCompleted", "from": "/ux-designer"},
    {"type": "TestPlanCompleted", "from": "/test-engineer"}
  ],
  "timeout": "2h",
  "on_complete": "Phase1CompletedEvent",
  "on_timeout": "Phase1TimeoutEvent"
}

Status:

Event Status Received At
APIDesignCompleted ✅ Received 10:30
WireframeCompleted ✅ Received 10:45
TestPlanCompleted ⏳ Waiting -

Aggregation Status: 2/3 events received, waiting for TestPlanCompleted


---

## ⚠️ Error Handling

### Dead Letter Queue

```markdown
## Dead Letter Queue (DLQ)

Events that fail processing go to DLQ for investigation.

### DLQ Contents:

| Event ID | Type | Failure Reason | Retries | Action |
|----------|------|----------------|---------|--------|
| evt-001 | TaskCompleted | Handler timeout | 3 | Investigate |
| evt-002 | ReviewRequested | Agent unavailable | 3 | Retry later |
| evt-003 | DeployCommand | Invalid payload | 1 | Fix and replay |

### DLQ Processing:

1. **Investigate:** Check why event failed
2. **Fix:** Correct the issue (handler bug, data issue)
3. **Replay:** Reprocess the event
4. **Archive:** If not recoverable, archive with notes

Retry Strategy

## Event Retry Configuration

**Default Retry Policy:**
```json
{
  "max_retries": 3,
  "backoff_type": "exponential",
  "initial_delay": "1s",
  "max_delay": "30s",
  "retry_on": ["timeout", "temporary_failure"],
  "no_retry_on": ["invalid_payload", "unauthorized"]
}

Retry Timeline:

Attempt 1: Immediate
Attempt 2: After 1s
Attempt 3: After 2s
Attempt 4: After 4s (if configured)
→ DLQ: After all retries exhausted

---

## 📈 Event Monitoring

### Event Dashboard

```markdown
## Event System Dashboard

### Throughput (Last Hour)

Events Published: ████████████████████ 1,247 Events Consumed: ███████████████████░ 1,198 Events Failed: █░░░░░░░░░░░░░░░░░░░ 49 Events in DLQ: ░░░░░░░░░░░░░░░░░░░░ 12


### By Topic
| Topic | Published | Consumed | Lag |
|-------|-----------|----------|-----|
| project.tasks | 450 | 448 | 2 |
| project.reviews | 120 | 120 | 0 |
| project.alerts | 15 | 15 | 0 |

### Agent Activity
| Agent | Published | Consumed | Processing |
|-------|-----------|----------|------------|
| /backend-architect | 85 | 120 | 2 |
| /frontend-specialist | 75 | 95 | 1 |
| /test-engineer | 45 | 180 | 0 |

### Health
- Event Bus: 🟢 Healthy
- Average Latency: 45ms
- Consumer Lag: Low

🔀 Choreography vs Orchestration

Choreography (Decentralized)

## Choreography Pattern

Each agent knows what to do when receiving events.
No central coordinator needed.

**Flow:**

[Agent A] ─publishes─▶ EventX │ ┌───────────┼───────────┐ ▼ ▼ ▼ [Agent B] [Agent C] [Agent D] (reacts) (reacts) (reacts) │ │ │ ▼ ▼ ▼ EventY EventZ EventW


**Pros:**
- Loose coupling
- Agents are independent
- Easy to add new agents

**Cons:**
- Hard to track overall flow
- Debugging complex
- No central control

**Best for:** Simple workflows, microservices

> ⚠️ Content truncated at 500 lines. See original agent in `ai-agents-store 2/Project/agents/event-driven-coordinator.md` for full content.
Usage Guidance
This skill appears safe to install as an instruction-only coordination guide. Before using it for real multi-agent automation, make sure event sources are trusted, event data is validated, context retention is bounded, and important downstream actions require human approval.
Capability Analysis
Type: OpenClaw Skill Name: ah-event-driven-coordinator Version: 1.0.0 The skill bundle contains architectural documentation and persona instructions for an AI agent to act as an event-driven systems coordinator. It describes standard patterns like Pub/Sub, Saga, and CQRS using JSON templates and markdown diagrams. There is no executable code, no evidence of data exfiltration, and no malicious prompt injection; the content is entirely focused on simulating or managing asynchronous agent workflows (SKILL.md).
Capability Assessment
Purpose & Capability
The stated purpose and visible instructions align around event-driven architecture, pub/sub, and reactive multi-agent workflows; no unrelated commands, credentials, or data access are shown.
Instruction Scope
The skill describes event-triggered activation and chain reactions across agents. That is purpose-aligned, but users should bound it to trusted events and require review before consequential actions.
Install Mechanism
There is no install spec, required binary, environment variable, credential, or code file. The static scanner reported no findings.
Credentials
The artifacts do not request local system access, network access, credentials, or privileged environment configuration.
Persistence & Privilege
The skill discusses an event store, history, and local context updates. No actual persistence mechanism is provided, but users should be aware that an implementation could retain and reuse cross-agent context.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ah-event-driven-coordinator
  3. After installation, invoke the skill by name or use /ah-event-driven-coordinator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release — part of 188 AI agent skills collection by MTNT Solutions
Metadata
Slug ah-event-driven-coordinator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is event-driven-coordinator?

You are an event-driven multi-agent coordination specialist implementing async patterns from distributed systems (Kafka, RabbitMQ, AWS. Use when: event-drive... It is an AI Agent Skill for Claude Code / OpenClaw, with 9 downloads so far.

How do I install event-driven-coordinator?

Run "/install ah-event-driven-coordinator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is event-driven-coordinator free?

Yes, event-driven-coordinator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does event-driven-coordinator support?

event-driven-coordinator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created event-driven-coordinator?

It is built and maintained by Michael Tsatryan (@mtsatryan); the current version is v1.0.0.

💬 Comments