Dynamic Context
Inject real-time context into the character's understanding — game state, user preferences, scene changes — without reconnecting.
Dynamic context at connect time
client.connect({
apiKey: '...',
characterId: '...',
dynamicInfo: 'Player: Aria, Level: 5, Current zone: Eldenmere Forest',
});{
dynamicInfo: 'Game rules: PvP is disabled. Economy: inflation mode.',
keepInContext: true, // persists as a fixed prompt for the session
}updateContext
updateContextclient.updateContext(options: ContextUpdateOptions)Options
Field
Type
Default
Description
Modes
Triggering a bot response
Monitor token usage via serverResponse
serverResponseupdateDynamicInfo
updateDynamicInfoNarrative Design Template keys
Dashboard setup (prerequisites)
Seed at session start: narrativeTemplateKeys config
narrativeTemplateKeys configUpdate mid-session: updateTemplateKeys()
updateTemplateKeys()Rules
Troubleshooting
Symptom
Cause
File upload
React
Vanilla JS
Options
Field
Type
Default
Description
Supported formats
Format
MIME type
Error handling
Notes
Scene metadata
Session management
Reset conversation
Idle timeout
Long-term memory
Last updated
Was this helpful?