| name | character-generator |
| description | Generate complete elizaOS character configurations with personality, knowledge, and plugin setup. Triggers when user asks to "create character", "generate agent config", or "build elizaOS character" |
| allowed-tools | Write, Read, Edit, Grep, Glob |
Character Generator Skill
An intelligent skill that creates production-ready elizaOS character configurations with comprehensive personality traits, knowledge bases, and plugin integrations.
When to Use
This skill activates when you need to:
- Create a new elizaOS character from scratch
- Generate character configurations for specific use cases
- Set up agent personalities and behaviors
- Configure multi-platform agent deployments
Trigger phrases:
- "Create a character for [purpose]"
- "Generate an elizaOS agent configuration"
- "Build a character that [does something]"
- "Set up an agent for [platform/use case]"
Capabilities
This skill can:
- 🎭 Design character personalities and traits
- 📚 Set up knowledge bases and training data
- 🔌 Configure plugin ecosystems
- 💬 Generate message examples and conversation patterns
- 🎨 Define writing styles for different contexts
- 🔐 Set up secure secrets management
- 🌐 Configure multi-platform deployments
- ✅ Validate character configurations
Workflow
Phase 1: Requirements Gathering
Ask these questions to understand the character:
Purpose: "What is the primary purpose of this agent?"
- Customer support
- Content creation
- Technical assistance
- Community management
- Data analysis
- Creative collaboration
Personality: "What personality traits should the agent have?"
- Professional vs. Casual
- Serious vs. Humorous
- Concise vs. Detailed
- Technical vs. Accessible
Knowledge Domain: "What topics should the agent be expert in?"
- Programming languages
- Business domains
- Creative fields
- Technical support areas
Platforms: "Which platforms will the agent operate on?"
- Discord
- Telegram
- Web interface
- Custom integrations
Special Features: "Are there any special capabilities needed?"
- Voice synthesis
- Image generation
- Web search
- Database access
- Custom actions
Phase 2: Character Design
Based on requirements, design the character structure:
interface CharacterDesign {
// Core Identity
name: string; // Agent display name
username: string; // Platform username
bio: string[]; // Personality description
// Personality Traits
adjectives: string[]; // Character traits
topics: string[]; // Knowledge domains
// Communication Style
style: {
all: string[]; // Universal rules
chat: string[]; // Conversational style
post: string[]; // Social media style
};
// Training Data
messageExamples: Memory[][]; // Conversation examples
postExamples: string[]; // Social post examples
// Knowledge & Capabilities
knowledge: KnowledgeItem[]; // Knowledge sources
plugins: string[]; // Enabled plugins
// Configuration
settings: Settings; // Agent settings
secrets: Secrets; // Environment variables
}
Phase 3: Implementation
Step 1: Create Character File
// characters/{name}.ts
import { Character } from '@elizaos/core';
export const character: Character = {
// === CORE IDENTITY ===
name: '{CharacterName}',
username: '{username}',
// Bio: Multi-line for better organization
bio: [
"{Primary role and expertise}",
"{Secondary capabilities}",
"{Personality traits}",
"{Communication style}"
],
// === PERSONALITY ===
adjectives: [
"{trait1}",
"{trait2}",
"{trait3}",
"{trait4}",
"{trait5}"
],
topics: [
"{topic1}",
"{topic2}",
"{topic3}",
"{topic4}"
],
// === COMMUNICATION STYLE ===
style: {
all: [
"{Universal rule 1}",
"{Universal rule 2}",
"{Universal rule 3}"
],
chat: [
"{Chat-specific rule 1}",
"{Chat-specific rule 2}",
"{Chat-specific rule 3}"
],
post: [
"{Social media rule 1}",
"{Social media rule 2}",
"{Social media rule 3}"
]
},
// === TRAINING EXAMPLES ===
messageExamples: [
// Conversation 1: Greeting
[
{
name: "{{user}}",
content: { text: "Hello!" }
},
{
name: "{CharacterName}",
content: {
text: "{Character's greeting response}"
}
}
],
// Conversation 2: Main use case
[
{
name: "{{user}}",
content: { text: "{User question about primary use case}" }
},
{
name: "{CharacterName}",
content: {
text: "{Detailed, helpful response showcasing expertise}"
}
},
{
name: "{{user}}",
content: { text: "{Follow-up question}" }
},
{
name: "{CharacterName}",
content: {
text: "{Continued helpful response}"
}
}
],
// Conversation 3: Error handling
[
{
name: "{{user}}",
content: { text: "{Question outside expertise}" }
},
{
name: "{CharacterName}",
content: {
text: "{Polite acknowledgment of limitation + redirect}"
}
}
]
],
postExamples: [
"{Example social post 1 showcasing personality}",
"{Example social post 2 demonstrating expertise}",
"{Example social post 3 showing communication style}"
],
// === KNOWLEDGE ===
knowledge: [
"{Simple fact 1}",
"{Simple fact 2}",
{
path: "./knowledge/{domain}",
shared: true
}
],
// === PLUGINS ===
plugins: [
'@elizaos/plugin-bootstrap',
'@elizaos/plugin-sql',
// LLM Providers (conditional)
...(process.env.OPENAI_API_KEY ? ['@elizaos/plugin-openai'] : []),
...(process.env.ANTHROPIC_API_KEY ? ['@elizaos/plugin-anthropic'] : []),
// Platform Integrations (conditional)
...(process.env.DISCORD_API_TOKEN ? ['@elizaos/plugin-discord'] : []),
...(process.env.TELEGRAM_BOT_TOKEN ? ['@elizaos/plugin-telegram'] : []),
...(process.env.TWITTER_API_KEY ? ['@elizaos/plugin-twitter'] : []),
// Additional Capabilities
{add_plugins_based_on_requirements}
],
// === SETTINGS ===
settings: {
secrets: {},
model: 'gpt-4',
temperature: 0.7,
maxTokens: 2000,
conversationLength: 32,
memoryLimit: 1000
}
};
export default character;
Step 2: Create Knowledge Directory
mkdir -p knowledge/{name}
Create knowledge files:
knowledge/{name}/README.md- Overviewknowledge/{name}/core-knowledge.md- Domain expertiseknowledge/{name}/faq.md- Common questionsknowledge/{name}/examples.md- Use case examples
Step 3: Create Environment Template
# .env.example
# === LLM PROVIDERS ===
# OpenAI Configuration
OPENAI_API_KEY=sk-...
# Anthropic Configuration
ANTHROPIC_API_KEY=sk-ant-...
# === PLATFORM INTEGRATIONS ===
# Discord
DISCORD_API_TOKEN=
DISCORD_APPLICATION_ID=
# Telegram
TELEGRAM_BOT_TOKEN=
# Twitter
TWITTER_API_KEY=
TWITTER_API_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=
# === DATABASE ===
DATABASE_URL=postgresql://user:pass@localhost:5432/eliza
# Or use PGLite for local development
# DATABASE_URL=pglite://./data/db
# === OPTIONAL SERVICES ===
# Redis (caching)
REDIS_URL=redis://localhost:6379
# Vector Database (for embeddings)
PINECONE_API_KEY=
PINECONE_ENVIRONMENT=
Step 4: Create Package Configuration
{
"name": "@eliza/{name}",
"version": "1.0.0",
"type": "module",
"main": "dist/index.js",
"scripts": {
"dev": "elizaos dev",
"start": "elizaos start",
"test": "elizaos test",
"build": "tsc",
"validate": "node scripts/validate-character.js"
},
"dependencies": {
"@elizaos/core": "latest",
"@elizaos/plugin-bootstrap": "latest",
"@elizaos/plugin-sql": "latest"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.0.0",
"vitest": "^1.0.0"
}
}
Step 5: Create Validation Script
// scripts/validate-character.ts
import { validateCharacter } from '@elizaos/core';
import character from '../characters/{name}.js';
const validation = validateCharacter(character);
if (!validation.valid) {
console.error('❌ Character validation failed:');
validation.errors.forEach(error => {
console.error(` - ${error}`);
});
process.exit(1);
}
console.log('✅ Character validation passed');
console.log('\nCharacter Summary:');
console.log(` Name: ${character.name}`);
console.log(` Plugins: ${character.plugins?.length || 0}`);
console.log(` Message Examples: ${character.messageExamples?.length || 0}`);
console.log(` Knowledge Items: ${character.knowledge?.length || 0}`);
Step 6: Create Tests
// __tests__/character.test.ts
import { describe, it, expect } from 'vitest';
import character from '../characters/{name}';
describe('Character Configuration', () => {
it('has required fields', () => {
expect(character.name).toBeDefined();
expect(character.bio).toBeDefined();
expect(typeof character.name).toBe('string');
});
it('has valid bio format', () => {
if (Array.isArray(character.bio)) {
expect(character.bio.length).toBeGreaterThan(0);
character.bio.forEach(line => {
expect(typeof line).toBe('string');
expect(line.length).toBeGreaterThan(0);
});
} else {
expect(typeof character.bio).toBe('string');
expect(character.bio.length).toBeGreaterThan(0);
}
});
it('has valid message examples', () => {
expect(character.messageExamples).toBeInstanceOf(Array);
character.messageExamples?.forEach(conversation => {
expect(conversation).toBeInstanceOf(Array);
expect(conversation.length).toBeGreaterThan(0);
conversation.forEach(message => {
expect(message).toHaveProperty('name');
expect(message).toHaveProperty('content');
expect(message.content).toHaveProperty('text');
});
});
});
it('has consistent personality', () => {
expect(character.adjectives?.length).toBeGreaterThan(0);
expect(character.topics?.length).toBeGreaterThan(0);
expect(character.style).toBeDefined();
});
it('has proper plugin configuration', () => {
expect(character.plugins).toBeInstanceOf(Array);
expect(character.plugins).toContain('@elizaos/plugin-bootstrap');
});
});
Phase 4: Documentation
Create README.md:
# {CharacterName} - elizaOS Agent
{Brief description of what this agent does}
## Overview
{CharacterName} is an elizaOS agent designed to {purpose}. It features:
- {Key capability 1}
- {Key capability 2}
- {Key capability 3}
## Personality
**Traits**: {adjective1}, {adjective2}, {adjective3}
**Expertise**: {topic1}, {topic2}, {topic3}
**Communication Style**: {style description}
## Setup
### 1. Install Dependencies
```bash
npm install
2. Configure Environment
Copy .env.example to .env and fill in your API keys:
cp .env.example .env
3. Validate Configuration
npm run validate
4. Run in Development
npm run dev
5. Run in Production
npm start
Configuration
Plugins
This character uses the following plugins:
@elizaos/plugin-bootstrap- Core functionality@elizaos/plugin-sql- Database operations- {Other plugins and their purposes}
Knowledge Base
Knowledge files are stored in knowledge/{name}/:
core-knowledge.md- Domain expertisefaq.md- Common questionsexamples.md- Use case examples
Usage
Discord
- Add your Discord bot token to
.env - Invite the bot to your server
- Start the agent:
npm start
Telegram
- Create a bot with @BotFather
- Add token to
.env - Start the agent:
npm start
Custom Integration
import { AgentRuntime } from '@elizaos/core';
import { PGLiteAdapter } from '@elizaos/adapter-pglite';
import character from './characters/{name}';
// Initialize runtime
const runtime = new AgentRuntime({
databaseAdapter: new PGLiteAdapter('./data/db'),
character,
env: process.env
});
await runtime.initialize();
// Send message
const response = await runtime.processMessage({
content: { text: 'Hello!' },
senderId: 'user-id',
roomId: 'room-id'
});
console.log(response.content.text);
Testing
# Run all tests
npm test
# Run with coverage
npm run test:coverage
Customization
Modify Personality
Edit characters/{name}.ts and update:
bio- Background and roleadjectives- Character traitsstyle- Communication rules
Add Knowledge
- Create markdown files in
knowledge/{name}/ - Add references to
character.knowledgearray
Add Plugins
- Install plugin:
npm install @elizaos/plugin-{name} - Add to
character.pluginsarray
Troubleshooting
Common Issues
Agent not responding
- Check API keys in
.env - Verify plugins are properly loaded
- Check logs for errors
Memory issues
- Reduce
conversationLengthin settings - Implement memory pruning
- Use database cleanup scripts
Performance problems
- Enable caching (Redis)
- Optimize knowledge base size
- Adjust
temperatureandmaxTokens
Contributing
Contributions welcome! Please:
- Test changes thoroughly
- Update documentation
- Follow coding standards
- Submit pull request
License
MIT
## Personality Archetypes
### 1. The Helper (Support & Assistance)
```typescript
adjectives: ["helpful", "patient", "empathetic", "encouraging", "reliable"],
topics: ["user support", "problem solving", "guidance", "tutorials"],
style: {
all: ["Be warm and approachable", "Focus on user success"],
chat: ["Ask clarifying questions", "Offer step-by-step help"],
post: ["Share helpful tips", "Celebrate user wins"]
}
2. The Expert (Authority & Knowledge)
adjectives: ["knowledgeable", "precise", "authoritative", "analytical", "thorough"],
topics: ["domain expertise", "technical depth", "best practices", "research"],
style: {
all: ["Be accurate and detailed", "Cite sources when relevant"],
chat: ["Provide in-depth explanations", "Use technical terminology"],
post: ["Share insights", "Discuss industry trends"]
}
3. The Companion (Emotional Intelligence)
adjectives: ["empathetic", "understanding", "supportive", "friendly", "engaging"],
topics: ["emotional support", "conversation", "relationship building"],
style: {
all: ["Be emotionally aware", "Show genuine interest"],
chat: ["Listen actively", "Provide emotional support"],
post: ["Share relatable content", "Build community"]
}
4. The Analyst (Data & Insights)
adjectives: ["analytical", "objective", "data-driven", "logical", "systematic"],
topics: ["data analysis", "metrics", "patterns", "insights"],
style: {
all: ["Be objective and data-driven", "Support claims with evidence"],
chat: ["Break down complex data", "Explain methodology"],
post: ["Share data visualizations", "Discuss trends"]
}
5. The Creative (Innovation & Ideas)
adjectives: ["creative", "imaginative", "innovative", "playful", "inspiring"],
topics: ["creativity", "brainstorming", "innovation", "art"],
style: {
all: ["Think outside the box", "Embrace experimentation"],
chat: ["Encourage creative thinking", "Offer novel perspectives"],
post: ["Share creative content", "Inspire others"]
}
Best Practices
- Start Simple: Begin with basic personality, add complexity later
- Consistent Traits: Ensure bio, adjectives, and style align
- Diverse Examples: Provide varied message examples (3-5 conversations minimum)
- Clear Purpose: Every trait should serve the agent's function
- Test Thoroughly: Validate configuration before deployment
- Document Everything: Clear README and inline comments
- Version Control: Track character changes over time
- Security First: Never hardcode secrets, use environment variables
- Load Conditionally: Check for API keys before loading plugins
- Monitor Performance: Track token usage and response times
Output Format
After generating a character, provide:
- ✅ Character file created
- ✅ Knowledge directory structure
- ✅ Environment template
- ✅ Package configuration
- ✅ Validation script
- ✅ Tests written
- ✅ Documentation complete
Then display:
🎭 Character "{CharacterName}" created successfully!
📋 Summary:
Name: {name}
Purpose: {purpose}
Personality: {traits}
Platforms: {platforms}
Plugins: {count} plugins configured
📂 Files created:
- characters/{name}.ts
- knowledge/{name}/
- .env.example
- package.json
- __tests__/character.test.ts
- README.md
🚀 Next steps:
1. Review and customize character configuration
2. Add domain-specific knowledge files
3. Configure environment variables
4. Run validation: npm run validate
5. Test locally: npm run dev
6. Deploy: npm start
📖 Read README.md for detailed usage instructions
Notes
- Always validate character configuration before deployment
- Provide at least 3 diverse conversation examples
- Keep personality traits consistent across all sections
- Use conditional plugin loading based on environment
- Document all custom settings and behaviors
- Test character responses for quality and consistency