Skip to content

The open-source event bus for AI agents. Webhooks in. Agent actions out.

License

Notifications You must be signed in to change notification settings

Kanevry/agentbus

AgentBus

The open-source event bus for AI agents. Webhooks in. Agent actions out.

npm version MIT License TypeScript CI Status


Why

AI agents need events to act on. But connecting webhooks to agents means writing custom HTTP servers, parsing payloads, handling retries, and managing queues — for every single integration.

AgentBus is a lightweight, self-hosted event bus that handles all of that. Receive webhooks. Route to agents. Dispatch actions. Works with any AI framework: CrewAI, LangGraph, OpenAI Agents SDK, or plain HTTP.

Quick Start

npm install agentbus
import { AgentBus } from 'agentbus';

const bus = new AgentBus({
  handlers: [
    {
      name: 'issue-triage',
      pattern: 'github:issues.*',
      handle: async (ctx) => {
        ctx.logger.info(`New issue: ${ctx.event.payload.title}`);
        // Call your AI agent here
        return { success: true };
      },
    },
  ],
});

// Receive an event
await bus.emit({
  source: 'github',
  type: 'issues.opened',
  payload: { title: 'Bug: login fails', labels: ['bug'] },
});

Features

Feature Community (Free) Pro
Webhook Ingestion ✅ Unlimited ✅ + Verified Sources
Routing ✅ Glob Patterns ✅ + Content-based
Queue ✅ In-Memory + BullMQ ✅ + Rate Limiting
Storage ✅ SQLite + PostgreSQL ✅ + Event Replay, DLQ
Agents ✅ HTTP Adapter ✅ + A2A, MCP Server
Dispatch ✅ Unlimited ✅ + Dedup, Filters
Support GitHub Issues Priority Email

Architecture

Webhooks (GitHub, Stripe, Sentry, ...)
            │
            ▼
     ┌──────────────┐
     │   AgentBus    │
     │  ┌──────────┐ │
     │  │  Router   │ │  ← Glob pattern matching
     │  └──────────┘ │
     │  ┌──────────┐ │
     │  │  Queue    │ │  ← In-memory or BullMQ
     │  └──────────┘ │
     │  ┌──────────┐ │
     │  │  Store    │ │  ← SQLite or PostgreSQL
     │  └──────────┘ │
     └──────────────┘
            │
            ▼
     AI Agents (HTTP, CrewAI, LangGraph, ...)

Integrations

AgentBus works with any AI agent framework:

  • HTTP — POST events to any endpoint
  • CrewAI — Trigger crew tasks from webhooks
  • LangGraph — Send events to LangGraph workflows
  • OpenAI Agents SDK — Dispatch to OpenAI agents
  • A2A Protocol — Agent-to-agent communication (Pro)
  • MCP Server — Model Context Protocol integration (Pro)

Documentation

Visit agentbus.dev for full documentation.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT — AgentBus core is free and open source.

@agentbus/pro is available under a commercial license.

About

The open-source event bus for AI agents. Webhooks in. Agent actions out.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •