Skip to main content
Important: This comprehensive guide will walk you through migrating your elizaOS plugins from version 0.x to 1.x. The migration process involves several key changes to architecture, APIs, and best practices.

Migration Overview

The 1.x architecture brings:
  • Better modularity - Cleaner separation of concerns
  • Improved testing - Easier to test individual components
  • Enhanced flexibility - More customization options
  • Better performance - Optimized runtime execution
  • Stronger typing - Catch errors at compile time

Pre-Migration Checklist

Before starting your migration:
  • Backup your existing plugin code
  • Review all breaking changes
  • Identify custom components that need migration
  • Plan your testing strategy
  • Allocate sufficient time for the migration

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 configuration
  • vitest.config.ts - Replaced by Bun test runner
  • Lock files - Any lock.json or yml.lock files

Quick Cleanup Commands:

Why? The elizaOS ecosystem has standardized on:
  • Bun’s built-in test runner (replacing Vitest)
  • Prettier for code formatting (replacing Biome)

Step 3: Update package.json

Version and Naming

Dependencies

Scripts Section

Step 4: Update TypeScript Configuration

Update tsconfig.json:

Step 5: Update Core Package Imports

Import Changes

Step 6: Update Actions

Action Signatures

Actions in 1.x must return ActionResult and include callbacks:

Common Action Patterns

Step 7: State Management

Using composeState

The v1 composeState method has enhanced filtering capabilities:

Available State Keys

Core state keys you can filter:
  • Agent info: agentId, agentName, bio, lore, adjective
  • Conversation: recentMessages, recentMessagesData
  • Providers: Any registered provider name (e.g., TIME, FACTS)

Step 8: Update Providers

Provider Migration

Provider Options

Step 9: Testing Migration

From Vitest to Bun

Test Structure

Step 10: Prompt Generation

Template System Changes

Using composePromptFromState

Step 11: Advanced Patterns

Service Migration

Event Handlers

Step 12: Final Configuration

Configure .gitignore

Configure .npmignore

Add MIT License

Create a LICENSE file with MIT license text.

Verify package.json Fields

Ensure all required fields are present:
  • name, version, description
  • main, types, module
  • author, license, repository
  • scripts, dependencies, devDependencies
  • type: “module”
  • exports configuration

Common Migration Issues

Issue: Action not returning correct format

Solution: Ensure all actions return ActionResult with success field:

Issue: Tests failing with module errors

Solution: Update imports to use bun:test:

Issue: State composition performance

Solution: Use filtering to only compose needed state:

Issue: Provider not being called

Solution: Ensure provider is registered and not marked as private:

Testing Your Migration

Build Test

Run Tests

Integration Test

Create a test agent using your migrated plugin:

Publishing

Once migration is complete:

Migration Completion Checklist

  • All imports updated to @elizaos/core
  • Actions return ActionResult with success field
  • Callbacks implemented in action handlers
  • Tests migrated to Bun test runner
  • State composition uses new filtering API
  • Providers implemented for custom data
  • Package.json updated with correct dependencies
  • TypeScript configuration updated
  • Build succeeds without errors
  • All tests pass
  • Plugin works with v1.x runtime

Getting Help

If you encounter issues during migration:
  1. Review this guide for common issues
  2. Search existing GitHub issues
  3. Join our Discord community for real-time help
  4. Create a detailed issue with your migration problem

Advanced Migration Topics

Evaluators Migration

Evaluator Interface Changes

Evaluators remain largely unchanged in their core structure, but their integration with the runtime has evolved:

Key Changes:

  1. Evaluation Results: The evaluate() method now returns Evaluator[] instead of string[]:
  1. Additional Parameters: The evaluate method accepts new optional parameters:

Entity System Migration

The most significant change is the shift from User/Participant to Entity/Room/World:

User → Entity

Participant → Room Membership

New World Concept

v1 introduces the concept of “worlds” (servers/environments):

Connection Management

Client Migration

Clients now have a simpler interface:

Runtime Method Changes

Removed Methods

  • updateRecentMessageState() → Use composeState(message, ['RECENT_MESSAGES'])
  • registerMemoryManager() → Not needed, use database adapter
  • getMemoryManager() → Use database adapter methods
  • registerContextProvider() → Use registerProvider()

Changed Methods

  • evaluate() → Now returns Evaluator[] instead of string[]
  • getAccountById()getEntityById()
  • ensureUserExists()ensureConnection()
  • generateText()runtime.useModel()

New Methods

  • setSetting()
  • registerEvent()
  • emitEvent()
  • useModel()
  • registerModel()
  • ensureWorldExists()
  • getRooms()

Advanced Migration Checklist

  • Update all evaluator result handling to expect Evaluator[] objects
  • Remove singleton patterns from services
  • Update service registration to pass classes instead of instances
  • Replace updateRecentMessageState with composeState
  • Migrate from generateText to runtime.useModel
  • Update user/participant methods to entity/room methods
  • Add world management for multi-server environments
  • Convert clients to service-based architecture
  • Update any direct memory manager access to use database adapter
  • Replace import { settings } with runtime.getSetting() calls
  • Update functions to accept runtime parameter where settings are needed

Summary

The migration from 0.x to 1.x involves:
  1. Updating package structure and dependencies
  2. Migrating action signatures to return ActionResult
  3. Implementing callbacks for user feedback
  4. Converting to Bun test runner
  5. Using the enhanced state composition system
  6. Implementing providers for custom data
  7. Following new TypeScript patterns
Take your time, test thoroughly, and don’t hesitate to ask for help in the community!

See Also

Plugin Architecture

Understand the new plugin system architecture

Development Guide

Build new plugins with modern patterns

Plugin Components

Learn about Actions, Providers, Evaluators, and Services

Common Patterns

Master proven plugin development patterns