| title | description |
|---|---|
Development |
Learn how to develop with elizaOS - from simple character modifications to core framework contributions |
elizaOS offers two distinct development paths depending on your goals and experience level:
Perfect for creating and customizing your own AI agents using the elizaOS CLI For contributors and developers building custom elizaOS versionsThe beginner track is focused on using the elizaOS CLI to create and customize your agents without diving into the core framework code.
If you haven't already, create a new agent using the elizaOS CLI: ```bash elizaos create my-custom-agent ``` ```bash cd my-custom-agent ``` Your agent directory contains: - `character.json` - Your agent's personality and configuration - `package.json` - Project dependencies and scripts - `.env` - Environment variables and API keys - `plugins/` - Directory for custom pluginsThe character.json file defines your agent's personality, knowledge, and behavior:
{
"name": "MyAgent",
"bio": "A helpful AI assistant created with elizaOS",
"adjectives": [
"friendly",
"knowledgeable",
"professional"
],
"knowledge": [
"I am an AI assistant created with elizaOS",
"I can help with various tasks and questions"
],
"messageExamples": [
[
{
"name": "User",
"content": {"text": "Hello!"}
},
{
"name": "MyAgent",
"content": {"text": "Hello! How can I assist you today?"}
}
]
],
"plugins": []
}Plugins extend your agent's capabilities with additional features:
Use the elizaOS CLI to add existing plugins:
elizaos plugins add @elizaos/plugin-twitter
elizaos plugins add @elizaos/plugin-discord{
"name": "MyAgent",
"plugins": [
"@elizaos/plugin-sql",
"@elizaos/plugin-twitter",
"@elizaos/plugin-discord"
],
"bio": ["Your agent's description"],
"style": {
"all": ["conversational", "friendly"]
}
}import { Character } from '@elizaos/core';
export const character: Character = {
name: "MyAgent",
plugins: [
// Core plugins
"@elizaos/plugin-sql",
// Conditional plugins based on environment variables
...(process.env.TWITTER_API_KEY ? ["@elizaos/plugin-twitter"] : []),
...(process.env.DISCORD_API_TOKEN ? ["@elizaos/plugin-discord"] : []),
...(process.env.OPENAI_API_KEY ? ["@elizaos/plugin-openai"] : [])
],
bio: ["Your agent's description"],
style: {
all: ["conversational", "friendly"]
}
};To remove a plugin:
elizaos plugins remove @elizaos/plugin-twitterRemember to also remove it from your character file (.json or .ts).
After making modifications:
elizaos startVisit http://localhost:3000 to interact with your customized agent.
The advanced track is for developers who want to contribute to the elizaOS core framework or build custom versions.
Clone the official elizaOS monorepo: ```bash git clone https://github.com/elizaos/eliza.git cd eliza ``` Use Bun to install all dependencies: ```bash bun install ``` Build all packages in the monorepo: ```bash bun run build ```The elizaOS monorepo is organized as follows:
eliza/
├── packages/
│ ├── core/ # Core elizaOS framework
│ ├── cli/ # CLI tool source code
│ ├── client/ # Client libraries
│ └── plugin-*/ # Official plugins
└── scripts/ # Build and utility scripts
For specialized use cases, you might want to create a custom fork:
# Fork the repository on GitHub first
git clone https://github.com/YOUR_USERNAME/eliza.git
cd eliza
# Add upstream remote
git remote add upstream https://github.com/elizaos/eliza.git
# Create your custom branch
git checkout -b custom/my-versionCreate a .env.local file for development:
NODE_ENV=development
LOG_LEVEL=debug
ENABLE_HOT_RELOAD=trueRun the framework in development mode with hot reload:
bun run dev- Start with small character modifications
- Test changes frequently
- Back up your
character.jsonbefore major changes - Join the community for plugin recommendations
- Follow the project's coding standards
- Write comprehensive tests for new features
- Document your code thoroughly
- Participate in code reviews