Complete guide for migrating elizaOS plugins from version 0.x to 1.x
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.
Note: This branch will serve as your new 1.x version branch, keeping main
intact for legacy support.
biome.json
- Deprecated linter configurationvitest.config.ts
- Replaced by Bun test runnerlock.json
or yml.lock
filesWhy? The elizaOS ecosystem has standardized on:
- Bun’s built-in test runner (replacing Vitest)
- Prettier for code formatting (replacing Biome)
tsconfig.json
:
ActionResult
and include callbacks:
composeState
method has enhanced filtering capabilities:
agentId
, agentName
, bio
, lore
, adjective
recentMessages
, recentMessagesData
TIME
, FACTS
)LICENSE
file with MIT license text.
name
, version
, description
main
, types
, module
author
, license
, repository
scripts
, dependencies
, devDependencies
type
: “module”exports
configurationActionResult
with success
field:
bun:test
:
private
:
@elizaos/core
ActionResult
with success
fieldevaluate()
method now returns Evaluator[]
instead of string[]
:updateRecentMessageState()
→ Use composeState(message, ['RECENT_MESSAGES'])
registerMemoryManager()
→ Not needed, use database adaptergetMemoryManager()
→ Use database adapter methodsregisterContextProvider()
→ Use registerProvider()
evaluate()
→ Now returns Evaluator[]
instead of string[]
getAccountById()
→ getEntityById()
ensureUserExists()
→ ensureConnection()
generateText()
→ runtime.useModel()
setSetting()
registerEvent()
emitEvent()
useModel()
registerModel()
ensureWorldExists()
getRooms()
Evaluator[]
objectsupdateRecentMessageState
with composeState
generateText
to runtime.useModel
import { settings }
with runtime.getSetting()
callsruntime
parameter where settings are neededActionResult