惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
小众软件
小众软件
博客园 - 【当耐特】
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
H
Help Net Security
博客园_首页
P
Proofpoint News Feed
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
N
Netflix TechBlog - Medium
爱范儿
爱范儿
MyScale Blog
MyScale Blog
Blog — PlanetScale
Blog — PlanetScale
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Giving OpenClaw a Body: How I Turned an AI Agent into a M...
Prema Ananda · 2026-04-24 · via DEV Community
Cover image for Giving OpenClaw a Body: How I Turned an AI Agent into a Minecraft Survival Expert ⛏️🤖

Prema Ananda

OpenClaw Challenge Submission 🦞

This is a submission for the OpenClaw Challenge.

What I Built

I built ClawCraft-bot — a bridge application that gives OpenClaw an avatar inside a Minecraft world.

Instead of just chatting or processing text, OpenClaw can now perceive a three-dimensional environment, gather resources, craft tools, navigate complex terrain, and even defend players against hostile mobs in real time. The bot acts as an independent agent running through a local HTTP API, translating OpenClaw's high-level reasoning into precise in-game actions.

How I Used OpenClaw

OpenClaw serves as the "brain" of the entire operation, making strategic decisions, while ClawCraft-bot acts as the "nervous system."

The Tech Stack & Environment

  • Launcher: SKLauncher 3.2.18 (Offline mode)
  • Minecraft Version: Java Edition 1.21.11
  • Bridge API: Node.js + Express.js
  • Bot Engine: Mineflayer + pathfinder, pvp, collectblock

The system runs on a local Minecraft world. One important detail: after launching the game, you need to open the world to the network (Open to LAN) on port 25565 (default) so the Bridge API can connect the bot to your game session.

Integration Architecture

I implemented a Bridge API architecture that allows OpenClaw to interact with the world through:

  1. Read-only Observation: OpenClaw polls /status, /inventory, and /nearby to analyze the environment.
  2. Action Queueing: Complex commands (e.g., "collect 3 cherry logs" or "craft a stone sword") are placed in a queue.
  3. Job Polling: Since in-game actions take time, OpenClaw receives a jobId and tracks progress until completion, preventing command conflicts.

Setup

1. Launch Minecraft

  1. Use SKLauncher (or any other launcher) to start Minecraft Java Edition 1.21.11.
  2. Load a world and select "Open to LAN" on port 25565.

2. Install ClawCraft-bot

git clone https://github.com/premananda108/ClawCraft-bot.git
cd ClawCraft-bot
npm install
# Edit .env if needed (specify the port from MC)
npm start

Enter fullscreen mode Exit fullscreen mode

3. Configure OpenClaw

  1. Install OpenClaw by following its official documentation.
  2. Create a new Skill in OpenClaw. As the skill instructions, simply provide your agent with the contents of the SKILL.md file from this repository. It contains all the necessary behavior rules and API descriptions for the AI.

Setup name
Create skill
First time in game
Message in chat

Intelligence & LLM Efficiency

One of the key features of the project is the use of a detailed SKILL.md file. This allowed me to:

  • Lower model requirements: Thanks to clear instructions and API descriptions in the SKILL file, the bot can be controlled even by inexpensive or local LLMs.
  • Optimize costs: Minecraft involves a very high number of "check-act" cycles. Using local models (via Ollama or similar tools) lets you run the bot for hours without burning through expensive API tokens.

Demo

ClawBot exploring the world
ClawBot inventory and status
Mining wood
Check attack modeon

GitHub logo premananda108 / ClawCraft-bot

OpenClaw-powered Minecraft bot that mines, crafts, navigates, and fights — all driven by LLM decisions through a local HTTP API.

ClawCraft-bot

Secure Minecraft bot with a high-level API for control via OpenClaw.

Quick Start

# 1. Installation
npm install

# 2. Setup (copy and edit)
cp .env.example .env
# Edit .env: MC_HOST, MC_PORT, MC_USERNAME

# 3. Run
npm start

Enter fullscreen mode Exit fullscreen mode

API

Bridge API is available at http://127.0.0.1:3001 (default).

Read Data (GET)






































Endpoint Description
/health Bridge status (always available)
/status Health, food, position, gameMode
/position Bot coordinates
/inventory Items in inventory
/nearby?radius=32 Nearby entities (default radius 32)
/scan-blocks?radius=8 Scan nearby blocks (default radius 8)
/findblock?name=oak_log&maxDistance=32 Find specific block by name

Actions (POST)









































Endpoint Body Description
/actions/goto { x, y, z } Navigate to coordinates
/actions/follow { player, distance? } Follow a player
/actions/chat { message } Send message to global chat
/actions/whisper { player, message } Send private message
/actions/stop Stop everything (tasks and movement)
/actions/dig
{ name } or { x, y, z }
Dig block (by name or coordinates)





What I Learned

Building a bridge between an LLM and a real-time game engine turned out to be full of hidden pitfalls:

  • Visualization traps: I originally planned to use prismarine-viewer to stream a video feed. However, it turned out to work incorrectly with Minecraft Java 1.21.11. In the end, I decided to drop visualization from the final build in favor of control stability.
  • LLMs need strict feedback loops: Initially, the AI would try to eat food while holding a pickaxe. I had to explicitly write into SKILL.md that a tool must be put away before eating. Designing an API for AI is a balancing act between flexibility and hard rules.
  • Lifecycle chaos: Minecraft bots sometimes die. I learned that handling automatic respawns requires strict event decoupling — otherwise the system starts injecting multiple pathfinding plugins into the same bot instance, leading to massive memory leaks.

ClawCon Michigan

Unfortunately, I wasn't able to attend ClawCon Michigan this time around, but it's wonderful to see the OpenClaw community growing and building incredible things!