← Blog

AI Agent Pixel Office: What It Is and How to Build One

2026-09-21 · 5 min read · SubToAPI Team

An "AI agent pixel office" is a simulated environment — usually rendered in retro pixel art, like a top-down 16-bit game — where autonomous AI agents live, move, and interact with each other on their own. Instead of a human controlling the characters, each one is driven by a language model that decides where to walk, who to talk to, and what to do next based on memory of past events. The format got popular after Stanford's "Generative Agents" paper (the Smallville simulation) and open-source follow-ups like AI Town, which put LLM-driven NPCs into a pixel-art town or office and let them run a virtual day.

If you're searching this term, you're probably trying to do one of two things: understand what these simulations actually are and how they work under the hood, or figure out how to build your own small version — a pixel office where agents hold meetings, chat at the coffee machine, or file "reports" — as a demo, a game mechanic, or a testbed for multi-agent behavior. This article covers both.

What's actually happening under the pixel art

The pixel art is just the presentation layer. The interesting part is the loop running behind each character. In the Stanford paper and most clones, each agent runs through four steps every simulated tick:

  1. Perceive — what's nearby: other agents, objects, events happening in the same room or zone.
  2. Remember — store the observation as a timestamped memory entry in a per-agent memory stream.
  3. Reflect — periodically summarize recent memories into higher-level insights ("Alex seems stressed about the deadline").
  4. Plan and act — decide the next action given current goals, personality, and retrieved memories, then translate that into a game action (move to desk, start conversation, send a message).

None of this requires a game engine to be smart — the engine just needs to render sprites, handle collision, and expose hooks for "agent wants to move to (x,y)" or "agent wants to speak." The actual decision-making is an LLM call with a prompt built from the agent's persona, current context, and relevant memories retrieved from a vector or keyword store.

The typical stack

Most pixel-office agent projects share a similar shape:

The brain is the part that gets expensive and slow if you're not careful, because every agent, every tick, needs its own model call — and a pixel office with a dozen agents checking in every few seconds adds up fast in both latency and cost.

Wiring the agent brain to a real API

For the decision step, you're sending a structured prompt and want a structured, fast response — ideally streamed if you're driving a live chat bubble above a character's head. This is exactly the kind of workload SubToAPI is built for: it turns your existing Claude access into a plain HTTPS API with application keys, so your simulation server can call a model without you managing separate provider billing per agent.

A single decision call for one agent might look like this:

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4",
    "max_tokens": 200,
    "messages": [
      {
        "role": "user",
        "content": "You are Priya, a UX designer. It is 2:14pm. You just saw Marcus walk into the break room. Recent memory: you owe him feedback on the onboarding flow. Decide your next action in one short JSON object: {\"action\": \"...\", \"target\": \"...\", \"dialogue\": \"...\"}"
      }
    ]
  }'

For agents that need to check calendars, read a task queue, or update a shared whiteboard object instead of just chatting, you can define those as tools and let the model call them directly — see /docs/tools for the request format. And if you want dialogue to appear character-by-character above a sprite instead of dumping the whole reply at once, streaming responses (/docs/streaming) fits naturally with a pixel-art speech bubble.

const res = await fetch("https://api.subtoapi.app/v1/messages", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "claude-sonnet-4",
    max_tokens: 150,
    messages: [{ role: "user", content: agentPrompt }]
  })
});
const data = await res.json();

Usage metadata on each response lets you track token spend per agent, which matters once you have more than two or three characters running — a busy pixel office can burn through tokens quickly if every agent reflects and plans every few seconds. Start with a free trial (/signup) and check /pricing if you're building this as a team project with multiple contributors needing their own keys.

Keeping it manageable

A few practical tips if you're actually building one:

Start with two or three agents and a small map before scaling to a full office floor — debugging emergent behavior across a dozen simultaneous agents is much harder than it looks in the demo videos.

questions

Is an AI agent pixel office a real product or just a demo concept? It's mostly a demo/research pattern popularized by Stanford's Generative Agents paper and projects like AI Town, not a single commercial product — most implementations are open-source or custom-built.

What LLM should I use for agent decisions in a pixel simulation? A fast, cost-efficient model works best since you're making many small calls; reserve larger models for agents with complex reasoning or long-term planning needs, and check /docs/quickstart for setup basics.

Do I need a game engine to build one? No — a canvas-based renderer or lightweight library like PixiJS is enough; the core work is the agent decision loop and memory system, not the graphics.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →