mindcraft  by kolbytn

LLM agent for Minecraft

created 1 year ago
3,664 stars

Top 13.5% 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 month ago

Responsiveness

1 week

Pull Requests (30d)
3
Issues (30d)
8
Star History
381 stars in the last 90 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
1 more.

promptable by cfortuner

0%
2k
TS/JS library for building full-stack AI apps
created 2 years ago
updated 2 years ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Taranjeet Singh Taranjeet Singh(Cofounder of Mem0), and
1 more.

fragments by e2b-dev

0.6%
6k
Next.js template for AI-generated apps
created 1 year ago
updated 1 week ago
Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Michael Han Michael Han(Cofounder of Unsloth), and
15 more.

open-interpreter by openinterpreter

0.1%
60k
Natural language interface for computers
created 2 years ago
updated 4 days ago
Feedback? Help us improve.