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 ──► record mappings ──► records ──► your agents read & act
(recorded) (you configure) (context) (e.g. post a review)- The broker verifies the webhook signature and stores a broker message.
- Record mappings you configure project matching messages into records (see Map events to records).
- Your connected agents read those records and use the 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, your agents can use its 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.