Run it
Extending Brigade
Brigade ships a typed extension SDK. Drop a module into ~/.brigade/extensions/, register against a slot, and it loads at boot. The same SDK powers the built-in providers.
A module#
An extension is a default-exported module built with defineModule. Inside, you call the registry methods for whatever slots you implement:
~/.brigade/extensions/my-ext.ts
import { defineModule } from "@spinabot/brigade/extension-sdk"; export default defineModule((b) => { b.tool({ /* a custom agent tool */ }); b.webSearch({ /* a search provider */ }); b.channel({ /* a messaging adapter */ }); b.gatewayMethod({ /* a gateway RPC */ });});The slots#
| Status | Slots |
|---|---|
| Shipped | tool, hook, command, modelProvider, channel, webSearch, webFetch, integration, service, httpRoute, gatewayMethod |
| Contract locked, on the roadmap | Voice/media — tts, stt, mediaGen — and a pluggable memory backend. The contracts are defined; implementations are on the roadmap. |
Common recipes#
Each surface follows the same pattern — implement the contract, register against the slot:
| To add a… | Do this |
|---|---|
| Tool | Implement the tool and register with b.tool(...); choose an owner-gate posture (per-call is recommended). See Tools. |
| Channel | Implement the channel-adapter contract, register with b.channel(...), lazy-load heavy deps, and ship reconnect + dedupe handling. See Channels. |
| Web search / fetch provider | Register with b.webSearch(...) / b.webFetch(...); Brigade auto-selects by what is configured. |
| Model provider | Register with b.modelProvider(...) for a new backend. |
| Gateway RPC / HTTP route | Register with b.gatewayMethod(...) or b.httpRoute(...). |
| Skill | No code needed — drop a folder with a SKILL.md. See Skills. |
Discovery
Modules are discovered from the bundled set and from
~/.brigade/extensions/. The loader honours the defineModule export. The public SDK is imported from @spinabot/brigade/extension-sdk.