Plugins
Plugins (or packages) are modular extensions that enhance the capabilities of ElizaOS agents. They provide a flexible way to add new functionality, integrate external services, and customize agent behavior across different platforms.
Browse the various plugins the eliza dev community made here: Package Showcase
elizaOS maintains an official package registry at github.com/elizaos-plugins/registry.
Installationβ
Eliza now supports dynamic plugin loading directly from the package registry. Here's a couple ways you can add plugins on eliza:
- Add the plugin to your project's dependencies (
package.json
):
{
"dependencies": {
"@elizaos/plugin-solana": "github:elizaos-plugins/plugin-solana",
"@elizaos/plugin-twitter": "github:elizaos-plugins/plugin-twitter"
}
}
- Configure the plugin in your character file:
{
"name": "MyAgent",
"plugins": [
"@elizaos/plugin-twitter",
"@elizaos/plugin-example"
],
"settings": {
"example-plugin": {
// Plugin-specific configuration
}
}
}
- Use the new CLI tool:
You can list available plugins, install new ones, and remove them when needed.
Go into the eliza directory you cloned and type npx elizaos plugins
to use it.
Usage: elizaos plugins [options] [command]
manage elizaOS plugins
Options:
-h, --help display help for command
Commands:
list|l [options] list available plugins
add|install <plugin> add a plugin
remove|delete <plugin> remove a plugin
help [command] display help for command
Architectureβ
Eliza uses a unified plugin architecture where everything is a plugin - including clients, adapters, actions, evaluators, and services. This approach ensures consistent behavior and better extensibility. Here's how the architecture works:
-
Plugin Types: Each plugin can provide one or more of the following:
- Clients (e.g., Discord, Twitter, WhatsApp integrations)
- Adapters (e.g., database adapters, caching systems)
- Actions (custom behavior and responses functionality)
- Evaluators (analysis, learning, decision-making components)
- Services (background processes and integrations)
- Providers (data or functionality providers)
-
Plugin Interface: All plugins implement the core Plugin interface:
type Plugin = {
name: string;
description: string;
config?: { [key: string]: any };
actions?: Action[];
providers?: Provider[];
evaluators?: Evaluator[];
services?: Service[];
clients?: Client[];
adapters?: Adapter[];
}; -
Independent Repositories: Each plugin lives in its own repository under the elizaos-plugins organization, allowing:
- Independent versioning and releases
- Focused issue tracking and documentation
- Easier maintenance and contribution
- Separate CI/CD pipelines
-
Plugin Structure: Each plugin repository should follow this structure:
plugin-name/
βββ images/
β βββ logo.jpg # Plugin branding logo
β βββ banner.jpg # Plugin banner image
βββ src/
β βββ index.ts # Main plugin entry point
β βββ actions/ # Plugin-specific actions
β βββ clients/ # Client implementations
β βββ adapters/ # Adapter implementations
β βββ types.ts # Type definitions
β βββ environment.ts # runtime.getSetting, zod validation
βββ package.json # Plugin dependencies
βββ README.md # Plugin documentation -
Package Configuration: Your plugin's
package.json
must include anagentConfig
section:{
"name": "@elizaos/plugin-example",
"version": "1.0.0",
"agentConfig": {
"pluginType": "elizaos:plugin:1.0.0",
"pluginParameters": {
"API_KEY": {
"type": "string",
"description": "API key for the service"
}
}
}
} -
Plugin Loading: Plugins are dynamically loaded at runtime through the
handlePluginImporting
function, which:- Imports the plugin module
- Reads the plugin configuration
- Validates plugin parameters
- Registers the plugin's components (clients, adapters, actions, etc.)
-
Client and Adapter Implementation: When implementing clients or adapters:
// Client example
const discordPlugin: Plugin = {
name: 'discord',
description: 'Discord client plugin',
clients: [DiscordClientInterface],
};
// Adapter example
const postgresPlugin: Plugin = {
name: 'postgres',
description: 'PostgreSQL database adapter',
adapters: [PostgresDatabaseAdapter],
};
// Adapter example
export const browserPlugin = {
name: 'default',
description: 'Pdf',
services: [PdfService],
actions: [],
};
Environment Variables and Secretsβ
Plugins can access environment variables and secrets in two ways:
-
Character Configuration: Through
agent.json.secret
or character settings:{
"name": "MyAgent",
"settings": {
"secrets": {
"PLUGIN_API_KEY": "your-api-key",
"PLUGIN_SECRET": "your-secret"
}
}
} -
Runtime Access: Plugins can access their configuration through the runtime:
class MyPlugin implements Plugin {
async initialize(runtime: AgentRuntime) {
const apiKey = runtime.getSetting('PLUGIN_API_KEY');
const secret = runtime.getSetting('PLUGIN_SECRET');
}
}
The getSetting
method follows this precedence:
- Character settings secrets
- Character settings
- Global settings
Pull Request Requirementsβ
When submitting a plugin to the elizaOS Registry, your PR must include:
-
Working Demo Evidence:
- Screenshots or video demonstrations of the plugin working with ElizaOS
- Test results showing successful integration
- Example agent configuration using your plugin
- Documentation of any specific setup requirements
-
Integration Testing:
- Proof of successful dynamic loading with ElizaOS
- Test cases covering main functionality
- Error handling demonstrations
- Performance metrics (if applicable)
-
Configuration Examples:
{
"name": "MyAgent",
"plugins": ["@elizaos/your-plugin"],
"settings": {
"your-plugin": {
// Your plugin's configuration
}
}
} -
Quality Checklist:
- Plugin follows the standard structure
- All required branding assets are included
- Documentation is complete and clear
- GitHub topics are properly set
- Tests are passing
- Demo evidence is provided
Visit the [Elizaos Plugin Development Guide](https://github.com/elizaos-plugins/plugin-image for detailed information on creating new plugins.
Plugin Branding and Imagesβ
To maintain a consistent and professional appearance across the ElizaOS ecosystem, we recommend including the following assets in your plugin repository:
-
Required Images:
logo.png
(400x400px) - Your plugin's square logobanner.png
(1280x640px) - A banner image for your pluginscreenshot.png
- At least one screenshot demonstrating your plugin's functionality
-
Image Location:
plugin-name/
βββ assets/
β βββ logo.png
β βββ banner.png
β βββ screenshots/
β βββ screenshot1.png
β βββ screenshot2.png -
Image Guidelines:
- Use clear, high-resolution images
- Keep file sizes optimized (< 500KB for logos, < 1MB for banners)
- Image example
- Include alt text for accessibility
Using Your Custom Pluginsβ
Plugins that are not in the official registry for ElizaOS can be used as well. Here's how:
Installationβ
- Upload the custom plugin to the packages folder:
packages/
ββplugin-example/
βββ package.json
βββ tsconfig.json
βββ src/
β βββ index.ts # Main plugin entry
β βββ actions/ # Custom actions
β βββ providers/ # Data providers
β βββ types.ts # Type definitions
β βββ environment.ts # Configuration
βββ README.md
βββ LICENSE
- Add the custom plugin to your project's dependencies in the agent's package.json:
{
"dependencies": {
"@elizaos/plugin-example": "workspace:*"
}
}
- Import the custom plugin to your agent's character.json
"plugins": [
"@elizaos/plugin-example",
],
FAQβ
What exactly is a plugin in ElizaOS?β
A plugin is a modular extension that adds new capabilities to ElizaOS agents, such as API integrations, custom actions, or platform connections. Plugins allow you to expand agent functionality and share reusable components with other developers.
When should I create a plugin versus using existing ones?β
Create a plugin when you need custom functionality not available in existing plugins, want to integrate with external services, or plan to share reusable agent capabilities with the community.
What are the main types of plugin components?β
Actions handle specific tasks, Providers supply data, Evaluators analyze responses, Services run background processes, Clients manage platform connections, and Adapters handle storage solutions.
How do I test a plugin during development?β
Use the mock client with pnpm mock-eliza --characters=./characters/test.character.json
for rapid testing, then progress to platform-specific testing like web interface or Twitter integration.
Why isn't my plugin being recognized?β
Most commonly this occurs due to missing dependencies, incorrect registration in your character file, or build configuration issues. Ensure you've run pnpm build
and properly imported the plugin.
Can I monetize my plugin?β
Yes, plugins can be monetized through the ElizaOS marketplace or by offering premium features/API access, making them an effective distribution mechanism for software products.
How do I debug plugin issues?β
Enable debug logging, use the mock client for isolated testing, and check the runtime logs for detailed error messages about plugin initialization and execution.
What's the difference between Actions and Services?β
Actions handle specific agent responses or behaviors, while Services provide ongoing background functionality or external API integrations that multiple actions might use.