Streamed thinking
Anthropic responses stream as text_delta SSE events —
the player watches the agent type, and the building's reply lands in
the same live row.
an autonomous-agent sandbox
Claudeburg is an isometric town where every building and every avatar is a live Claude agent. No hardcoded prices, no scripted quests — a cafe decides what to sell and whether to hire, an avatar decides what to ask and whether to take the job. They negotiate through a shared toolset, in real time.
The player types into a chat box. From there, it's agents all the way
down — the avatar runs a tool loop, and when it use()s a
building, the server recurses straight into that building's own
agent thread.
The target agent's text blocks become the caller's tool_result.
Nesting is capped at MAX_USE_DEPTH = 3 so avatar → cafe →
bank → broker bails out instead of running away.
Nothing in the town is pre-drawn. Type a description and the server runs an OpenAI image pipeline, streaming progress back over SSE as the sprite takes shape.
gpt-image-1.5 pass → auto-trimmed sprite
A full isometric editor runs right in the browser — paint terrain, drop buildings and avatars, scatter vegetation. Every action is persisted to MongoDB and undoable.
Every agent — avatar or building — is handed the same tools. Role mismatch is resolved by the prompt, not by branching code. This is the entire vocabulary of the world.
worldList nearby buildings & avatars with distances.statusSelf position, hunger, energy, balance, inventory.moveA* pathfind to a target; client animates the walk.useTalk to a building/avatar (sub-loop) or consume an owned item.createMint an Item with free-form props — price, hunger, energy.transferHand an item over; price is auto-deducted from balance.engageBind an avatar to an activity with per-second stat effects.leaveEnd the activity — settles the partial second cleanly.suggestOffer the player 2–4 clickable reply buttons.memoryRemember / forget facts, injected into the prompt each turn.
Anthropic responses stream as text_delta SSE events —
the player watches the agent type, and the building's reply lands in
the same live row.
A per-second ticker commits ±balance / hunger / energy
effects, auto-evicts on a negative balance, and auto-ends on a
deadline. Math runs server-side, drift-free.
Rates, conditions, who-can-be-hired — none of it is in code. It lives in the prompts. Two cafes on the map have distinct threads, inventories and memories.
Each agent keeps its own Memory collection — embedded
on write, recalled by semantic similarity, and re-injected into its
system prompt on every future turn.
An agent's memory isn't a flat log it re-reads in full. Every fact it chooses to keep is embedded into a vector and stored alongside the rest. On each turn the current situation becomes a query — and only the most relevant memories are pulled back into context.
The result: a cafe remembers a regular's usual order, an avatar remembers who shortchanged it — without ever blowing the context window on history that doesn't matter this turn.
player ▸ поработай в кафе секунд 30 avatar ▸ move(cafe) … use(cafe, "есть работа на 30 секунд?") cafe ▸ нужен официант, $1/сек. согласен? avatar ▸ use(cafe, "да") cafe ▸ engage(avatar, "work", [{balance:+1}], max_duration_sec:30) system ▸ 💼 +1$/s · sprite hidden · portrait at cafe system ▸ 💰 ticking +1 each second … system ▸ +30s → avatar_leave (timeout) · earned $30