Plugin SDK Migration
OpenClaw has moved from a broad backwards-compatibility layer to a modern plugin architecture with focused, documented imports. If your plugin was built before the new architecture, this guide helps you migrate.What is changing
The old plugin system provided two wide-open surfaces that let plugins import anything they needed from a single entry point:openclaw/plugin-sdk/compat— a single import that re-exported dozens of helpers. It was introduced to keep older hook-based plugins working while the new plugin architecture was being built.openclaw/extension-api— a bridge that gave plugins direct access to host-side helpers like the embedded agent runner.
Why this changed
The old approach caused problems:- Slow startup — importing one helper loaded dozens of unrelated modules
- Circular dependencies — broad re-exports made it easy to create import cycles
- Unclear API surface — no way to tell which exports were stable vs internal
openclaw/plugin-sdk/\<subpath\>)
is a small, self-contained module with a clear purpose and documented contract.
How to migrate
1
Find deprecated imports
Search your plugin for imports from either deprecated surface:
2
Replace with focused imports
Each export from the old surface maps to a specific modern import path:For host-side helpers, use the injected plugin runtime instead of importing
directly:The same pattern applies to other legacy bridge helpers:
3
Build and test
Import path reference
Full import path table
Full import path table
src/plugin-sdk/ or ask in Discord.
Removal timeline
All core plugins have already been migrated. External plugins should migrate
before the next major release.
Suppressing the warnings temporarily
Set these environment variables while you work on migrating:Related
- Getting Started — build your first plugin
- SDK Overview — full subpath import reference
- Channel Plugins — building channel plugins
- Provider Plugins — building provider plugins
- Plugin Internals — architecture deep dive
- Plugin Manifest — manifest schema reference