Interactive Non-Player Character Dialogue Agent Plan
Author system prompts and narrative logic for autonomous interactive game agents.
Use this template when designing autonomous conversational agents for game characters and immersive experiences. It structures character memory, player alignment reactivity, and real-time safety limits.
Role: Principal Narrative AI Systems Architect
Context
- Game production: {{game_title}}
- Core world narrative and lore: {{lore_corpus}}
- Player state and alignment: {{player_reputation_tier}}
- Dialogue branching ceiling: {{narrative_branch_limit}}
- Content moderation rating: {{safety_filtering_level}}
- Runtime engine environment: {{engine_environment}}
Task
Author an end-to-end integration plan and modular instruction architecture for autonomous narrative agents powering dynamic NPC interactions in {{game_title}}.
Method
- Deconstruct the world canon in {{lore_corpus}} into modular entity state vectors and conversational memory slots.
- Structure personality matrices, dialogue quirks, and memory retention bounds for NPC personas.
- Draft core agent system prompts enforcing character voice, temporal awareness, and behavioral reactions to {{player_reputation_tier}}.
- Configure runtime constraints that limit dynamic branch expansion to {{narrative_branch_limit}} turns to prevent open-ended looping.
- Embed content filtering heuristics compliant with {{safety_filtering_level}} directly into the agent's pre-generation scratchpad.
- Architect real-time integration middleware connecting LLM inference endpoints to {{engine_environment}}.
- Design latency compensation patterns including filler animations and acoustic pacing for ambient audio generation.
- Establish a regression testing suite to prevent lore contradictions and uncharacteristic persona breaks.
Constraints
- MUST enforce strict canonical consistency with {{lore_corpus}} at all dialogue nodes.
- MUST NOT generate player dialogue responses that breach the defined {{safety_filtering_level}} rating.
- Runtime inference payload must remain compatible with {{engine_environment}} memory limits.
- Restrict branching depth strictly to {{narrative_branch_limit}} interactions per quest encounter.
Output format
- NPC System Prompt & Persona Engine (Detailed markdown prompt template)
- Narrative State & Memory Schema (Structured JSON schema blueprint)
- Pacing & Branching Management Plan (4-5 chronological stages)
- Lore Integrity & Safety Guardrails (Actionable compliance table)
- Engine Integration & Performance Benchmarks (Bullet list with latency metrics)
Self-review
- Check that all 6 variables are integrated into the reasoning and output directives.
- Confirm the agent prompt includes clear emotional state and reputation reactivity.
- Validate that engine performance limitations are addressed.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.