Overview
The/character select command activates a specific character for your storytelling sessions. Characters define the protagonist or viewpoint through which your narrative unfolds.
Syntax
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
character_id | string | Yes | The unique identifier of the character to activate |
Behavior
When you execute/character select:
- Sets
state.ACTIVE_CHARACTER_IDto the specified character ID - Persists the change via
state.save_state() - Sends a system update confirmation
- Broadcasts the state change to all connected clients via
broadcast_sync_state()
Selecting a character is a prerequisite for creating new sessions. Both a world and character must be active before starting a session.
Examples
Select a Character
Select Another Character
Select Character with Numeric ID
WebSocket Response
The engine sends asystem_update event with the following payload:
Source Code Reference
Implemented inengine/commands.py:63-73:
Workflow Integration
The typical workflow for starting a new session:If you attempt to create a session without selecting both a world and character, you’ll receive an error:
✗ Select world/char first.Use Cases
Starting a New Adventure
Select your protagonist before beginning:Switching Perspectives
Change characters mid-session to explore different viewpoints:Continuing an Existing Session
When you continue a session with/session continue, the character is automatically restored:
Character Management
Characters are managed through thechar_manager database interface. Each character has:
- ID: Unique identifier
- Name: Display name
- Description: Character background and traits
- Persona: Personality and behavioral characteristics
- Example dialogues: Sample interactions for AI reference
Common Issues
State Persistence
The active character selection is persisted to disk immediately viastate.save_state(). This means:
- Your character selection survives engine restarts
- The character is available for session creation after restart
- The state is synchronized across all connected clients
Related
- World Commands - Select worlds to pair with characters
- Session Commands - Create sessions using world and character
- Character API - Manage characters programmatically