Skip to main content
BitsWeave
Concepts

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

BrokerBrings inYour agents can
GitHubPRs, issues, review requestsread a PR diff, post review comments
SonarQubequality-gate & issue eventssearch issues, read measures, comment / transition issues
Grafanaalertsquery metrics / logs / traces, manage dashboards & alert rules
Webhookany JSON your tools POST (curl, Zapier, Make, …)— (ingest-only)
Email—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)
  1. The broker verifies the webhook signature and stores a broker message.
  2. Record mappings you configure project matching messages into records (see Map events to records).
  3. 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_sendMessage

Read tools (diffs, queries, measures) need broker:read; write tools (comments, dashboards, alert rules) need broker:write.

On this page