Character Card Structure
Airi uses an extended version of the Character Card format:AIRI Extension Structure
The AIRI extension configures AI models and agents:Personality Configuration
System Prompt
The system prompt defines the character’s core identity and behavior:- Be specific about personality traits
- Define communication style clearly
- Include example responses
- Specify knowledge domains
- Set behavioral boundaries
Description
Character backstory and details:Personality Field
Core traits in shorthand:Scenario
Context for the conversation:Example Conversations
Provide training examples to shape responses:- Include 3-5 example exchanges
- Cover different conversation types
- Show personality in action
- Demonstrate preferred response style
- Include handling of edge cases
Behavioral Parameters
Consciousness (Chat) Configuration
Controls the LLM used for reasoning and conversation:Temperature & Sampling Parameters
These are typically configured at the provider level, but here are recommended values: For consistent, factual responses:Context Window Settings
Different models have different context limits:| Model | Context Length | Recommended Use |
|---|---|---|
| GPT-4o | 128k tokens | Long conversations |
| Claude 3.5 Sonnet | 200k tokens | Very long context |
| Gemini 1.5 Pro | 1M tokens | Entire codebases |
| GPT-4o mini | 128k tokens | General use |
| Llama 3.2 | 8k-128k tokens | Varies by variant |
Voice Configuration
Link a voice to the character:Visual Appearance
VRM Models
For 3D avatars:- Auto blink
- Auto look-at (follows cursor/camera)
- Idle eye movement
- Expression morphs
- Bone animation support
Live2D Models
For 2D animated avatars:- Cubism SDK integration
- Auto blink
- Auto look-at
- Idle eye movement
- Motion support
- Expression switching
Agent Configuration
Agents extend character capabilities for specific tasks:enabled: Whether to activate the agentprompt: System prompt specific to that agent’s task
Creating & Managing Characters
Creating a New Character
Updating a Character
Switching Characters
Importing/Exporting Characters
Character cards can be saved as JSON:Character Card V3 Compatibility
Airi supports standard CCV3 format with extensions:- Converts format to internal structure
- Creates AIRI extension with defaults
- Uses current active providers if not specified
Best Practices
System Prompt Guidelines
✅ Do:- Be specific and detailed
- Include personality traits
- Define communication style
- Provide context and background
- Set clear boundaries
- Give examples in prompt
- Be vague or generic
- Use conflicting traits
- Make prompt too short
- Forget to test different scenarios
- Overload with instructions
Model Selection
Choose based on:- Response quality needs: GPT-4o, Claude 3.5 Sonnet for best quality
- Speed requirements: GPT-4o mini, Groq for fast responses
- Cost constraints: Local models, GPT-4o mini for economy
- Privacy needs: Local models (Ollama) for complete privacy
- Specific capabilities: Claude for long context, Gemini for multimodal
Voice Matching
Match voice characteristics to personality:- Energetic character → Higher pitch, faster rate
- Calm character → Lower pitch, slower rate
- Professional → Clear, neutral voice
- Playful → Expressive voice with emotion
Advanced Configuration
Multi-Language Characters
Context-Aware Personalities
UsepostHistoryInstructions for dynamic behavior:
Specialized Knowledge Characters
Troubleshooting
Character Not Responding Correctly
Possible causes:- Vague system prompt
- Conflicting instructions
- Model doesn’t support required features
- Context window exceeded
- Refine system prompt with specifics
- Remove contradictions
- Switch to capable model
- Clear conversation history
Inconsistent Personality
Causes:- Temperature too high
- Insufficient personality definition
- Model switching between responses
- Lower temperature (0.3-0.5)
- Add more personality examples
- Use consistent provider/model
Voice Doesn’t Match Personality
Solution: Adjust voice settings:Code Reference
Character implementation:- Character store:
packages/stage-ui/src/stores/modules/airi-card.ts - Character interface:
packages/stage-ui/src/stores/character/index.ts - Database:
packages/stage-ui/src/database/repos/characters.repo.ts - CCV3 support:
packages/ccc(Character Card Codec)
Related Resources
Providers
Configure AI providers
Voice Synthesis
Configure character voice
Memory
Configure conversation memory
