What Are Plugins?
Plugins are JavaScript/TypeScript modules that register extensions via the Plugin API. They can:- Add custom channels - Integrate new messaging platforms (Matrix, Microsoft Teams, IRC, etc.)
- Register agent tools - Extend agent capabilities with custom actions and integrations
- Implement hooks - Intercept and modify behavior at key lifecycle points
- Run background services - Add persistent background tasks (diagnostics, monitoring, etc.)
- Extend the CLI - Add custom commands to the
openclawCLI - Handle HTTP requests - Expose webhooks and custom API endpoints
Why Build Plugins?
Plugins let you customize OpenClaw without forking the core codebase:- Channel integrations - Connect OpenClaw to any messaging platform
- Domain-specific tools - Add specialized agent capabilities for your workflow
- Custom hooks - Log agent activity, implement memory systems, modify prompts
- Enterprise integrations - Connect to internal systems, databases, or APIs
- Observability - Export telemetry, metrics, and diagnostics
Plugin Capabilities
Channels
Channel plugins integrate messaging platforms. A channel plugin implements adapters for:- Message sending/receiving
- Authentication and pairing
- Group management and mentions
- Directory listing (users, groups)
- Status checks and probing
@openclaw/matrix, @openclaw/msteams, extensions/irc
Tools
Tool plugins add new agent capabilities. Tools are exposed to the LLM and can be called during agent runs:- Custom actions (send email, create ticket, query database)
- Integrations (Slack actions, WhatsApp login, voice calls)
- Workflow automation (task management, approvals)
extensions/llm-task, channel-specific tools
Hooks
Hooks let you intercept and modify behavior at key lifecycle points:- Agent lifecycle -
before_agent_start,llm_input,llm_output,agent_end - Message flow -
message_received,message_sending,message_sent - Tool execution -
before_tool_call,after_tool_call,tool_result_persist - Session management -
session_start,session_end,before_compaction - Gateway lifecycle -
gateway_start,gateway_stop
src/hooks/bundled/), plugin hooks
Services
Service plugins run background tasks:- Diagnostics and monitoring
- Metrics export (OpenTelemetry)
- Scheduled tasks
- Background processing
extensions/diagnostics-otel
Plugin Distribution
Plugins can be distributed in three ways:- npm packages -
@openclaw/matrix,@openclaw/msteams(recommended for public plugins) - Workspace packages -
extensions/directory (monorepo pattern, used by OpenClaw core) - Local directories -
~/.openclaw/extensions/(user-installed plugins)
Getting Started
Ready to build your first plugin? Continue to:- Plugin Architecture - Understand how plugins work
- Getting Started Guide - Create your first plugin
- Plugin SDK Reference - Explore the Plugin API
Example Plugins
OpenClaw includes 39+ built-in extensions demonstrating plugin patterns:- Channels:
matrix,msteams,irc,telegram,slack,signal,discord - Tools:
llm-task,phone-control,voice-call - Services:
diagnostics-otel,memory-lancedb,copilot-proxy - Auth:
google-antigravity-auth,minimax-portal-auth

