Skip to main content
Plugins provide a way to package and distribute multiple agent components together. A single plugin can include:
  • Skills: Specialized knowledge and workflows
  • Hooks: Event handlers for tool lifecycle
  • MCP Config: External tool server configurations
  • Agents: Specialized agent definitions
  • Commands: Slash commands
The plugin format is compatible with the Claude Code plugin structure.

Plugin Structure

See the example_plugins directory for a complete working plugin structure.
A plugin follows this directory structure:
plugin-name
.plugin
plugin.json
skills
hooks
hooks.json
agents
agent-name.md
commands
command-name.md
.mcp.json
README.md
Note that the plugin metadata, i.e., plugin-name/.plugin/plugin.json, is required.

Plugin Manifest

The manifest file plugin-name/.plugin/plugin.json defines plugin metadata:

Skills

Skills are defined in markdown files with YAML frontmatter:

Hooks

Hooks are defined in hooks/hooks.json:

MCP Configuration

MCP servers are configured in .mcp.json:

Using Plugin Components

The ready-to-run example is available here!
Brief explanation on how to use a plugin with an agent.
1

Loading a Plugin

First, load the desired plugins.
2

Accessing Components

You can access the different plugin components to see which ones are available.
3

Using with an Agent

You can now feed your agent with your preferred plugin.

Ready-to-run Example

The example below demonstrates plugin loading via Conversation and plugin management utilities (install, list, load, enable, disable, and uninstall).
examples/05_skills_and_plugins/02_loading_plugins/main.py
You can run the example code as-is.
The model name should follow the LiteLLM convention: provider/model_name (e.g., anthropic/claude-sonnet-4-5-20250929, openai/gpt-4o). The LLM_API_KEY should be the API key for your chosen provider.
ChatGPT Plus/Pro subscribers: You can use LLM.subscription_login() to authenticate with your ChatGPT account and access Codex models without consuming API credits. See the LLM Subscriptions guide for details.

Registered Marketplace Plugins

Registered marketplaces let an agent context name one or more plugin catalogs once and then load plugins by marketplace-qualified names like incident-bot@specialists. Use auto_load="all" when every plugin in a marketplace should load at conversation startup, and call conversation.load_plugin() when you want to add a specific plugin later. The example below builds local marketplace catalogs so it can run without network access or credentials.
examples/05_skills_and_plugins/05_registered_marketplace_plugins/main.py
You can run the example code as-is.
The model name should follow the LiteLLM convention: provider/model_name (e.g., anthropic/claude-sonnet-4-5-20250929, openai/gpt-4o). The LLM_API_KEY should be the API key for your chosen provider.
ChatGPT Plus/Pro subscribers: You can use LLM.subscription_login() to authenticate with your ChatGPT account and access Codex models without consuming API credits. See the LLM Subscriptions guide for details.

Installing Plugins to Persistent Storage

The SDK provides utilities to install plugins to a local directory (~/.openhands/plugins/installed/ by default). Installed plugins are tracked in .installed.json, which stores metadata including a persistent enabled flag. Use list_installed_plugins() to see all tracked plugins (enabled and disabled). Use load_installed_plugins() to load only enabled plugins. install_plugin(), enable_plugin(), disable_plugin(), and uninstall_plugin() are exposed from openhands.sdk.plugin, which gives the CLI a clean SDK surface for /plugin install, /plugin enable, /plugin disable, and /plugin uninstall.

Installed Plugin Lifecycle

The ready-to-run example above already demonstrates the full installed-plugin lifecycle, including toggling the persistent enabled flag in .installed.json before uninstalling the plugin. Use the same APIs directly when you need a narrower flow:

Next Steps

  • Skills - Learn more about skills and triggers
  • Hooks - Understand hook event types
  • MCP Integration - Configure external tool servers