Skip to content
@agenerela

Agenerela

AI agents for Unity — let a language model drive NPCs, factions and colonies, constrained to actions you register. Local-first, no cloud required.

Agenerela — AI agents for Unity

Let a language model drive game agents — NPCs, companions, factions, colonies — constrained to actions you explicitly register. The model picks a behaviour; validated, deterministic game code carries it out.

Where the model runs

  • In a shipped game — inside the game itself, on the player's machine, so players install nothing. The plan is to build on LLMUnity.
  • During development — Ollama, to swap and benchmark models in seconds. Players never need it.
  • Optionally — cloud APIs, behind the same provider interface.

Why

Wiring a model into a game is not the hard part. Making its output safe to execute is.

In prototype measurements, a 2B local model chose the correct game action 58.5% of the time when the rules lived in the prompt. With a state-derived schema, constrained sampling and a deterministic validation layer, the same model reached 95%, and beat a 4B model that had none of that scaffolding.

The scaffolding is the framework. The model is a swappable part.

How it stays safe

  • Illegal actions and unknown targets are removed from the sampling grammar, so the model cannot emit them.
  • The executor re-validates every choice independently, so a provider without constrained decoding is still contained.
  • The model never touches Unity. It chooses; your code acts.

Status

Early development, not yet ready to drop into a game. The framework is being built phase by phase from that measured prototype.


Senior design project, California State University, Northridge — COMP 490 / 491.

Pinned Loading

  1. agenerela agenerela Public

    AI agents for Unity — let a language model drive NPCs, factions and colonies, constrained to actions you register. Local-first, no cloud required.

    C# 3

Repositories

Showing 2 of 2 repositories

Top languages

Loading…

Most used topics

Loading…