Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

EricSun0218/OpenGameAgent

13C#Apache-2.0

An open-source C# toolkit that lets game NPCs act like autonomous agents, not just chatbots

OpenGameAgent is a compact C# runtime that lets game characters observe game state, decide, call developer-defined tools, and keep working toward a goal instead of just returning a single line of dialogue. It runs inside Godot, Unity, or .NET servers, while the game itself always stays in control of whether an action actually happens. The project is at version 0.3.0-alpha.2, so its public interfaces can still change before a stable 1.0.

What it does

  1. Problem addressed: most AI-driven NPCs today just take a prompt and produce a reply, with no ability to observe results, use tools, or continue working across multiple steps.
  2. How it works: a small 'agent kernel' streams model output, runs validated developer-defined tools (move, trade, build, etc.), and loops back with results until the task is done; an optional 'game runtime' layer adds game-specific concepts like timelines, ticks, sessions, and memory.
  3. Key boundary: the AI model never directly changes game state — it can only request actions, and the game code validates and executes every mutation, returning an authoritative result.
  4. What's included: streaming tool-calling, persistent memory with vector/lexical search, task plans, multi-NPC concurrency control, image input support, plugin system (Agent Plugins), and connectors for many model providers (Anthropic, OpenAI, Gemini, Bedrock, Mistral, etc.).
  5. Where it runs: as a library inside Godot 4.7 or Unity 6 projects, inside a game's own server, or as a separate agent service reached over HTTP/SSE.

Why it matters

Game developers who want NPCs that plan, use tools, and remember things (not just chat) get a reusable, engine-agnostic building block instead of writing this agent-loop plumbing themselves. Because the framework keeps the game authoritative over every state change, it's a safer pattern for adding LLM-driven behavior without letting a model directly mutate game logic.

Terms in this repo

  • agent kernel · the core loop that streams model output, calls tools, and repeats until a task finishes
  • tool calling · letting the AI model request specific developer-defined actions (like 'move' or 'trade') instead of freely changing game state
  • game runtime · an optional layer adding game-specific features like game clocks, sessions, and per-actor concurrency on top of the kernel
  • MCP · Model Context Protocol, a standard way for external tool servers to be discovered and called by an agent
  • vector index · a searchable store of text embeddings used to retrieve relevant memories by meaning, not just keywords

Repository description (English)

a compact, hackable C# runtime for AI-native games, autonomous NPCs, tool calling, memory, workflows, Godot, and Unity.

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA