Important: This guide provides a general framework for migrating ElizaOS plugins to v1.x. Specific configurations will vary based on your plugin’s functionality.
Step 1: Create Version Branch
Create a new branch for the 1.x version while preserving the main branch for backwards compatibility:
Note: This branch will serve as your new 1.x version branch, keeping main intact for legacy support.
Step 2: Remove Deprecated Files
Clean up deprecated tooling and configuration files:Files to Remove:
biome.json- Deprecated linter configurationvitest.config.ts- Replaced by Bun test runner- Lock files - Any
lock.jsonoryml.lockfiles
Quick Cleanup Commands:
Why? The ElizaOS ecosystem has standardized on:This ensures consistency across all ElizaOS plugins and simplifies the development toolchain.
- Bun’s built-in test runner (replacing Vitest) - All plugins must now use
bun test- Prettier for code formatting (replacing Biome)
Step 3: Update package.json
3.1 Version Update
3.1.5 Package Name Update
Check if your package name contains the old namespace and update it:Important: If your package name starts with@elizaos-plugins/, remove the “s” from “plugins” to change it to@elizaos/. This is the correct namespace for all ElizaOS plugins in v1.x.
3.2 Dependencies
- Remove:
biome,vitest(if present) - Add: Core and plugin-specific dependencies
3.3 Dev Dependencies
Add the following development dependencies:Important:bunand@types/bunare REQUIRED dependencies for all plugins in v1.x. The ElizaOS ecosystem has standardized on Bun’s built-in test runner, replacing Vitest. Without these dependencies, your tests will not run properly.
3.4 Scripts Section
Replace your existing scripts with:Note: All test scripts now use Bun’s built-in test runner. Make sure you havebunand@types/buninstalled as dev dependencies (see section 3.3).
3.5 Publish Configuration
Add the following to enable public npm publishing:3.6 Agent Configuration
Replace youragentConfig with the new structure:
Note: Replace YOUR_PARAMETER_NAME with your plugin’s specific configuration parameters. Common types include API keys, endpoints, credentials, etc.
3.7 Dependencies
Add your plugin-specific dependencies:Step 4: TypeScript Configuration
4.1 Update tsup.config.ts
4.2 Update tsconfig.json
4.3 Create tsconfig.build.json
Create a new file with build-specific TypeScript configuration:
Step 5: Verify Build Process
Clean everything and test the new setup:Expected Results:
- Dependencies install without errors
- Build completes successfully
distfolder contains compiled output- TypeScript declarations are generated
Next Steps: After verifying the build, proceed to Step 6 to migrate your actions and providers to handle the breaking API changes.
Step 6: Migrate Actions & Providers
6.1 Import Changes
Update your imports in action files:6.2 State Handling Migration
Replace the state initialization and update pattern:6.3 Context/Prompt Generation
ReplacecomposeContext with composePromptFromState:
6.4 Template Migration - JSON to XML Format
Update Template Content:
Templates should be updated from requesting JSON responses to XML format for use withparseKeyValueXml.
6.5 Content Generation Migration
ReplacegenerateObject with runtime.useModel:
ModelClass.SMALL→ModelType.TEXT_SMALL- First parameter is the model type enum value
- Second parameter is an object with
promptand optionalstopSequences - Parse the result with
parseKeyValueXmlwhich extracts key-value pairs from XML responses
6.6 Content Interface and Validation
Define Content Interface:
Create Validation Function:
6.7 Handler Pattern Updates
Complete handler migration example:6.8 Action Examples Structure
The action examples structure remains largely the same, but ensure they follow this pattern:Important Migration Notes:
- Update templates to request XML format instead of JSON
- The
parseKeyValueXmlfunction parses XML responses into key-value objects - Always include error handling and validation
- Use
elizaLoggerfor debugging - The callback pattern remains the same for success/error responses
- Model types have changed from
ModelClasstoModelTypeenum
Step 7: Migrate Providers
7.1 Provider Interface Changes
The Provider interface has been significantly enhanced with new required and optional properties:7.2 ProviderResult Interface
Theget method must now return a ProviderResult object instead of any:
7.3 Migration Steps
Step 1: Add Required name Property
Every provider must have a unique name property:
Step 2: Update Return Type
Change your return statements to return aProviderResult object:
Step 3: Handle Non-Optional State
Thestate parameter is no longer optional. Update your function signature:
7.4 Complete Migration Examples
Example 1: Simple Text Provider
Example 2: Data Provider
Example 3: Complex Provider with All Options
7.5 Provider Options Explained
name(required): Unique identifier used to reference the providerdescription: Human-readable description of what the provider doesdynamic: Set totrueif the provider returns different data based on contextposition: Controls ordering in provider lists (positive = higher priority)private: Set totrueto hide from public provider lists (must be called explicitly)
7.6 Best Practices
- Always include descriptive names: Use clear, descriptive names that indicate what the provider does
- Return appropriate result types:
- Use
textfor human-readable responses - Use
datafor structured data that other components might process - Use
valuesfor simple key-value pairs that might be used in templates
- Use
- Add descriptions: Help other developers understand your provider’s purpose
- Use logging: Include debug logs to help troubleshoot issues
- Handle errors gracefully: Return meaningful error messages in the
textfield
Important Provider Migration Notes:
- The
nameproperty is now required for all providers - Return type must be
ProviderResultobject, not raw values - The
stateparameter is no longer optional - Consider adding optional properties (
description,dynamic, etc.) for better documentation and behavior - Test thoroughly as the runtime may handle providers differently based on these new properties

