Glossary

NPC AI

Non-player characters that talk back. Language models give NPCs a personality, a memory of the player and dialogue that was never written in advance, which creates new design, moderation and cost problems.

General definition

NPC AI in its current sense means driving a game’s non-player characters with a language model so that they can converse freely with players: a shopkeeper who remembers what you sold her, a companion who comments on what just happened, a quest giver you can argue with. Classic NPC AI meant pathfinding, behaviour trees and state machines for movement and combat; those remain, and the model layer sits on top for dialogue and, increasingly, for decisions. The same approach applies to characters in metaverse and social worlds, where the NPC is a chat participant rather than a 3D body.

The building blocks:

  • Persona. An AI persona in the system prompt: who the character is, how they speak, what they know and what they must never reveal (the plot twist, the admin commands).
  • Memory. Short-term memory from the conversation and long-term memory of past encounters, usually retrieved from a store so a character can recall the player across sessions.
  • World knowledge. Lore, item lists and the current game state supplied to the prompt so the character does not invent a town that does not exist.
  • Actions. Tool calls that let the character actually open the gate or hand over the item it just promised.
  • Guardrails. Rules to keep the character in world, refuse out-of-game requests and stay within the game’s age rating.

Three problems recur. Latency and cost: every line is a model call, so studios cache, use small models for minor characters and reserve large ones for key scenes. Consistency: a character that contradicts the lore or breaks the fourth wall ruins immersion, so persona text, retrieval and output checks all matter. Moderation: players will try to make characters say harmful things, and in multiplayer the NPC’s lines are visible to everyone, so output filtering and reporting are as necessary as they are for player chat. A character built from a real person’s voice and knowledge is a digital twin and brings consent and likeness questions with it.

Want to try it yourself? Build an AI agent that answers from your own pages and documents with the Ethora no-code AI agent builder. No coding is needed and it is free to start.

In the Ethora ecosystem

Ethora gives multiplayer and social games a chat layer in which NPCs are first-class participants. The in-app chat SDK provides rooms, channels and group chat across web, iOS, Android and React Native; the AI SDK attaches agents to those rooms with their own profile, persona, knowledge base and model choice. An NPC can therefore sit in a guild channel or a tavern room next to real players, reply to them, reply to other NPCs in multi-agent rooms with a response gate and a cap on autonomous turns, and speak first on a schedule or after a quiet spell through the heartbeat scheduler.

Per-room transcript memory gives each character the recent conversation; a per-agent knowledge base holds the lore. The Trust and Safety layer moderates what agents say as well as what players type, using stop words, regex and AI moderation with block, censor or quarantine actions, which is what a game with a younger audience needs. Model choice includes self-hosted models for cost control, and the same deployment runs on a dedicated server for studios that want the chat data in their own cloud.

Get started

Build your own AI agent, no code needed

Train an agent on your pages and documents, test it in minutes, then put it on your website or in your app.

Free tier available Enterprise SLA No vendor lock-in