Extensions — Modular Plugin Ecosystem

91 extensions · 8 categories · One unified Plugin SDK

The Extensions directory is OpenClaw’s entire integration surface — every AI provider, messaging channel, search engine, voice service, and utility tool lives here as a self-contained plugin package discovered through definePluginEntry() and registered via OpenClawPluginApi.

91
Extensions
8
Categories
30+
AI Providers
20+
Channels
TS
Language

Plugin SDK Hot Reload Manifest-Driven Sandboxed Imports

📚 What is the Extensions ecosystem?

Extensions are self-contained plugin packages that add capabilities to OpenClaw without modifying its core. Each extension declares its capabilities in a package.json manifest with an openclaw.extensions field and exports a single entry point that receives the OpenClawPluginApi registration object. The core never deep-imports extension internals — all communication flows through the Plugin SDK contract.

💡 Real-world analogy

Think of extensions like USB peripherals. Each device (extension) conforms to the USB spec (Plugin SDK), declares its device class (provider, channel, tool), and plugs into any compatible port. The OS (OpenClaw core) discovers capabilities through a standard descriptor (manifest) and routes traffic without knowing the device’s internal wiring. You can hot-plug new devices or remove them — the system keeps running.

Architecture

Extensions sit between external services and OpenClaw’s core gateway. The Plugin SDK provides the contract boundary — extensions import only from openclaw/plugin-sdk/* subpaths, never from src/** internals.

flowchart LR
  subgraph External["External Services"]
    LLM["LLM APIs"]
    Chat["Chat Platforms"]
    Search["Search Engines"]
    Voice["Voice Services"]
  end
  subgraph Extensions["extensions/"]
    Providers["Provider Extensions"]
    Channels["Channel Extensions"]
    SearchExt["Search Extensions"]
    MediaExt["Media Extensions"]
    Utils["Utility Extensions"]
  end
  subgraph Core["OpenClaw Core"]
    SDK["Plugin SDK"]
    Gateway["Gateway"]
    Agent["Agent Engine"]
  end
  LLM --> Providers
  Chat --> Channels
  Search --> SearchExt
  Voice --> MediaExt
  Providers --> SDK
  Channels --> SDK
  SearchExt --> SDK
  MediaExt --> SDK
  Utils --> SDK
  SDK --> Gateway
  Gateway --> Agent

Extension Registration Flow

When OpenClaw boots, the plugin loader scans package.json manifests, resolves entry points, and calls each extension’s register(api) function. The registration API accumulates providers, channels, hooks, tools, and HTTP routes into the core registry.

sequenceDiagram
  participant Loader as Plugin Loader
  participant Manifest as package.json
  participant Entry as Extension Entry
  participant API as OpenClawPluginApi
  participant Registry as Core Registry
  Loader->>Manifest: Read openclaw.extensions[]
  Loader->>Entry: import default export
  Entry->>API: definePluginEntry({ id, register })
  API->>Entry: register(api) callback
  Entry->>API: api.registerProvider(...)
  Entry->>API: api.registerChannel(...)
  Entry->>API: api.registerHook(...)
  API->>Registry: Accumulate registrations
  Registry-->>Loader: Extension ready

🚶 Step-by-Step: Loading the OpenAI Extension

Follow a single extension from discovery to active registration:

  1. Discovery — Plugin loader reads extensions/openai/package.json and finds "openclaw": {"extensions": ["./index.ts"]}.
  2. Import — The loader dynamically imports the default export from extensions/openai/index.ts.
  3. Entry Definition — definePluginEntry() wraps the metadata (id, name, description) and the register callback into a DefinedPluginEntry object.
  4. API Injection — Core creates an OpenClawPluginApi instance scoped to this extension, with config, logger, and runtime context.
  5. Registration — The register(api) callback fires. OpenAI registers a provider via api.registerProvider(), a speech provider via api.registerSpeechProvider(), and image generation via api.registerImageGenerationProvider().
  6. Auth Setup — Each provider declares auth methods (API key, OAuth) with env vars, flag names, and setup wizards.
  7. Model Catalog — The provider contributes models to the global catalog via augmentModelCatalog and resolveDynamicModel.
  8. Stream Wiring — wrapStreamFn adds OpenAI-specific attribution headers to streaming requests.
  9. Ready — The gateway can now route LLM requests to OpenAI through the registered provider interface.

Extension Categories

AI Providers

Provider extensions implement the ProviderPlugin interface, supplying model catalogs, auth methods, transport normalization, and streaming logic.

ExtensionDescriptionKey Features
openaiOpenAI GPT, DALL-E, Whisper, TTSMulti-capability (chat, image, speech, media)
anthropicAnthropic Claude modelsExtended thinking, tool use
googleGoogle Gemini familyMultimodal, long context
ollamaLocal Ollama serverSelf-hosted, any GGUF model
mistralMistral AI modelsFunction calling, code generation
deepseekDeepSeek reasoning modelsCode & math specialization
groqGroq ultra-fast inferenceLow-latency streaming
xaixAI Grok modelsReal-time knowledge
togetherTogether AI platformOpen-source model hosting
nvidiaNVIDIA NIM endpointsEnterprise GPU inference
amazon-bedrockAWS Bedrock multi-providerCross-provider routing
cloudflare-ai-gatewayCloudflare AI Gateway proxyEdge caching, rate limiting
copilot-proxyGitHub Copilot proxyCopilot API integration
vllmvLLM serving engineSelf-hosted, PagedAttention
sglangSGLang structured generationConstrained decoding
litellmLiteLLM universal proxy100+ model providers

Messaging Channels

Channel extensions implement the ChannelPlugin interface with adapters for messaging, outbound delivery, threading, security, and gateway HTTP methods.

ExtensionPlatformCapabilities
telegramTelegram Bot APIGroups, threads, reactions, inline buttons, stickers
discordDiscord BotThreads, reactions, slash commands, embeds
slackSlack AppThreads, reactions, blocks, App Home
whatsappWhatsApp Business APIMedia, templates, read receipts
signalSignal MessengerE2E encryption, groups, reactions
imessageiMessage (macOS)Native macOS integration
matrixMatrix protocolFederated, E2E encryption, rooms
msteamsMicrosoft TeamsAdaptive cards, channels, meetings
ircIRC protocolChannels, DMs, multi-server
lineLINE MessagingFlex messages, rich menus
feishuFeishu / LarkInteractive cards, groups
nostrNostr protocolDecentralized, relay-based
twitchTwitch ChatIRC-based, emotes, commands
googlechatGoogle ChatSpaces, threads, cards

Search & Web

ExtensionDescription
braveBrave Search API integration
duckduckgoDuckDuckGo instant answers and web search
exaExa neural search with semantic retrieval
tavilyTavily AI-optimized search API
searxngSearXNG self-hosted meta-search
perplexityPerplexity search-augmented answers
firecrawlFirecrawl web scraping and crawling

Media & Voice

ExtensionDescription
elevenlabsElevenLabs text-to-speech synthesis
deepgramDeepgram speech-to-text transcription
falFAL.ai image and video generation
voice-callReal-time voice call handling
speech-coreCore speech provider abstraction
image-generation-coreCore image generation abstraction
media-understanding-coreCore media analysis abstraction

Utilities

ExtensionDescription
browserHeadless browser for web interaction
diagnostics-otelOpenTelemetry tracing and metrics
diffsDiff computation and display
device-pairDevice pairing for mobile apps
memory-corePersistent memory abstraction layer
memory-lancedbLanceDB vector memory backend
open-proseLong-form writing assistant
llm-taskLLM-powered task orchestration

Shared Extension Contract

Every extension follows the same discovery and registration contract. The entry point exports a DefinedPluginEntry created by one of two helper functions depending on the extension type:

General Plugins — definePluginEntry()

// extensions/openai/index.ts
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
import { buildOpenAIProvider } from "./openai-provider.js";
import { buildOpenAISpeechProvider } from "./speech-provider.js";
import { buildOpenAIImageGenerationProvider } from "./image-generation-provider.js";

export default definePluginEntry({
  id: "openai",
  name: "OpenAI Provider",
  description: "Bundled OpenAI provider plugins",
  register(api) {
    api.registerProvider(buildOpenAIProvider());
    api.registerSpeechProvider(buildOpenAISpeechProvider());
    api.registerImageGenerationProvider(buildOpenAIImageGenerationProvider());
    api.registerCliBackend(buildOpenAICodexCliBackend());
  },
});

Channel Plugins — defineChannelPluginEntry()

// extensions/telegram/index.ts
import type { ChannelPlugin } from "openclaw/plugin-sdk/core";
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
import { telegramPlugin } from "./src/channel.js";
import { setTelegramRuntime } from "./src/runtime.js";

export default defineChannelPluginEntry({
  id: "telegram",
  name: "Telegram",
  description: "Telegram channel plugin",
  plugin: telegramPlugin as ChannelPlugin,
  setRuntime: setTelegramRuntime,
});

Package Manifest

// extensions/openai/package.json (relevant fields)
{
  "name": "@openclaw/openai-provider",
  "version": "2026.4.1-beta.1",
  "private": true,
  "type": "module",
  "openclaw": {
    "extensions": ["./index.ts"]
  }
}

Registration API

The OpenClawPluginApi object passed to register(api) exposes 20+ registration methods. Each method adds a capability to the core registry:

MethodPurpose
registerProviderRegister an LLM provider with auth, models, and streaming
registerChannelRegister a messaging channel with adapters
registerToolAdd an agent tool (function calling)
registerHookListen to lifecycle events (30+ hook points)
registerHttpRouteAdd custom HTTP endpoints to the gateway
registerCliBackendAdd CLI interactive backend
registerSpeechProviderAdd TTS/STT capabilities
registerImageGenerationProviderAdd image generation
registerMediaUnderstandingProviderAdd image/video/audio analysis
registerWebSearchProviderAdd web search integration
registerMemoryRuntimeAdd persistent memory backend
registerServiceAdd background services

Configuration Reference

Config KeyTypeDescription
openclaw.extensionsstring[]Entry point paths in package.json manifest
envVarsstring[]Environment variables the extension reads (e.g., OPENAI_API_KEY)
configSchemaPluginConfigSchemaJSON schema for extension-specific configuration
reload.configPrefixesstring[]Config key prefixes that trigger hot reload
capabilitiesChannelCapabilitiesFeature flags for channel extensions (polls, reactions, media, etc.)

Deep-Dive Focus Pages

Extension Contract

The shared interface that all extensions implement — definePluginEntry(), manifest discovery, registration lifecycle, and SDK boundary rules.

  • Plugin SDK imports
  • Manifest schema
  • Registration lifecycle

Provider Adapters

How AI provider extensions work — the ProviderPlugin interface, auth methods, model catalogs, transport normalization, and stream wrapping.

  • ProviderPlugin interface
  • Auth & model resolution
  • Stream processing

Channel Extensions

How messaging channel extensions work — the ChannelPlugin interface, adapter pattern, capabilities, gateway integration, and security model.

  • ChannelPlugin interface
  • 10+ adapter types
  • Gateway HTTP methods

Directory Map

Source tree for extensions/
extensions/
├── shared/                        ← Common utilities (runtime, deferred, config helpers)
├── openai/                        ← OpenAI provider (chat, image, speech, media)
├── anthropic/                     ← Anthropic Claude provider
├── google/                        ← Google Gemini provider
├── ollama/                        ← Local Ollama server provider
├── mistral/                       ← Mistral AI provider
├── deepseek/                      ← DeepSeek reasoning provider
├── groq/                          ← Groq fast inference provider
├── xai/                           ← xAI Grok provider
├── together/                      ← Together AI provider
├── nvidia/                        ← NVIDIA NIM provider
├── amazon-bedrock/                ← AWS Bedrock multi-provider
├── telegram/                      ← Telegram channel plugin
├── discord/                       ← Discord channel plugin
├── slack/                         ← Slack channel plugin
├── whatsapp/                      ← WhatsApp channel plugin
├── signal/                        ← Signal channel plugin
├── matrix/                        ← Matrix channel plugin
├── brave/                         ← Brave Search integration
├── duckduckgo/                    ← DuckDuckGo search
├── elevenlabs/                    ← ElevenLabs TTS
├── deepgram/                      ← Deepgram STT
├── browser/                       ← Headless browser tool
├── memory-core/                   ← Memory abstraction layer
├── memory-lancedb/                ← LanceDB vector memory
├── diagnostics-otel/              ← OpenTelemetry instrumentation
├── speech-core/                   ← Speech provider abstraction
├── image-generation-core/         ← Image generation abstraction
├── media-understanding-core/      ← Media analysis abstraction
└── AGENTS.md                      ← Extension boundary rules & contracts