agent-message-broker
/agent-message-broker
Subscribe running coding-agent sessions to real-world event topics (GitHub, Jira, Google Workspace, polled URLs, webhooks) via the amb CLI, and react to events the broker delivers mid-session. Use when an amb event arrives in this session, or when the user asks to wire an event source or topic to an agent session.
- Author
- bitnahian ↗
- Repository
- agent-message-broker ↗
- Licence
- MIT
- Last repository change
- 09.09.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 09.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Subscribe running coding-agent sessions to real-world event topics (GitHub, Jira, Google Workspace, polled URLs, webhooks) via the amb CLI, and react to events the broker delivers mid-session. Use when an amb event arrives in this session, or when the user asks to wire an event source or topic to an agent session.
Original author description
Subscribe running coding-agent sessions to real-world event topics (GitHub, Jira, Google Workspace, polled URLs, webhooks) via the amb CLI, and react to events the broker delivers mid-session. Use when an amb event arrives in this session, or when the user asks to wire an event source or topic to an agent session.
How it works
- Prerequisites
- When an event arrives in this session
- Discovering state
- Subscribing this session to a topic
- Credentials for event sources
- Design rules to respect
SKILL.md preview
---
name: agent-message-broker
description: Subscribe running coding-agent sessions to real-world event topics (GitHub, Jira, Google Workspace, polled URLs, webhooks) via the amb CLI, and react to events the broker delivers mid-session. Use when an amb event arrives in this session, or when the user asks to wire an event source or topic to an agent session.
---
# agent-message-broker (amb)
amb is a local pub/sub broker that routes external events into running coding-agent sessions. Event sources publish to **topics**; **subscriptions** bind a topic to a live agent session and render each event with a template. Everything is available over the `amb` CLI — you can wire sources and subscribe yourself without any UI.
## Prerequisites
- Node >= 22.5. The CLI is `amb` (or `npx agent-message-broker …`).
- The broker must be running locally at `http://127.0.0.1:4733`. Check with:
```bash
amb doctor # broker health + registered agent kinds
```
If it is not running, tell the user; start it only if asked (`npx agent-message-broker`).
- CLI auth is automatic: the broker's bearer token lives at
`~/.config/agent-message-broker/token` (mode 0600) and the CLI picks it up.
Never print or exfiltrate this token.
## When an event arrives in this session
Events are delivered as rendered text from the subscription's template — `{{kind}}` is the event type, `{{payload}}` its JSON. The frame may be mid-conversation (steered into your active turn). React in the current conversation:
1. Parse the intent from `kind` and `payload` (do not ask the user to re-paste it).
2. If you need more history, inspect the topic: `amb events list --topic <name> --limit 20`.
3. Act on the event (the event usually names a concrete artifact: a PR, ticket, doc, URL).
4. Keep going; do not stop and wait unless the event is genuinely ambiguous.
## Discovering state
```bash
amb topics list # existing topics + retention
amb sources list # wired sources per topic
amb sources running # which feeds are actively polling
amb sessions # live agent sessions visible to the broker
amb events list --topic <idOrName> # recent retained events (replay window)
amb deliveries [eventId] # audit delivery attempts per event
```
Events persist per-topic up to `retainN` even with zero subscribers, so a new subscription can replay the recent window — you never need to ask the user "what did I miss" if it is within retention.
## Subscribing this session to a topic
If a topic already exists, one command suffices (get your session id from `amb sessions` or ask the user):
```bash
amb subscriptions create --topic <idOrName> --agent pi|claude|codex --session <sessionId> \
--template "PR event {{kind}}: {{payload}}"
```
To create the whole wiring from scratch:
```bash
amb topics create <name> --retain 100
amb sources create --topic <name> --kind <kind> --options '{…}'
amb sources start <sourceId> # sources start stopped; this begins polling
```
Source kinds and their `--options` JSON: see [references/sources.md](references/sources.md).
Delivery mechanisms per agent kind and the delivery audit model: see [references/delivery.md](references/delivery.md).
## Credentials for event sources
Vendors are polled with the developer's own credentials, scaffolded once:
```bash
amb config init --kind github # then fill ~/.amb/github/credentials.json
amb config init --kind jira # → ~/.amb/jira/credentials.json (email, apiToken, domain)
amb config init --kind google # service-account JSON, or `amb google login` for OAuth
```
If a source fails auth, point the user at the relevant `~/.amb/<kind>/credentials.json` — do not attempt to create vendor credentials yourself.
## Design rules to respect
- Prefer an existing topic/source over creating a duplicate; list first.
- Choose `intervalMs` conservatively (60s+ for most feeds) — this is a local machine.
- Use `--template` to make delivered frames self-describing; the payload is raw JSON.
- Webhook delivery is an opt-in tier (requires a tunnel); polling is the default and needs nothing internet-reachable.
Files in this package (3)
- SKILL.md 4 KB
- references/delivery.md 2 KB
- references/sources.md 3 KB
Versions
The database has no other skills named agent-message-broker.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version d57e18283e2d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 3 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90amb-bot-dev
Build or change a catalog bot for AnyModelBot (a folder under bots/ with its own UI). Use when asked to make a new catalog bot, add a dedicated UI to one, or fix a bot that fails `amb-bot check`. - 100agent-session-control
Run locally owned coding-agent sessions with the agent-session-control CLI: plan or host a session, submit one prompt turn, and observe the run. Use for local session control; not a task scheduler, planner, or permission bypass. - 100claude-peers
Discover, message, and coordinate AI coding agents (Claude Code, Codex CLI) running on the same machine via a shared Unix socket broker backed by SQLite. The broker wakes recipients natively (Claude inbox socket, codex queue) and turn-boundary hooks catch missed wakes. Supports… - 100claude-code-session-broker
Use when running Arcgentic V2 in Claude Code and fixed Planner, Developer, and Auditor role sessions must be coordinated through a broker. - 100cloud-pilot
Use in the Claude Code CLI when work should run in a Claude Code cloud session (it touches several files, has several steps, or needs long tests or builds, with no step that only this machine can do), when the person asks about their cloud sessions, or when a cloud-pilot event… - 100wire-pi
Work as a wire agent from inside the Pi coding agent. Use when the user wants to talk to another agent, pair this Pi session with a peer, read a wire inbox, or asks who you are on wire. Covers the per-session identity model, the tool surface, and the consent rules that gate pairing.