Import map, registration API reference, and SDK architecture
You need to know which SDK subpath to import from
You want a reference for all registration methods on OpenClawPluginApi
You are looking up a specific SDK export
Plugin SDK Overview
The plugin SDK is the typed contract between plugins and core. This page is the
reference for what to import and what you can register.
**Looking for a how-to guide?**
- First plugin? Start with [Getting Started](/plugins/building-plugins)
- Channel plugin? See [Channel Plugins](/plugins/sdk-channel-plugins)
- Provider plugin? See [Provider Plugins](/plugins/sdk-provider-plugins)
Import convention
Always import from a specific subpath:
import{definePluginEntry}from"openclaw/plugin-sdk/plugin-entry";import{defineChannelPluginEntry}from"openclaw/plugin-sdk/core";// Deprecated — will be removed in the next major release
import{definePluginEntry}from"openclaw/plugin-sdk";
Each subpath is a small, self-contained module. This keeps startup fast and
prevents circular dependency issues.
Subpath reference
The most commonly used subpaths, grouped by purpose. The full list of 100+
subpaths is in scripts/lib/plugin-sdk-entrypoints.json.
Within your plugin, use local barrel files for internal imports:
my-plugin/
api.ts # Public exports for external consumers
runtime-api.ts # Internal-only runtime exports
index.ts # Plugin entry point
setup-entry.ts # Lightweight setup-only entry (optional)
Never import your own plugin through `openclaw/plugin-sdk/`
from production code. Route internal imports through `./api.ts` or
`./runtime-api.ts`. The SDK path is the external contract only.
Related
Entry Points — definePluginEntry and defineChannelPluginEntry options