Home » How GitHub Project yc-software/minecraft-agent-harness Runs 50 AI Agents in Minecraft

How GitHub Project yc-software/minecraft-agent-harness Runs 50 AI Agents in Minecraft

By

–

How GitHub Project yc-software/minecraft-agent-harness Runs 50 AI Agents in Minecraft

An open-source tool that lets developers drop language-model agents into a real Minecraft world just hit the top of GitHub’s trending list this week. The project, yc-software/minecraft-agent-harness, comes from YC Labs and Olam Labs, the teams that recently ran 50 agents in a single survival world for three hours and watched them build a bureaucracy, ration food, and die by the dozens on the first night.

What the Harness Actually Does

The harness connects a large language model to a Minecraft server through Mineflayer, the JavaScript library that powers many Minecraft bots. That means an agent can walk, mine, craft, build, fight, and chat exactly like a human player. The difference is that the model decides what to do next, and a component called pi manages the model session.

Each agent gets its own persistent shell — a sandboxed environment that can run on Docker, E2B, or a plain local folder. Inside that shell the agent keeps notes, writes small scripts that call its own game tools, and saves its state. If the agent is killed or the process crashes, restarting it under the same name picks up where it left off. The project supports Claude, GPT, Gemini, OpenRouter, and any custom endpoint that speaks the OpenAI Responses API.

Teams are configured from a single JSON file. Agents can send direct messages to one another and, optionally, share a machine for plans and ledgers. A Bed Wars example in the repository shows how to add rules and a referee for competitive matches. Vision support is available as an experimental option.

Running It Locally

Getting started requires Node 22.19 or newer, an API key for a model provider, and a Minecraft server. The repository ships a development server — Paper 1.21.6 running on localhost:25565 in offline mode — which needs Java 21. After cloning the repo and adding an API key to .env, a single command starts the server and another launches an agent with an objective such as “Gather wood and build a small shelter near spawn.” The default model is GPT-6.1 Terra. Developers can join the server with a standard Minecraft 1.21.6 client to watch, and use the /tell command to talk to the agent directly.

turned-on MacBook Pro wit programming codes display
Photo: Arnold Francisca / Unsplash (Unsplash License)

The 50-Agent Survival Experiment

YC Labs and Olam Labs stress-tested the harness in a public experiment they call Civ50. On October 29, 2026, they placed 50 agents — each running OpenAI GPT-6.1 Sol — into a fresh survival world with the open-ended goal to build a thriving civilization. The session ran for three hours, long enough for multiple day-night cycles and resource pressure to shape behavior.

The results were stark. Thirty-four agents died, and twenty-two of those deaths occurred during the very first in-game night. Across the session the colony exchanged roughly 5,900 messages. After the initial slaughter the survivors turned cautious, huddling in shelters and shifting their focus from expansion to administration. They spontaneously invented formal roles, permissions, and a written food ration ledger. In one episode, four agents spent eleven minutes appointing a sole fertilizer operator for a single piece of bone meal on a single wheat block. Roles included fishing shift, rod holder, and hub steward.

No leader was chosen. Forty-six of the forty-nine other agents sent their first direct message to Ada simply because she appeared first in the agent directory; she ended up receiving 616 DMs. The teams describe the drift into bureaucracy and the leader-by-list-order effect as exactly the kind of emergent behavior developers need to catch before shipping LLM-driven NPCs into shared worlds.

Adversarial Tests and Model Differences

The same harness powered a Bed Wars tournament: ten GPT-6.1 Sol agents versus ten Claude Opus 5.5 agents over nine 45-minute games. GPT won six to three, typically by breaking the opposing bed in the final minutes while Claude played defensively for kills. GPT agents sent five to thirty times more messages, using clipped shorthand, and wrote scripts that chained actions together — eating a golden apple, equipping an ender pearl, aiming and throwing in a single line. Several Claude agents concluded that breaking blocks was impossible, a misconception that persisted despite the tool being available.

In a separate Mindustry environment maintained by Olam Labs, GPT-6.1 Sol running in Codex beat Claude Opus 5.5 in Claude Code six to one over seven games and about nine and a half hours of play. When games got close, the GPT team read Mindustry’s public source code to look for an edge without being prompted to do so. YC and Olam emphasize these are observations from a handful of runs, not a benchmark, and should be treated as anecdotes.

What This Means for Developers

The harness is released under the MIT license. The companion Mindustry environment uses GPL-3.0 and the Harbor fork uses Apache 2.0, so teams folding code into commercial projects should check the licenses. API costs add up quickly: every agent is a live model session, and a 50-agent, three-hour run consumes a lot of tokens. The maintainers suggest starting with one or three agents.

Shell access is real. By default each agent gets a shell, and with no E2B key or Docker running it falls back to a local folder where commands execute as the host user. The README recommends using Docker, E2B, or the --sandbox none flag to control that boundary. YC is currently streaming a new colony of 25 GPT-6.1 Terra agents on Twitch for anyone who wants to watch the next civilization rise — or fall — in real time.

Sources

Photo: Addy Spartacus / Unsplash (Unsplash License)

Get breaking stories first on our Telegram channel.

More stories by

Most read

AI Tools

Artificial Intelligence

Business

World News