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)
Emailsend mail as your org (to org members)
Google AdsGAQL 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)
  1. The broker verifies the webhook signature and stores a broker message.
  2. Routing rules match the message and bundle it into an agent's inbox.
  3. 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_sendMessage

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

On this page