Skip to content
Courses/Games, 3D and simulations with AI/NPC with Local LLM and Memory in Godot

NPC with Local LLM and Memory in Godot

An AI NPC doesn't need to be infinite. It needs character, lore, a small memory, clear boundaries, and a safe fallback when the model is slow or invents too much.

  • Design an NPC that responds with lore and quest state.
  • Connect Godot to a local server that supports HTTP.
  • Avoid slow, contradictory, or off-tone dialogue.
Terminal
npc_memory:
  npc_id: "herrera_lina"
  player_name: "Ada"
  facts:
    - "Ada found the mill key"
    - "Lina does not trust the mayor"
  quest_state: "find_map"
  tone: "direct, rural, somewhat dry"
  forbidden:
    - "reveal ending"
    - "invent locations outside the map"
Terminal
System prompt for the NPC:
You are Lina, blacksmith of Puerto Bruma.
Reply in at most 2 sentences.
You only know places on the map: mill, port, mine, and plaza.
If the player asks something outside the lore, redirect to the active quest.
Do not reveal complete solutions; give a verifiable clue.
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue