by zoyluoblue
Autonomous AI agent that plays Minecraft on its own — a server-side Fabric mod (MC 1.21.3) where a DeepSeek / OpenAI-compatible LLM drives a real player to mine, build, farm, fight and survive from natural-language commands. The LLM plans; deterministic tasks execute.
# Add to your Claude Code skills
git clone https://github.com/zoyluoblue/mc_aiplayerGuides for using ai agents skills like mc_aiplayer.
Last scanned: 6/25/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-25T07:41:07.154Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}LLM plans. Tasks execute. Bob survives.
AIBot spawns a real server-side player that perceives the world, back-chains your goal into a complete plan, and carries it out on its own — mining, fighting, farming, surviving.
AIBot is an open-source, autonomous AI agent for Minecraft. It's a server-side Fabric mod for Minecraft 1.21.3 in which a large language model (LLM) — DeepSeek by default, or any OpenAI-compatible model — drives a real in-game player that plays the game on its own.
Give it a goal in plain English or Chinese — "mine 3 diamonds", "build a house", "get me some food" — and AIBot perceives the world, plans the dependency-correct steps, and executes them autonomously: mining, crafting, smelting, building, farming, breeding, fighting, fishing, trading, and surviving on any randomly-generated, real-terrain world.
Unlike a hard-coded bot or a script, AIBot splits the brain in two: the LLM decides what to do, and a deterministic engine reliably handles how. It is not a client-side hack or cheat — it spawns a legitimate server-side fake player (in the Carpet-mod tradition) that obeys normal game rules.
Keywords: Minecraft AI · autonomous agent · LLM agent · AI that plays Minecraft · Fabric mod · server-side bot · natural-language game AI · DeepSeek / GPT-style tool-calling agent.
Most "AI in games" demos either let a language model hallucinate raw actions, or hard-code a rigid script. AIBot does neither — it splits the brain in two:
The result is an agent that is flexible enough to take orders in natural language, yet robust enough to actually finish the job.
/aibot brain say Bob mine 3 diamonds
AIBot back-chains the goal into a full plan and executes it step by step:
chop oak → crafting table → wooden pickaxe → mine stone → stone pickaxe
→ descend to Y16 → mine iron → smelt → iron pickaxe → gear up
→ staircase down to Y-59 → ⛏ mine diamonds ✓
You never hand it a step list. If a step fails, it re-plans. If it's drowning or under attack, it bails out and survives.
| 🗣️ Natural-language control | Plain English / Chinese commands, understood by a DeepSeek LLM wired to 62 tools. |
| 🎯 Goal back-chaining | One goal → a dependency-correct multi-step plan. No manual breakdown. |
| 🧩 LLM + deterministic hybrid | The model reasons; the engine executes. Flexible and reliable. |
| 🎒 9 one-shot goals | Diamonds, a full iron armor set + sword, a house, a base (table/furnace/chest), cooked food, crops→bread, ore, item stockpiles — each from one command. |
| 🍞 Five food paths | Hunt→cook, farm wheat→bread (waits for crops to grow), forage berries, infinite-water irrigation, cake, raid village fields — auto-picked by what's nearby. |
| 🛡️ Unified survival layer | Drowning, lava, suffocation, stuck, threats, dark-traps — handled every tick; digs shafts that seal out flooding water. |
| 🧍 Human-like behavior | Staircase mining (never straight down), no teleporting, no bunny-hopping. |
| ⛏️ Full survival loop | Mine, smelt, craft, fight, hunt, farm, breed, build, fish, trade, sleep, gear up. |
| 🔭 Ore & tree prospecting | Palette-level long-range scan locates resources and paths to them. |
| 🌍 Verified on real terrain | A multi-seed reliability harness (/aibot verify) proves goals on randomly-generated worlds — not just flat test arenas. |
| 🖥️ Client control panel | Alt + 0 opens Bob's panel: health, hunger, task, tokens, inventory, chat. |
One principle: the LLM plans, deterministic tasks execute.
flowchart TB
P["🎮 Player — natural language · /aibot · Bob panel"] --> B
subgraph COG["Cognition & Decision"]
B["🧠 Brain · DeepSeek LLM<br/>62 tools"] --> G["🎯 GoalPlanner<br/>backward-chaining"]
G --> E["⚙️ GoalExecutor<br/>step state machine"]
end
E --> T["🔧 Task FSM ×36<br/>mine · smelt · craft · combat · farm · build …"]
T --> A["🛠️ Action primitives + A* pathfinding"]
A --> W["🌍 Minecraft world · Fabric 1.21.3"]
W -->|perception| B
S["🛡️ Safety net · every tick<br/>NavSafety → Stuck → Danger → Idle"] -. guards .-> T
| Component | Version |
|---|---|
| Minecraft | 1.21.3 |
| Fabric Loader | 0.18.4+ |
| Fabric API | 0.114.1+1.21.3 |
| Yarn Mappings | 1.21.3+build.2 |
| Java | 21 |
git clone https://github.com/zoyluoblue/mc_aiplayer.git
cd mc_aiplayer
./gradlew build # build the mod
./gradlew runServer # dev server
./gradlew runClient # dev client
Provide your DeepSeek API key via environment variable (recommended):
export DEEPSEEK_API_KEY="sk-your-key"
On first run the mod writes aibot.json to the Fabric config directory. You can also set the key, base URL and model there:
{
"deepseek": { "baseUrl": "https://api.deepseek.com", "model": "deepseek-chat" }
}
Any OpenAI-compatible endpoint works — just point
baseUrlat your provider.
/aibot spawn Bob # spawn an AI player
/aibot list # list active bots
/aibot brain say Bob mine 3 diamonds # natural-language goal
/aibot task assign Bob mine minecraft:stone 16
/aibot task status Bob # inspect / abort a task
/aibot brain status Bob
Press Alt + 0 in-game to open the Bob control panel — track health, hunger, task, brain state, token usage and inventory, and send natural-language messages directly.
| Layer | Package | Role |
|---|---|---|
| Brain | brain |
DeepSeek tool-calling loop; turns intent into goals & actions |
| Goal engine | goal |
Goal → GoalPlanner (back-chaining) → GoalExecutor (FSM) |
| Tasks | task |
36 self-contained state machines, each with its own watchdog |
| Action / Pathfinding | action · pathfinding |
BlockMiner, DigNav, ActionPack; A* with stand-ability checks |
| Knowledge | craft · mining |
recipes, mining/smelt chains, tool tiers, ore & tree prospector |
| Safety net | task · coordination |
BotTickCoordinator: NavSafety → Stuck → Danger → Goal → Idle |
| Entity | entity |
AIPlayerEntity — a real server-side fake player |
src/main/java/io/github/zoyluo/aibot
├── action/ # low-level: move, mine, interact, inventory, build
├── brain/ # LLM requests, tool registry, decision coordination
├── command/ # /aibot commands
├── coordination/ # multi-bot task board & idle coordination
├── craft/ # recipes & crafting helpers
├── entity/ # the AI player entity
├── goal/ # declarative goals, planner, executor
├── mining/ # ore scan & long-range prospector
├── pathfinding/ # A* pathfinding & danger checks
├── task/ # deterministic task state machines + safety net
└── … # log · memory · network · observe · persist · mixin
Java 21 · Fabric (Loader 0.18.4, API 0.114.1+1.21.3) · Yarn 1.21.3+build.2 · Gradle · DeepSeek (OpenAI-compatible API).
/aibot verify · multi-seed success-rate measurementtool_dispatch), long-range navigationCan an AI play Minecraft on its own? Yes. AIBot is an autonomous AI agent that plays Minecraft without human input — you give one natural-language goal and it mines, builds, farms, fights, and survives by itself on real-terrain worlds.
How does a large language model (LLM) control a Minecraft bot? The LLM only decides intent — it
mc_aiplayer is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by zoyluoblue. Autonomous AI agent that plays Minecraft on its own — a server-side Fabric mod (MC 1.21.3) where a DeepSeek / OpenAI-compatible LLM drives a real player to mine, build, farm, fight and survive from natural-language commands. The LLM plans; deterministic tasks execute. It has 211 GitHub stars.
Yes. mc_aiplayer passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/zoyluoblue/mc_aiplayer" and add it to your Claude Code skills directory (see the Installation section above).
mc_aiplayer is primarily written in Java. It is open-source under zoyluoblue on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mc_aiplayer against similar tools.
No comments yet. Be the first to share your thoughts!