OpenGameAgent
Open-source C# agent runtime for AI-native games, autonomous NPCs, and interactive worlds. Structured context, tools, memory, multi-NPC scheduling, and durable game actions.
OpenGameAgent is a C sharp runtime for autonomous game characters
The project lets NPCs observe structured state, call game owned tools, remember and pursue goals while the game engine stays authoritative over state changes.
What the runtime provides
OpenGameAgent is a compact, hackable C sharp runtime for AI native games, autonomous NPCs and interactive worlds. It runs inside Godot, Unity or .NET services while the game code remains authoritative over every state change, which is the central design promise. The project starts from a small composable agent kernel that streams model output, executes validated tools, accepts steering while running, and continues the model and tool loop until work is complete. Developers can use the kernel alone, add the game runtime for game time and durable state, then opt into extensions for memory, goals, host verified task plans, artifacts, delegation, external tools, structured interaction and workflow graphs. Inputs are bounded JSON plus optional durable image observations and may represent dialogue, combat, simulation ticks, UI events, plans or sensor state, with natural language optional.
How agents differ from chat characters
The README contrasts a dialogue only character, which receives a prompt and returns a line, with an agent driven character, which receives a goal and the current environment, chooses tools, performs work, observes the result and continues until a terminal outcome. In OpenGameAgent those tools are ordinary game owned operations such as move, inspect, trade, build, schedule or recruit. The model never directly controls game state; the game validates permissions, rules, revisions and state changes at every mutation boundary. A game can route simple inputs like greetings through a quick response path, use the full agent loop for open ended tasks, and use deterministic workflows where the execution graph should be fixed. The project is model and provider neutral, supporting both cloud and local API endpoints with no model bundled.
Status and licensing
The README shows an alpha status badge alongside CI and MIT license badges, and a Chinese translation is available. The homepage is opengameagent.com. The repository carries 34 stars and 4 forks with no open issues at the time of this writing, and the default branch is main. The practical picture is an early stage but well structured runtime that treats the game engine as the source of truth and gives agents structured, validated tools rather than raw control. As an alpha project, APIs and extensions are likely to shift before a stable release, so integrators should expect change and watch the changelog.
Editorial conclusion
OpenGameAgent is an MIT licensed, alpha stage C sharp runtime on the main branch with 34 stars that runs inside Godot, Unity or .NET, keeps the game engine authoritative, and offers a composable agent kernel with optional memory, goals and tool extensions.
Community notes