Your First Character (2 minutes)
A character file is all you need to create a unique agent. Here’s the minimum:Overview
In elizaOS, the distinction between a Character and an Agent is fundamental:- Character: A configuration object that defines an agent’s personality, capabilities, and settings
- Agent: A runtime instance created from a Character, with additional status tracking and lifecycle management
Character vs Agent
The transformation from Character to Agent happens at runtime:Character Interface Reference
The complete TypeScript interface for agents:| Property | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Agent’s display name |
bio | string | string[] | ✅ | Background/personality description |
id | UUID | ❌ | Unique identifier (auto-generated if not provided) |
username | string | ❌ | Social media username |
system | string | ❌ | System prompt override |
templates | object | ❌ | Custom prompt templates |
adjectives | string[] | ❌ | Character traits (e.g., “helpful”, “creative”) |
topics | string[] | ❌ | Conversation topics the agent knows |
knowledge | array | ❌ | Facts, files, or directories of knowledge |
messageExamples | array[][] | ❌ | Example conversations (2D array) |
postExamples | string[] | ❌ | Example social media posts |
style | object | ❌ | Writing style for different contexts |
plugins | string[] | ❌ | Enabled plugin packages |
settings | object | ❌ | Configuration values |
secrets | object | ❌ | Sensitive configuration |
Core Properties
Identity Configuration
The fundamental properties that define who your agent is:Bio and Description
The bio can be a single string or an array of strings for better organization:System Prompt Configuration
Override the default system prompt to fine-tune agent behavior:Templates Object Structure
Custom prompt templates for various agent operations:Conversation Training
Message Examples Structure
Message examples train the agent’s conversational style using a 2D array format:Style Configuration
Define writing styles for different contexts:Knowledge Configuration
Configure the agent’s knowledge base:Plugin Management
Basic Plugin Configuration
Environment-Based Plugin Loading
Load plugins conditionally based on environment variables:Settings and Secrets
Settings Object
General configuration values:Secrets Management
Sensitive data that should never be committed:Complete Production Example
Here’s a comprehensive character configuration for production use:Validation and Testing
Character Validation
Use the built-in validation to ensure your character is properly configured:Testing Character Configurations
Best Practices
- Keep personality traits consistent: Ensure bio, adjectives, and style align
- Provide diverse message examples: Cover various interaction patterns
- Use TypeScript for type safety: Leverage type checking for configuration
- Load plugins conditionally: Check for API keys before loading
- Order plugins by dependency: Load core plugins before dependent ones
- Use environment variables for secrets: Never hardcode sensitive data
- Validate before deployment: Always validate character configuration
- Test conversation flows: Ensure message examples produce desired behavior
- Document custom settings: Clearly explain any custom configuration
- Version your characters: Track changes to character configurations
Migration Guide
From JSON to TypeScript
Converting a JSON character to TypeScript:See Also
Personality & Behavior
Learn to craft unique agent personalities
Memory & State
Understand how agents remember and learn
Runtime & Lifecycle
See how characters become live agents
Plugin Development
Extend your agent with custom plugins
Core Runtime
How the runtime orchestrates your agent
Deploy to Cloud
Ship your agent to production in minutes

