Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fluffbuzz.com/llms.txt

Use this file to discover all available pages before exploring further.

Plugins extend FluffBuzz with new capabilities: channels, model providers, speech, realtime transcription, realtime voice, media understanding, image generation, video generation, web fetch, 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 with fluffbuzz 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 install done

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
For a channel plugin that isn’t guaranteed to be installed when onboarding/setup runs, use createOptionalChannelSetupSurface(...) from fluffbuzz/plugin-sdk/channel-setup. It produces a setup adapter + wizard pair that advertises the install requirement and fails closed on real config writes until the plugin is installed.

Quick start: tool plugin

This walkthrough creates a minimal plugin that registers an agent tool. Channel and provider plugins have dedicated guides linked above.
1

Create the package and manifest

{
  "name": "@myorg/fluffbuzz-my-plugin",
  "version": "1.0.0",
  "type": "module",
  "fluffbuzz": {
    "extensions": ["./index.ts"],
    "compat": {
      "pluginApi": ">=2026.3.24-beta.2",
      "minGatewayVersion": "2026.3.24-beta.2"
    },
    "build": {
      "fluffbuzzVersion": "2026.3.24-beta.2",
      "pluginSdkVersion": "2026.3.24-beta.2"
    }
  }
}
Every plugin needs a manifest, even with no config. See Manifest for the full schema. The canonical ClawHub publish snippets live in docs/snippets/plugin-publish/.
2

Write the entry point

// index.ts
import { definePluginEntry } from "fluffbuzz/plugin-sdk/plugin-entry";
import { Type } from "@sinclair/typebox";

export default definePluginEntry({
  id: "my-plugin",
  name: "My Plugin",
  description: "Adds a custom tool to FluffBuzz",
  register(api) {
    api.registerTool({
      name: "my_tool",
      description: "Do a thing",
      parameters: Type.Object({ input: Type.String() }),
      async execute(_id, params) {
        return { content: [{ type: "text", text: `Got: ${params.input}` }] };
      },
    });
  },
});
definePluginEntry is for non-channel plugins. For channels, use defineChannelPluginEntry — see Channel Plugins. For full entry point options, see Entry Points.
3

Test and publish

External plugins: validate and publish with ClawHub, then install:
buzzhub package publish your-org/your-plugin --dry-run
buzzhub package publish your-org/your-plugin
fluffbuzz plugins install buzzhub:@myorg/fluffbuzz-my-plugin
FluffBuzz also checks ClawHub before npm for bare package specs like @myorg/fluffbuzz-my-plugin.In-repo plugins: place under the bundled plugin workspace tree — automatically discovered.
pnpm test -- <bundled-plugin-root>/my-plugin/

Plugin capabilities

A single plugin can register any number of capabilities via the api object:
CapabilityRegistration methodDetailed guide
Text inference (LLM)api.registerProvider(...)Provider Plugins
CLI inference backendapi.registerCliBackend(...)CLI Backends
Channel / messagingapi.registerChannel(...)Channel Plugins
Speech (TTS/STT)api.registerSpeechProvider(...)Provider Plugins
Realtime transcriptionapi.registerRealtimeTranscriptionProvider(...)Provider Plugins
Realtime voiceapi.registerRealtimeVoiceProvider(...)Provider Plugins
Media understandingapi.registerMediaUnderstandingProvider(...)Provider Plugins
Image generationapi.registerImageGenerationProvider(...)Provider Plugins
Music generationapi.registerMusicGenerationProvider(...)Provider Plugins
Video generationapi.registerVideoGenerationProvider(...)Provider Plugins
Web fetchapi.registerWebFetchProvider(...)Provider Plugins
Web searchapi.registerWebSearchProvider(...)Provider Plugins
Embedded Pi extensionapi.registerEmbeddedExtensionFactory(...)SDK Overview
Agent toolsapi.registerTool(...)Below
Custom commandsapi.registerCommand(...)Entry Points
Event hooksapi.registerHook(...)Entry Points
HTTP routesapi.registerHttpRoute(...)Internals
CLI subcommandsapi.registerCli(...)Entry Points
For the full registration API, see SDK Overview. Use api.registerEmbeddedExtensionFactory(...) when a plugin needs Pi-native embedded-runner hooks such as async tool_result rewriting before the final tool result message is emitted. Prefer regular FluffBuzz plugin hooks when the work does not need Pi extension timing. If your plugin registers custom gateway RPC methods, keep them on a plugin-specific prefix. Core admin namespaces (config.*, exec.approvals.*, wizard.*, update.*) stay reserved and always resolve to operator.admin, even if a plugin asks for a narrower scope. Hook guard semantics to keep in mind:
  • before_tool_call: { block: true } is terminal and stops lower-priority handlers.
  • before_tool_call: { block: false } is treated as no decision.
  • before_tool_call: { requireApproval: true } pauses agent execution and prompts the user for approval via the exec approval overlay, Telegram buttons, Discord interactions, or the /approve command on any channel.
  • before_install: { block: true } is terminal and stops lower-priority handlers.
  • before_install: { block: false } is treated as no decision.
  • message_sending: { cancel: true } is terminal and stops lower-priority handlers.
  • message_sending: { cancel: false } is treated as no decision.
  • message_received: prefer the typed threadId field when you need inbound thread/topic routing. Keep metadata for channel-specific extras.
  • message_sending: prefer typed replyToId / threadId routing fields over channel-specific metadata keys.
The /approve command handles both exec and plugin approvals with bounded fallback: when an exec approval id is not found, FluffBuzz retries the same id through plugin approvals. Plugin approval forwarding can be configured independently via approvals.plugin in config. If custom approval plumbing needs to detect that same bounded fallback case, prefer isApprovalNotFoundError from fluffbuzz/plugin-sdk/error-runtime instead of matching approval-expiry strings manually. See SDK Overview hook decision semantics for details.

Registering agent tools

Tools are typed functions the LLM can call. They can be required (always available) or optional (user opt-in):
register(api) {
  // Required tool — always available
  api.registerTool({
    name: "my_tool",
    description: "Do a thing",
    parameters: Type.Object({ input: Type.String() }),
    async execute(_id, params) {
      return { content: [{ type: "text", text: params.input }] };
    },
  });

  // Optional tool — user must add to allowlist
  api.registerTool(
    {
      name: "workflow_tool",
      description: "Run a workflow",
      parameters: Type.Object({ pipeline: Type.String() }),
      async execute(_id, params) {
        return { content: [{ type: "text", text: params.pipeline }] };
      },
    },
    { optional: true },
  );
}
Users enable optional tools in config:
{
  tools: { allow: ["workflow_tool"] },
}
  • Tool names must not clash with core tools (conflicts are skipped)
  • Use optional: true for 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 focused fluffbuzz/plugin-sdk/<subpath> paths:
import { definePluginEntry } from "fluffbuzz/plugin-sdk/plugin-entry";
import { createPluginRuntimeStore } from "fluffbuzz/plugin-sdk/runtime-store";

// Wrong: monolithic root (deprecated, will be removed)
import { ... } from "fluffbuzz/plugin-sdk";
For the full subpath reference, see SDK Overview. Within your plugin, use local barrel files (api.ts, runtime-api.ts) for internal imports — never import your own plugin through its SDK path. For provider plugins, keep provider-specific helpers in those package-root barrels unless the seam is truly generic. Current bundled examples:
  • Anthropic: Claude stream wrappers and service_tier / beta helpers
  • OpenAI: provider builders, default-model helpers, realtime providers
  • OpenRouter: provider builder plus onboarding/config helpers
If a helper is only useful inside one bundled provider package, keep it on that package-root seam instead of promoting it into fluffbuzz/plugin-sdk/*. Some generated fluffbuzz/plugin-sdk/<bundled-id> helper seams still exist for bundled-plugin maintenance and compatibility, for example plugin-sdk/feishu-setup or plugin-sdk/zalo-setup. Treat those as reserved surfaces, not as the default pattern for new third-party plugins.

Pre-submission checklist

package.json has correct fluffbuzz metadata
fluffbuzz.plugin.json manifest is present and valid
Entry point uses defineChannelPluginEntry or definePluginEntry
All imports use focused plugin-sdk/<subpath> paths
Internal imports use local modules, not SDK self-imports
Tests pass (pnpm test -- <bundled-plugin-root>/my-plugin/)
pnpm check passes (in-repo plugins)

Beta Release Testing

  1. Watch for GitHub release tags on fluffbuzz/fluffbuzz and subscribe via Watch > Releases. Beta tags look like v2026.3.N-beta.1. You can also turn on notifications for the official FluffBuzz X account @fluffbuzz for release announcements.
  2. Test your plugin against the beta tag as soon as it appears. The window before stable is typically only a few hours.
  3. Post in your plugin’s thread in the plugin-forum Discord channel after testing with either all good or what broke. If you do not have a thread yet, create one.
  4. If something breaks, open or update an issue titled Beta blocker: <plugin-name> - <summary> and apply the beta-blocker label. Put the issue link in your thread.
  5. Open a PR to main titled fix(<plugin-id>): beta blocker - <summary> and link the issue in both the PR and your Discord thread. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation. Blockers with a PR get merged; blockers without one might ship anyway. Maintainers watch these threads during beta testing.
  6. Silence means green. If you miss the window, your fix likely lands in the next cycle.

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