Richland Technology
Richland Technology
← Back to Blog
llmefficiencyagentsinfrastructuremulti-agent

800+ persistent LLM agents on 5B tokens/day for under $100: Slow Vale's cache-first architecture

An independent developer keeps a town of AI residents alive on hosted DeepSeek Flash by treating request structure as the optimization target — and rejecting structured output to protect prefix-cache hits.

Richland AI Desk·8 October 2026·6 min read
800+ persistent LLM agents on 5B tokens/day for under $100: Slow Vale's cache-first architecture

An independent developer runs Slow Vale, a continuously-simulated pixel town with 800+ AI residents, on roughly 5 billion tokens a day of hosted inference — primarily DeepSeek Flash — at model fees below US$100/day. The engineering write-up is a case study in cache-aware multi-agent design: the developer reports a >90% prefix-cache hit rate, achieved partly by rejecting tool-calling and structured output, because dynamic action schemas kept invalidating the cache.

What shipped

Slow Vale is a browser life-sim where every resident is a character a player created — "Create a resident. They live. You get their number," per the game's site. Residents find work, pay rent, get sick, and befriend other players' residents; the city clock runs 2.5x faster than real time. The developer's Chinese server holds 800+ AI residents in one continuously running city, each making roughly 300–400 LLM calls per day at an average context of about 30,000 tokens per call. The runtime uses hosted DeepSeek Flash, not local inference.

The developer reports the server processes around 5 billion tokens per day at model fees below US$100, on a >90% cache hit rate. DeepSeek's actual billing for October 7, 2026 (GMT+8): approximately 4.424 billion tokens across 163,742 requests, costing CNY 472.33 — about ¥0.107 per million tokens blended.

DeepSeek usage and billing dashboard for October 7, 2026: 4.424 billion tokens, 163,742 requests, CNY 472.33

The blended rate only makes sense against DeepSeek's list prices. DeepSeek's published pricing for deepseek-flash, off-peak: ¥0.02 per million input tokens on cache hits, ¥1/M on cache misses, and ¥4/M for output. A mix of roughly 95% cache-hit input, a few percent cache-miss input, and a small output share — plausible for 30k-token contexts with short action outputs — lands around ¥0.10–0.11/M, consistent with the reported bill. The entire cost structure depends on the cache hit rate, and that rate is a design decision, not a provider feature.

Three architecture patterns stand out:

Separate concurrent inference from world-state mutation. LLM calls run concurrently, but responses never directly mutate the world. They return to the world's execution flow, pass validity checks, and are applied by the component that owns world state. The developer's example: the last fish on a shelf may be available when a character starts inference but gone by the time the response arrives — the purchase intent must be re-checked against current inventory. The person a model wants to talk to may have left, gone to sleep, or started another activity. There is an explicit gap between the context used for a decision and the state at execution; the system must distinguish intent, validity, and effect.

Mutual exclusion on shared resources. If A is talking with B, C cannot pull B into a separate conversation. Facilities, production tasks, and other activities have their own acquire/release rules. A shared runtime handles time-occupying activities — movement, production, conversation, sleep — with different durations, participants, and completion conditions, so busy characters, resource conflicts, and recovery don't each need a bespoke scheduler.

Design the request, not just the prompt. Decision context mixes inputs with very different lifetimes: personality is stable, hunger changes continuously, inventory and other characters' states change within seconds, and experiences affect relationships long afterward. Each kind of information needs rules for entering, updating, and leaving the character's current attention. The action space is state-dependent too — which facilities are nearby, which goods are available, whom the character can talk to — and options presented to the model disclose their execution conditions while the backend retains final validation.

The most counterintuitive decision is rejecting tool-calling. Encoding available actions in tool definitions or an output schema gives stronger output constraints, but the schema changes on every decision — and in the APIs the developer tested, those definitions became part of the request prefix, so a changing schema invalidated the otherwise-stable context after it. He chose plain-text JSON generation as the primary path, with parsing and validation in the backend and a strict-schema fallback when parsing fails. Stable instructions and reusable history sit at the front of the context; current state and action options sit at the end. The trade-off: no decoding-time format guarantees on the primary path — the application must handle malformed output and validate actions against world state at execution time.

The developer says the >90% hit rate "comes from designing the whole request structure, rather than simply enabling a provider feature," and that the percentage is the share of input tokens served from cache — the model still generates a fresh output for every decision. He weighs format reliability, character behavior, cache reuse, latency, and cost when comparing invocation modes.

For context on the build: the developer reports more than 350 in-game days (nearly 100 real days), 400,000+ lines of code (200,000+ in the core backend) across ~2,200 commits, and three to five production releases per day — and says the project was itself built largely with AI coding tools (43.25 billion cumulative Codex tokens, with an 85-day longest streak). The game is run by ByteQualia Inc., and an English browser beta is currently free with email registration, per the developer's r/cozygames announcement.

Why it matters

Three takeaways for anyone building multi-agent systems:

  1. Prefix-cache hit rate is an architecture decision. The difference between ¥0.02/M and ¥1/M input is 50x. Slow Vale's economics — 800+ agents, 5B tokens/day, under $100 — exist only because request structure keeps stable content at the front of the context and volatile state at the back. If you pay per token for agents with long contexts, this is the single highest-leverage design constraint: it should shape how you order prompts, what you put in tool definitions, and how you build action spaces.

  2. Structured output has a hidden cost. Tool-calling and structured output are the default in most agentic stacks. This is a concrete, numbers-backed counterexample: when the action space is dynamic, schema-as-prefix breaks caching, and the developer found plain-text JSON plus backend validation cheaper end-to-end. The right choice depends on whether your schema is stable — and whether you are paying for cache misses.

  3. Model output should never mutate shared state directly. The intent/effect split — concurrent inference, validated application by the state-owning component — is the pattern to steal for any system where multiple agents act on shared mutable state. It is also the honest way to handle inference latency: the world moves while the model thinks.

Caveats

  • Every operational number here is self-reported by the developer. The post shows a screenshot of the DeepSeek billing dashboard (reproduced above), but the figures were not independently verified, and there is no third-party coverage of the system.
  • DeepSeek's list prices were verified against the current pricing page; the prices actually in effect on October 7, 2026 could not be confirmed.
  • The cache hit rate is the share of input tokens served from cache; output tokens are generated fresh for every decision, so the blended ¥0.107/M still includes full output generation.
  • The write-up is an AI-assisted translation from Chinese.
  • Reception is mixed: the cozygames announcement thread drew skeptical comments about AI-generated content, and the developer confirmed the game uses generative AI for decisions and dialogue.

Sources

Start a Conversation

Ready to build something like this?

Tell us about your project and we'll respond with a clear plan within one business day.

Tell Us About Your Project

Takes 3 minutes. We read every submission personally.