A developer describes an LLM-based system for creating intelligent NPCs in a 3D action game that responds in under two seconds. The system uses an event-driven behavior pipeline that converts game state into text prompts, leveraging long-term and working memory to generate short-term action plans. Inference speed is optimized through compact YAML prompts, summary folding of event logs, and streaming of action outputs.