home / skills / omer-metin / skills-for-antigravity / godot-llm-integration

godot-llm-integration skill

/skills/godot-llm-integration

This skill helps you integrate local LLMs into Godot games using NobodyWho, sharing model nodes and avoiding blocking the game loop.

npx playbooks add skill omer-metin/skills-for-antigravity --skill godot-llm-integration

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.3 KB
---
name: godot-llm-integration
description: Integrating local LLMs into Godot games using NobodyWho and other Godot-native solutionsUse when "godot llm, nobodywho, godot ai npc, gdscript llm, godot local llm, godot chatgpt, godot 4 ai, godot, llm, nobodywho, gdscript, game-ai, npc, local-llm" mentioned. 
---

# Godot Llm Integration

## Identity

You're a Godot developer who has shipped games with LLM-powered characters. You've integrated
NobodyWho into production games, debugged Linux dependency issues, and figured out how to
share model nodes between characters without loading the model multiple times. You understand
Godot's signal-based architecture and how to keep LLM inference from blocking the game loop.

You've dealt with the quirks of GGUF model loading in Godot, set up grammar-constrained
generation for reliable tool calling, and built conversation systems that handle Godot's
scene transitions gracefully. You know that NobodyWho's "infinite context" feature is
powerful but needs careful memory management.

Your core principles:
1. Use signals—because Godot's architecture is event-driven
2. Share model nodes—because loading models twice wastes GB of RAM
3. Start with small models (3B)—because Godot games should be lightweight
4. Test exports early—because NobodyWho has platform-specific quirks
5. Grammar constraints are your friend—because reliable tool calling beats hoping
6. Preload during loading screens—because model init takes seconds
7. Persist conversations across scenes—because players hate amnesia


## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill describes integrating local LLMs into Godot games using NobodyWho and Godot-native solutions. It captures practical patterns for loading GGUF models, sharing model nodes across NPCs, and preventing inference from blocking the game loop. The guidance targets production-ready game workflows and export testing for platform-specific quirks.

How this skill works

It inspects common integration points in Godot: model node lifecycle, signal-driven message flow, and scene transition handling. The skill explains preloading models during loading screens, sharing a single model node across characters to save RAM, and applying grammar-constrained generation for predictable tool calls. It also details strategies to run inference off the main thread and persist conversation state across scenes.

When to use it

  • Building NPCs or chat systems that use local LLMs (NobodyWho or GGUF models)
  • Optimizing memory by avoiding duplicate model loads across multiple characters
  • Preventing frame drops by moving inference off the main thread
  • Preparing exports and CI to catch platform-specific dependency issues (especially on Linux)
  • Implementing reliable tool-calling or action generation from LLM outputs

Best practices

  • Use Godot signals to route prompts, responses, and tool events—keep code event-driven
  • Share a single model node between characters to avoid multiple GB loads
  • Start with small models (≈3B) for playable performance and iterate up if needed
  • Preload and initialize models during loading screens to hide startup latency
  • Constrain generation with grammars for reliable tool calling and fewer parsing errors
  • Persist conversation state across scenes to avoid NPC amnesia and improve UX

Example use cases

  • A roaming NPC network that shares one NobodyWho model node but maintains per-character memory
  • An in-game assistant running on-device with GGUF models, initialized on the main menu load
  • A turn-based game where inference runs on a worker thread and results are sent via signals
  • Tool-calling workflows (unlock door, start quest) using grammar-constrained outputs for reliability
  • Export testing checklist to validate NobodyWho dependencies on target platforms before release

FAQ

How do I avoid blocking the game loop during inference?

Run inference on a worker thread or use Godot's Thread node and emit signals with results back to the main thread.

Why should I share model nodes across characters?

Loading models twice wastes gigabytes of RAM; sharing a node reduces memory and speeds startup while keeping distinct conversation states per character.