An Intent-Driven Agentic AI Framework for Contextual and Adaptive NPC Behavior

This project develops a configurable framework for non-player character interaction in which conversational flexibility is combined with deterministic control over game-facing outcomes. The work is motivated by a practical problem in role-playing games and simulations: scripted NPC systems are reliable but often repetitive, while unconstrained generative systems can produce dialogue that conflicts with quest logic, relationship gates, or restricted world knowledge. The implemented framework addresses this gap by separating interaction handling into explicit stages. Player input is mapped to a bounded intent vocabulary, the current state is resolved, deterministic rules compute the permitted outcome, a constrained context is prepared for rendering, and the selected provider renders only the final NPC line. Guardrails validate the rendered line before it is returned, preserving narrative consistency and reducing the chance of unauthorized claims entering the interaction. The resulting system is configuration driven and supports multiple projects, multiple NPCs, stateful quest gating, relationship-sensitive responses, controlled lore disclosure, provider switching, theme-aware demonstration surfaces, guided walkthroughs, and SQLite-backed session state without changing core engine code. The framework also includes an evaluator-facing demo, a showcase dashboard, a patch-based admin dashboard for authoring project packs, and a golden-scenario evaluation runner for repeatable testing. The implementation demonstrates that adaptive NPC behavior does not require transferring authority to a language provider. Instead, the provider is treated as a rendering component inside a broader software architecture that remains testable, explainable, and suitable for later integration into game systems.

Paper

The full text of this publication is not hosted on 44B due to licensing.

Read it at OpenAlex

Similar papers

© 2026 NYSGPT2525 LLC