Building Plugins
Plugins extend FluffBuzz with new capabilities: channels, model providers, speech, image generation, web search, agent tools, or any combination. You do not need to add your plugin to the FluffBuzz repository. Publish to ClawHub or npm and users install withfluffbuzz plugins install <package-name>. FluffBuzz tries ClawHub first and
falls back to npm automatically.
Prerequisites
- Node >= 22 and a package manager (npm or pnpm)
- Familiarity with TypeScript (ESM)
- For in-repo plugins: repository cloned and
pnpm installdone
What kind of plugin?
Channel plugin
Connect FluffBuzz to a messaging platform (Discord, IRC, etc.)
Provider plugin
Add a model provider (LLM, proxy, or custom endpoint)
Tool / hook plugin
Register agent tools, event hooks, or services — continue below
Quick start: tool plugin
This walkthrough creates a minimal plugin that registers an agent tool. Channel and provider plugins have dedicated guides linked above.Create the package and manifest
Write the entry point
definePluginEntry is for non-channel plugins. For channels, use
defineChannelPluginEntry — see Channel Plugins.
For full entry point options, see Entry Points.Test and publish
External plugins: publish to ClawHub or npm, then install:FluffBuzz checks ClawHub first, then falls back to npm.In-repo plugins: place under
extensions/ — automatically discovered.Plugin capabilities
A single plugin can register any number of capabilities via theapi object:
| Capability | Registration method | Detailed guide |
|---|---|---|
| Text inference (LLM) | api.registerProvider(...) | Provider Plugins |
| Channel / messaging | api.registerChannel(...) | Channel Plugins |
| Speech (TTS/STT) | api.registerSpeechProvider(...) | Provider Plugins |
| Media understanding | api.registerMediaUnderstandingProvider(...) | Provider Plugins |
| Image generation | api.registerImageGenerationProvider(...) | Provider Plugins |
| Web search | api.registerWebSearchProvider(...) | Provider Plugins |
| Agent tools | api.registerTool(...) | Below |
| Custom commands | api.registerCommand(...) | Entry Points |
| Event hooks | api.registerHook(...) | Entry Points |
| HTTP routes | api.registerHttpRoute(...) | Internals |
| CLI subcommands | api.registerCli(...) | Entry Points |
Registering agent tools
Tools are typed functions the LLM can call. They can be required (always available) or optional (user opt-in):- Tool names must not clash with core tools (conflicts are skipped)
- Use
optional: truefor tools with side effects or extra binary requirements - Users can enable all tools from a plugin by adding the plugin id to
tools.allow
Import conventions
Always import from focusedfluffbuzz/plugin-sdk/<subpath> paths:
api.ts, runtime-api.ts) for
internal imports — never import your own plugin through its SDK path.
Pre-submission checklist
package.json has correct
fluffbuzz metadatafluffbuzz.plugin.json manifest is present and valid
Entry point uses
defineChannelPluginEntry or definePluginEntryAll imports use focused
plugin-sdk/<subpath> pathsInternal imports use local modules, not SDK self-imports
Tests pass (
pnpm test -- extensions/my-plugin/)pnpm check passes (in-repo plugins)Next steps
Channel Plugins
Build a messaging channel plugin
Provider Plugins
Build a model provider plugin
SDK Overview
Import map and registration API reference
Runtime Helpers
TTS, search, subagent via api.runtime
Testing
Test utilities and patterns
Plugin Manifest
Full manifest schema reference