Hook Store
Prebuilt hooks for Busbar.
A hook runs on the request path — a tap that watches, or a
gate that decides: reject, restrict, route, or rewrite. Because hooks fire on
Busbar’s normalized IR, you write one once and it runs against all six protocols and every
provider, with failover and circuit breaking underneath it, in one hop.
Busbar is where your AI middleware runs — and this is where you pick up the
parts already built. Register any of them in a hooks: block or over the admin API.
In the store
Headroom
Context compression, on the path.
A rewrite gate that trims and compacts a request’s context before it ships, so a long conversation stays under the window without your app rebuilding the prompt. Written once, it works against every protocol and provider Busbar speaks. Measured: about 50% fewer input tokens on noisy histories for sub-millisecond overhead; short chats pass through untouched.
Powered by the open-source Headroom project.
Smart Router
Route by cost, latency, and live load.
A worked example, not a finished product: a routing gate that picks the backend per request from real signals — each member’s cost, latency, live concurrency, and rate headroom. It’s a template to read, fork, and shape into the router you actually want.
Read the write-up: the smart router you want is a hook.
Your hook
Built something worth sharing?
A guardrail, a router, a cost meter, an audit sink — anything that runs on the path. Tell us what it does and where it lives, and we’ll list it here and link straight to your repo.
Email us, or open a PR against the repo.
PII Guard
Redact sensitive data before it leaves.
A gate that inspects and rewrites the request body, stripping or masking sensitive data — credit-card numbers, SSNs and other socials, patient records — before it reaches any provider. One guard covers every model behind Busbar, so the redaction rule lives in one place, not in every app.
Secret Shield
Keep your .env out of the prompt.
AI coding agents load your .env into memory and can slip those secrets into a prompt — where they get logged, committed, or exfiltrated. A gate that scrubs the outbound body against your registered secrets catches them before the request ever leaves, for every provider at once.
SIEM Audit
Every call, in your security stack.
A fire-and-forget tap that streams the full request and response to your SIEM or compliance archive without touching the hop. A complete, provider-agnostic audit trail for every AI call your org makes.
Semantic Cache
Skip the call when you already know the answer.
A gate that recognises a request it has answered before and short-circuits it — returning the cached response instead of paying for the round-trip. Provider-agnostic, so the cache spans every model behind Busbar.
New to hooks? Start with the hooks docs for the config shape, the tap/gate lifecycle, and how a hook falls back safely without ever blocking a request.