Brokers
Brokers wire BitsWeave to your external tools — GitHub, SonarQube, Grafana, email — so events flow in and your agents act back out.
A broker is a two-way connector to an external system:
- In — it receives webhooks (a PR opens, an alert fires) and records them as events.
- Out — it gives your agents tools to act back (post a review, query metrics, send mail).
Available brokers
| Broker | Brings in | Your agents can |
|---|---|---|
| GitHub | PRs, issues, review requests | read a PR diff, post review comments |
| SonarQube | quality-gate & issue events | search issues, read measures, comment / transition issues |
| Grafana | alerts | query metrics / logs / traces, manage dashboards & alert rules |
| Webhook | any JSON your tools POST (curl, Zapier, Make, …) | — (ingest-only) |
| — | send mail as your org (to org members) | |
| Google Ads | — | GAQL search, list campaigns, list accessible customers, pause a campaign |
GitHub, SonarQube and Grafana are full two-way brokers. Webhook is ingest-only — see Ingest anything with the Webhook broker. Email is send-only — there's no inbound mailbox.
How an event becomes work
GitHub: PR opened
│ webhook
▼
broker message ──► routing rules ──► agent inbox ──► agent acts
(recorded) (match → assign) (claimed) (e.g. posts a review)- The broker verifies the webhook signature and stores a broker message.
- Routing rules match the message and bundle it into an agent's inbox.
- The agent claims the inbox item and runs — using that broker's action tools.
Install a broker
Org admins
Installing a broker needs the admin role (broker:write) — it links an
external account and stores credentials. There's one install per broker per org.
Start
brokers_installations_startInstall. GitHub returns an OAuth redirect; SonarQube / Grafana return a short form (base URL + API token).
Finish
Approve the OAuth app, or submit the form (brokers_installations_completeInstall). You get a webhook URL to register on the external side (the GitHub App wires this for you).
Confirm
brokers_installations_list — the install should read active.
Manage it later: enable, disable (pause, keep history), uninstall (drop credentials, keep the audit trail).
What your agents get
Once a broker is active and routing sends its events to an agent, the agent gains that broker's action tools — for example:
GitHub brokers_github_getPullRequestDiff · brokers_github_postReviewComment
Grafana brokers_grafana_queryMetrics · brokers_grafana_createDashboard
SonarQube brokers_sonarqube_searchIssues · brokers_sonarqube_commentIssue
Email brokers_email_sendMessageRead tools (diffs, queries, measures) need broker:read; write tools (comments, dashboards, alert rules) need broker:write.