mindcraft  by mindcraft-bots

LLM agent for Minecraft

Created 2 years ago
3,815 stars

Top 12.7% on SourcePulse

GitHubView on GitHub
Project Summary

Mindcraft enables Large Language Models (LLMs) to interact with and control Minecraft Java Edition, allowing AI agents to play the game autonomously. It targets developers and researchers interested in AI-driven game agents, offering capabilities for cooperative play, building, and item acquisition, with a strong emphasis on safety due to the LLM's code execution potential.

How It Works

Mindcraft leverages the Mineflayer library to interface with Minecraft servers. LLMs are integrated via API calls to various providers (OpenAI, Gemini, Anthropic, etc.) to generate actions, code, and natural language responses. The system uses configurable profiles to define agent behavior, LLM choices (chat, code, embedding), and prompts, facilitating customized AI agent development within the Minecraft environment.

Quick Start & Requirements

  • Install: Clone the repository, rename keys.example.json to keys.json and fill in API keys, run npm install.
  • Prerequisites: Minecraft Java Edition (v1.20.4 recommended), Node.js (v14+), and an API key for a supported LLM provider (OpenAI, Gemini, Anthropic, etc.) or Ollama installed locally. Python, pip, and optionally conda are needed for the tasks module.
  • Run: Start a Minecraft world, open to LAN on port 55916, then run node main.js. Tasks can be run via python tasks/run_task_file.py --task_path=tasks/example_tasks.json.
  • Links: FAQ, Discord Support, Video Tutorial (Note: This is a placeholder, actual link not provided in README).

Highlighted Details

  • Supports a wide range of LLM providers including OpenAI, Gemini, Anthropic, Mistral, and local Ollama.
  • Allows separate configuration for chat, code generation, and embedding models.
  • Includes a tasks module for automated bot performance evaluation and benchmarking.
  • Offers Docker support for enhanced security, especially when enabling code execution.

Maintenance & Community

The project is maintained by Kolby Nottingham and Max Robinson. Community support is available via Discord. The README mentions a "Contributor TODO" list, indicating active development areas.

Licensing & Compatibility

The project does not explicitly state a license in the provided README text. This requires further investigation for commercial use or closed-source integration.

Limitations & Caveats

The project warns that LLM-generated code can be a vulnerability to injection attacks, even with sandboxing. Enabling code writing (allow_insecure_coding) is strongly discouraged for public servers. Responsiveness to GitHub issues is noted as low, with Discord recommended for support. Connecting to unsupported Minecraft versions may require additional tools like viaproxy.

Health Check
Last Commit

1 day ago

Responsiveness

1 week

Pull Requests (30d)
34
Issues (30d)
6
Star History
103 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems").

LangBot by langbot-app

0.5%
13k
IM bot platform for the LLM era
Created 2 years ago
Updated 1 day ago
Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI), Didier Lopes Didier Lopes(Founder of OpenBB), and
5 more.

eliza by elizaOS

0.5%
17k
Agentic framework for autonomous agents
Created 1 year ago
Updated 17 hours ago
Starred by Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
29 more.

browser-use by browser-use

0.6%
70k
SDK for AI agent browser control
Created 10 months ago
Updated 1 day ago
Feedback? Help us improve.