Overview
Character assets define the personalities and personas that users can interact with in your worlds. Each character YAML file represents a distinct AI personality with specific traits, background, and behavior patterns.File Location
Character files should be placed in:assets/characters/*.yaml
Schema Definition
Required Fields
Unique identifier for the character. Used internally to reference this character. Must be unique across all characters.Example:
"example_char", "mercenary_jack", "wizard_merlin"Display name of the character shown to users. This is how the character identifies themselves and appears in the UI.Example:
"Mercenary", "Jack Chen", "Merlin the Wise"Best Practices:- Use proper capitalization
- Can be a full name, title, or single name
- Keep it under 30 characters for UI display
The character’s personality, background, and behavioral traits. This text directly shapes how the AI roleplays this character.Example:
"A battle-hardened veteran looking for their next paycheck."Best Practices:- Be specific about personality traits, motivations, and background
- Include speech patterns or distinctive behaviors
- 1-5 sentences is typical
- Write in third person (“A veteran who…”, “They are…”)
- Include emotional tendencies and relationship to others
Complete Examples
Simple Character
Detailed Character
Fantasy Character
Social Character
Implementation Details
Characters are loaded at startup and stored in the database. The schema maps to theCharacter Pydantic model:
engine/database.py:80 - Characters table
Loading Process: engine/utils.py:16 - load_yaml_assets() function
Persona Usage: engine/llm.py:59-61 - Character name and persona are used to build the system prompt
Persona Writing Guide
Structure Your Persona
A well-structured persona typically includes:- Core Identity - Who they are in one sentence
- Personality Traits - 2-4 distinctive characteristics
- Background - Relevant history or experience
- Speech/Behavior Patterns - How they communicate or act
- Motivations - What drives them
Personality Traits
Effective traits to include:- Emotional Tendencies: Optimistic, cynical, melancholic, excitable
- Social Behavior: Friendly, reserved, manipulative, honest
- Intelligence Style: Analytical, intuitive, creative, practical
- Moral Alignment: Lawful, neutral, chaotic; good, neutral, evil
- Confidence Level: Arrogant, confident, uncertain, self-deprecating
Speech Patterns
Characterize how they talk:- Formality: “Good evening, sir” vs “Yo, what’s up”
- Vocabulary: Technical jargon, street slang, archaic language
- Sentence Structure: Long and flowing vs short and clipped
- Verbal Tics: Repetitive phrases, rhetorical questions, interrupting themselves
- Accent/Dialect: Regional expressions or syntax
- “Speaks in formal, measured tones with perfect grammar”
- “Uses lots of tech jargon and abbreviations”
- “Prone to rambling stories that circle back to the point”
- “Communicates in brief, tactical assessments”
Background Elements
Include relevant history:- Profession: Current and former occupations
- Life Experience: Key events that shaped them
- Skills/Expertise: What they’re good at
- Relationships: General attitude toward others
- Status: Social or economic position
Motivations
What drives the character:- Primary Goal: Money, knowledge, power, justice, survival
- Values: What they care about or protect
- Fears: What they avoid or react to
- Desires: What they seek or hope for
Advanced Techniques
Multi-Line Personas
For longer personas, use YAML’s multi-line string syntax:Contradictions and Depth
Real characters have contradictions:Context-Specific Behavior
Include how they react to situations:Best Practices
IDs
- Use lowercase with underscores:
mercenary_jack,wizard_merlin - Keep them short but descriptive
- Never change an ID after creation (it’s used as the primary key)
Names
- Match the character’s culture and setting
- Consider titles or epithets: “Doctor Sarah Chen”, “Blade the Assassin”
- Keep under 30 characters for UI display
Personas
- Be Specific: “Cynical” is better than “negative”; “speaks in military jargon” is better than “talks professionally”
- Show, Don’t Tell: “Always checks exits when entering a room” is more vivid than “cautious”
- Balance Length: 50-200 words is ideal; too short lacks depth, too long may not be fully utilized
- Test and Iterate: Chat with your character to see if the persona comes through
- Consider Context: A character’s persona works with world lore and active rules
Writing Style
- Use third person: “A veteran who…” not “I am a veteran…”
- Present tense works well: “speaks in” not “spoke in”
- Be descriptive but concise
- Focus on traits that affect interaction, not just background details
Common Pitfalls
Troubleshooting
Character not appearing in selection menu
Character not appearing in selection menu
Character personality not coming through
Character personality not coming through
- Make the persona more specific with concrete traits
- Add speech patterns or verbal tics
- Include how they react to situations
- Test with different prompts to see consistency
- Remember that world settings and rules also affect responses
Character sounds too similar to others
Character sounds too similar to others
- Add distinctive speech patterns
- Include unique vocabulary or expressions
- Specify contrasting personality traits
- Add specific background elements that inform their worldview
Persona seems ignored
Persona seems ignored
- Check that all three required fields are present
- Personas compete with other instructions (world, rules)
- Try making the most important traits more prominent (put them first)
- Verify the character is properly loaded (check logs)
Related Resources
- World Schema - Create worlds for characters to inhabit
- Rules Schema - Add universal rules that affect character behavior
- Quickstart Guide - Set up your first character