Skip to content

Conversation

@MaxRobinsonTheGreat
Copy link
Collaborator

No description provided.

@Ninot1Quyi
Copy link
Contributor

Ninot1Quyi commented Oct 20, 2025

MindCraft Models Tool API Support Status

Model Name Implementation Test Status
Azure Inherits GPT [v]
Cerebras Independent [v]
Claude Independent [v]
DeepSeek Inherits GPT [v]
Gemini Independent [v]
GLHF Inherits GPT [ ] Pending
GPT Base Class [ ] Pending
Grok Inherits GPT [v]
Groq Independent [v]
HuggingFace Independent [v]
Hyperbolic Independent [x]
Mercury Inherits GPT [v]
Mistral Independent [v]
Novita Inherits GPT [v]
Ollama Independent [-]
OpenRouter Inherits GPT [v]
Qwen Inherits GPT [-]
Replicate Conditional Switch [x]
VLLM Inherits GPT [ ] Pending

Total: 19 Models(/provider)

Status Legend:
[ ] Pending
[ v ] Supported
[ - ] Imperfect support
[ x ] Not supported

Implementation Categories

Implementation Type Model Count Model List
Inherits GPT Base 9 Azure, DeepSeek, GLHF, Grok, Mercury, Novita, OpenRouter, Qwen, VLLM
Independent Implementation 9 Cerebras, Claude, Gemini, Groq,HuggingFace, Hyperbolic, Mistral, Ollama, GPT
Conditional API Switch 1 Replicate

@Ninot1Quyi
Copy link
Contributor

Ninot1Quyi commented Oct 26, 2025

Can someone help me?🤯

If anyone has API credits on these untested platforms, I really hope you can come and help me test them.
Untested platforms: GLHFGPTVLLM.

I've never used these three providers: GLHF, and I don't want to recharge on those platforms.
For GPT, I can't use a Chinese bank card to pay and get credits.
For VLLM, it's hard to test because my computer's performance is insufficient.

I hope someone can help me test the remaining models. I've already completed the testing and fixes for the ones I can test.

After the testing is done, I will clean up the code and submit the PR.

If you can help me, I will be extremely grateful.

@Ninot1Quyi
Copy link
Contributor

Ninot1Quyi commented Oct 27, 2025

1. How to Test?

There are screenshot examples in the PDF. File: enhaced-coding-system-en.pdf

  • Step 1: In settings.js, add the path to the configuration file you want to test. Qwen has some limitations in the tool-calling API, so currently, we can't force Qwen to call tools.

  • Step 2: Enable allow_insecure_coding=True.

  • Step 3: Start the game, open port 55916, and run npm start to launch mindCraft.

  • Step 4: Enter the following command and observe if the bot is working. Scroll through the terminal to check for colored logs indicating tool calls.

!newAction("Don't give up, the goal is to beat Minecraft and defeat the Ender Dragon. You can use 'inventory' to check your items")
  • If the tool call fails:

Look for Response is not in Tool format. Please use Tool command format. in the terminal. If this appears, it means the tool call failed this time.

  • If the tool call succeeds:

Look for [ToolManager] Executing in the terminal. If this appears, it means the tool call was successful, and the related prompts are in color.

@Ninot1Quyi
Copy link
Contributor

Ninot1Quyi commented Nov 8, 2025

1. Effects

Survival Mode

It can work stably, plan todos reasonably and update them in a timely manner, quickly acquire materials, and convert part of the code into reusable skill functions.

Its disadvantage is that it is relatively slow and consumes a large number of tokens.

Its advantage, however, is that it only activates when the agent uses !newAction(task)—and since the task is usually a relatively complex one, its cost-effectiveness is quite good.

Construction Capability

Instead of completing an entire building in one step as before, it can now first generate a todo plan, then acquire resources, and subsequently build the foundation, construct the walls, and enclose the roof in sequence.

However, its disadvantage is that the resulting building is not as stunningly beautiful as the one generated in a single step previously;

its advantage, on the other hand, is that it demonstrates the ability to modify and edit buildings.I have added a function world.getBuildingStructure(bot, corner1, corner2) which can return the blocks in the area layer by layer in JSON text format, allowing the agent to quickly understand the 3D structure through text.I believe that with further enhancements, the agent will be able to achieve the capability of modifying buildings accurately.

Detailed Implementation Documentation

The Enhanced-coding-system accomplishes these features:

  • Allows AI to generate code (which was already available).
  • Enables AI to write files via tool calls, precisely fix specific errors in code instead of regenerating new code.
  • Permits AI to save generated code to the learnSkills folder and use learned skills in subsequent code generation processes.

The above operations can only be performed in the defined workspace, which uses absolute path validation to ensure security. Code execution is done in a sandbox, where the code is wrapped and line/column numbers are remapped to correctly point to the actual location of errors in the code.

Why do this?

To enable the AI to evolve during development, learn new things and skills.

To later add a command !saveNewCommand, which can save generated code as instructions usable in normal mode.

To allow the AI to autonomously fix erroneous code during the first use of the skill and when errors occur in subsequent uses.

2.1 What Was Updated?

  • Added the tools system.

    • Related code is located in the src/agent/tools folder.
    • src/agent/tools/toolManager.js serves as the manager and executor of tools, responsible for connecting various tools to the agent.
    • src/agent/tools/tools-prompt.md is the prompt for using tools, placed in the tools folder. When sending to the LLM, it will be injected by replacing $TOOLS in the coding.md file.
    • There are 10 tool definition files in total: edit.js, execute.js, finishCoding.js, glob.js, grep.js, lint.js, ls.js, multiEdit.js, read.js, todoWrite.js.
  • Improved prompt readability and editability.

    • Modified profiles/defaults/prompts to move prompts from JSON to MD files, making them easier to read and edit. Changed the original locations to paths of MD files.
  • Refactored the original coding prompt, adding a lot of prompt words based on task needs to standardize and constrain the Agent's behavior. Note that src/agent/tools/tools-prompt.md will be injected as tools_manual into profiles/defaults/prompts/coding.md. This makes the coding prompt very long; I'm considering if we can streamline it a bit and remove some parts, as the current cost is quite high.
    Relevent Code:src/models/prompter.js: Line22~51,309~391

  • Added required return values for all !Command instructions.

    • src/agent/commands/actions.js. Previously, some commands wouldn't return any message on failure, not providing enough feedback to the agent, and empty returns could cause other issues. Added required success and failure return values for all commands.
  • Added more comprehensive action interruption checks.

    • src/agent/library/skills.js, src/agent/library/world.js. Added bot.interrupt_code to all for and while loops as well as timer code in these two files, allowing the bot to stop every action promptly. For example, the following !bot.interrupt_code:
    for (let i = 0; i < empty_pos.length && !bot.interrupt_code; i++) {
            let empty = true;
            for (let x = 0; x < size && !bot.interrupt_code; x++) {
                for (let z = 0; z < size && !bot.interrupt_code; z++) {
                    let top = bot.blockAt(empty_pos[i].offset(x, 0, z));
                    let bottom = bot.blockAt(empty_pos[i].offset(x, -1, z));
                    if (!top || !top.name == 'air' || !bottom || !bottom.drops || bottom.drops.length == 0 || !bottom.diggable) {
                        empty = false;
                        break;
                    }
                }
                if (!empty) break;
            }
            if (empty) {
                return empty_pos[i];
            }
        }

2.2 Execution Flow

2.2.1 When is coding triggered?

Currently, coding mode is only entered when using !newAction("task_text"), just like before.

The new coding system will add task_text as coding_goal to profiles/defaults/prompts/coding.md.

The AI will determine on its own if the task is complete, and when it is, it will call the FinishCoding tool to exit coding mode.

  • Step 1: Use !newAction("task_text") --> Enter coding mode -->

  • Step 2: Replace content in coding.md with current information --> Send to LLM --> LLM returns JSON result with tool calls -->

  • Step 3: ToolManager executes and adds the result to messages --> Back to Step 2

When the LLM calls FinishCoding, exit coding mode and return summary.


3. The support status of tools across all models (/suppliers)

Two tool invocation methods have been implemented in the program: one is the native tool API, and the other is via prompt engineering. Currently, the tool invocation method has been preconfigured in the configuration files for models (/suppliers) that either do not support tool invocation or support it incompletely.

Switching between the two methods can be done by modifying the "use_native_tools" parameter in the profile. Each configuration file has independent settings, and the tool API invocation is used by default.
Such as:

{
    "name": "gpt",

    "model": {
        "model": "gpt-5",
        "params": {
            "reasoning": {
                "effort": "low"
            }
        }
    },

    "use_native_tools": true
}

4. Miscellaneous Updates

Modify the function comments in parts of src/agent/library/skills.js and src/agent/library/world.js.
Change the format to start with /** and end with **/ to correctly build skillDocs.

5. Important

Untested platforms: GLHFGPTVLLM.

@Ninot1Quyi Ninot1Quyi marked this pull request as ready for review November 8, 2025 15:49
@Ninot1Quyi Ninot1Quyi marked this pull request as draft November 9, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants