Developer overview
WednesdayAI is built to be extended. The core is intentionally lean; new capabilities belong in plugins, hooks, and channel adapters rather than in core.Architecture
What a plugin can register
A plugin’sregister(api) function can attach any of the following. Each has a dedicated api.register* (or api.on) method on the OpenClawPluginApi:
Agent tools
Actions the AI can invoke.
api.registerTool(...).Lifecycle hooks
Typed runtime callbacks — transform LLM input/output, gate tools, shape context.
api.on(...).Context engine hooks
Collect, project, and prune per-turn context.
api.on("context.collect", ...) and friends.Channel adapters
A new messaging platform.
api.registerChannel(...).Providers
Model providers and their auth methods.
api.registerProvider(...).HTTP routes + gateway methods
Custom endpoints and RPC methods.
api.registerHttpRoute(...) / api.registerGatewayMethod(...).Commands
Chat commands that bypass the LLM, and CLI commands.
api.registerCommand(...) / api.registerCli(...).Services
Start/stop background services.
api.registerService(...).Storage + search providers
Session store backends and web-search providers.
api.registerSessionStoreAdapter(...) / api.registerWebSearchProvider(...)./new, /reset, gateway start).
api.runtime
Plugins reach vetted runtime capabilities through api.runtime instead of importing core internals. Highlights:
runtime.analysis— focused plugin-owned LLM analysis (guide)runtime.signals— Agent Signals for non-user stimuli (guide)runtime.state.resolveStateDir()— resolve the plugin state directoryruntime.config,runtime.media,runtime.tts/runtime.stt,runtime.system,runtime.events,runtime.logging
Plugin discovery and precedence
The gateway scans for plugins in this order, and the first match for a given id wins (lower-precedence copies are ignored):- Config paths —
plugins.load.paths(file or directory) - Workspace extensions —
<workspace>/.openclaw/extensions/ - Global extensions —
~/.openclaw/extensions/(where managed installs live) - Bundled extensions — shipped with WednesdayAI, disabled by default
openclaw plugins enable <id>). Plugins installed via openclaw plugins install land in the global extensions directory and are enabled by default.
Tech stack and getting started
See Coding style for the toolchain, and Contributing for setup and the PR workflow. To build a plugin, follow Your first plugin.Design principles
- Lean core — if a capability can live in a plugin, it should.
- Stable contracts — plugins import from
wednesdayai/plugin-sdk(aliasopenclaw/plugin-sdk), never core internals. - No
workspace:*independencies—npm install --omit=devin plugin dirs must work. - No
anyin SDK exports — the plugin SDK surface must be fully typed.