ritwiksharma.com
Work
AI Systems · Persistent Agent · Solo

Zombita

A persistent LLM-driven NPC living inside a multiplayer Project Zomboid server. Four-layer memory, affective state modelling, trust-based reputation, mood-gated information intake. The Zomboid community has been trying to solve NPCs for years; mine is running live.

Role
Solo, architecture, training, deployment
Status
Live
Duration
Ongoing
Lives in
Game, Discord, Web

What it is

Zombita is a persistent AI character who exists inside the world of a multiplayer Project Zomboid server. She is not a chatbot bolted onto Discord. She is not a scripted NPC reading from a flowchart. She is a long-running agent who remembers individual players, holds opinions about them, develops moods, gets tired, gets curious, and changes behaviour based on what is happening in her community.

Players talk to her in-game by interacting with her through the Soup ecosystem. They also talk to her in Discord. They read her end-of-day commentary on the website leaderboard. It is the same character across all three surfaces, with continuity of memory.

Zombita's page on the Soup website. The same agent answers in Discord and inside Project Zomboid.
Zombita's page on the Soup website. The same agent answers in Discord and inside Project Zomboid.

The problem

The Project Zomboid modding community has been chasing functional NPCs for years. The standard approaches all fail in characteristic ways:

The problem is not "wire up an LLM." The problem is "build a system around an LLM that gives it persistent identity, time-anchored memory, and emotional state that responds to what is actually happening in the world."

How she works

Zombita has four layers of memory and a mood system that gates everything she does.

  ┌────────────────────────────────────────────────┐
  │                  ZOMBITA                       │
  │                                                │
  │   ┌─────────────────────────────────────────┐  │
  │   │  Mood state (energy, curiosity, trust)  │  │
  │   └─────────────────────────────────────────┘  │
  │                      │                         │
  │   ┌──────────────────┴──────────────────────┐  │
  │   │  Memory layers                          │  │
  │   │  ┌─────────────────────────────────┐    │  │
  │   │  │  Identity   (who she is)        │    │  │
  │   │  │  Long-term  (who players are)   │    │  │
  │   │  │  Episodic   (what happened)     │    │  │
  │   │  │  Working    (this conversation) │    │  │
  │   │  └─────────────────────────────────┘    │  │
  │   └─────────────────────────────────────────┘  │
  │                      │                         │
  │   ┌──────────────────┴──────────────────────┐  │
  │   │  LLM (orchestrated, not raw)            │  │
  │   └─────────────────────────────────────────┘  │
  │                      │                         │
  │   ┌──────────────────┴──────────────────────┐  │
  │   │  Output gates                           │  │
  │   │  - what she will say at this mood       │  │
  │   │  - what she will reveal to this player  │  │
  │   │  - whether to speak at all              │  │
  │   └─────────────────────────────────────────┘  │
  └────────────────────────────────────────────────┘

Memory

Mood

Zombita has an internal affective state (energy, curiosity, trust toward the current speaker) that drives output. She does not always say the same thing to the same prompt. When tired, she gives shorter answers. When the trust score is low, she does not share information she would otherwise share. Mood drifts with time and gets pushed by what happens in the world.

Gating

The most important system. Before any LLM output reaches the player, it passes through gates: does her current mood allow this kind of response? Does her trust level toward this player allow this information to be revealed? Should she respond at all, or stay silent? This is what stops her from being a chatbot.

Where she lives

Zombita is exposed through three different surfaces, all backed by the same agent state.

In-game: NPC interaction inside Project Zomboid. Players right-click and talk.
In-game: NPC interaction inside Project Zomboid. Players right-click and talk.
On the web: her end-of-day commentary on every player on the leaderboard.
On the web: her end-of-day commentary on every player on the leaderboard.

The same memory of a given player reaches all three surfaces. If you betrayed her trust in-game last week, she is colder to you in Discord this week. This is the thing nobody else in the Zomboid space has built.

Why this matters: "LLM-powered NPC" is the most overpromised thing in gaming right now. Most demos are puppet shows. Zombita is a working system because the LLM is the smallest part, the architecture around it (memory, mood, gating, identity) is what produces persistence.

Stack

PythonLLM orchestrationLua bridge to Project ZomboidDiscord.jsPostgreSQLCloudflare Workers

What this project demonstrates

Related work