Find a file
2024-04-05 23:44:22 +02:00
bots smelting command, minor cleanup 2024-03-05 12:50:13 -08:00
patches made placeblock pathfinder better? 2024-01-23 17:58:49 -06:00
src improved error msg 2024-04-05 23:44:22 +02:00
.gitignore refactored prompts/examples/memory/initialization 2024-02-25 14:13:32 -06:00
andy.json changed model, removed movement, imrove gemini 2024-03-28 20:03:29 -05:00
LICENSE Create LICENSE 2024-02-16 12:03:07 -06:00
main.js startup message, disable coding 2024-02-25 14:21:44 -06:00
ollama-config.json improved error msg 2024-04-05 23:44:22 +02:00
package.json updated mineflayer and minecraft version 2024-03-29 12:20:28 -05:00
pollux.json refactored prompts/examples/memory/initialization 2024-02-25 14:13:32 -06:00
README.md added ollama 2024-04-05 23:41:28 +02:00
settings.json updated mineflayer and minecraft version 2024-03-29 12:20:28 -05:00

Mindcraft 🧠⛏️

Crafting minds for Minecraft with Language Models and Mineflayer!

‼️Warning‼️

This project allows an AI model to write/execute code on your computer that may be insecure, dangerous, and vulnerable to injection attacks on public servers. Code writing is disabled by default, you can enable it by setting allow_insecure_coding to true in settings.json. Enable only on local or private servers, never on public servers. Ye be warned.

Requirements

Installation

Add one of these environment variables:

  • OPENAI_API_KEY (and optionally OPENAI_ORG_ID)
  • GEMINI_API_KEY
  • ANTHROPIC_API_KEY (and optionally OPENAI_API_KEY for embeddings. not necessary, but without embeddings performance will suffer)

You can also use Ollama instead. To install the models used by default (generation and embedding), execute the following script: ollama pull mistral && ollama pull nomic-embed-text

Clone/Download this repository

Run npm install

Install the minecraft version specified in settings.json, currently supports up to 1.20.2

Run

Start a minecraft world and open it to LAN on localhost port 55916

Run node main.js

You can configure the agent's name, model, and prompts in their profile like andy.json.

You can configure ollama in ollama-config.json.

You can configure project details in settings.json. Here is an example settings for connecting to a non-local server:

{
    "minecraft_version": "1.20.1",
    "host": "111.222.333.444",
    "port": 55920,
    "auth": "microsoft",
    "allow_insecure_coding": false
}

Patches

Some of the node modules that we depend on have bugs in them. To add a patch, change your local node module file and run npx patch-package [package-name]