Codex Client Control 的诞生源于一个简单的问题:大多数 AI 工具可以解释 Minecraft、谈论 Minecraft,甚至为 Minecraft 编写代码,但它们仍然无法真正操作正在运行的 Minecraft 客户端。
这个缺失的环节正是本模组旨在填补的空缺。它在 127.0.0.1 上提供了一个受令牌保护的本地 HTTP 和 WebSocket 接口,使同一台机器上的 AI 代理能够读取客户端状态,并将真实的游戏中操作发送回它应该控制的客户端。
该项目首先是为 Codex 而构建的。其名称并非偶然:它的存在是为了给 Codex 提供一种实用的方法,让 Codex 能够观察客户端正在执行的操作、检查当前的 UI,并执行实际的游戏内操作,而不是仅停留在纯文本推理层面。
在实践中,这意味着外部工具可以读取聊天内容、检查当前屏幕、查看准星指向的方块、查看容器内容、移动玩家、旋转视角、切换快捷栏槽位、在 GUI 字段中输入文本、点击小部件、截取屏幕截图或执行简短的动作序列。
选择 HTTP 是出于有意为之。它简单、易于检查、易于调试,也便于 AI 工具调用。如果代理能够发起正常的本地请求,它就可以控制客户端,而无需特殊的插件宿主或嵌入式脚本环境。
为什么存在
- 让 AI 工具操作真实的 Minecraft 客户端,而不仅仅是谈论它
- 通过本地 API 为 Codex 提供直接的操控路径
- 使客户端自动化变得易于检查、测试和扩展
- 将普通脚本、桌面工具与正在运行的游戏客户端连接起来
它可以控制的内容
- 玩家状态、聊天记录、准星目标、容器内容、当前屏幕和玩家列表
- 移动按键、视角控制、快捷栏选择、发送聊天和执行命令
- GUI 点击、滚动输入、按键输入、文本输入和小部件定位
- 屏幕截图、动作序列、托管动作和本地调试辅助功能
注意事项
- API 默认仅限本地访问并受令牌保护。
- 它控制的是你正在运行的客户端;不会登录第二个账号。
- 它首先是为 Codex 构建的,但任何能够调用该本地 API 的工具都可以使用它。
- 如果你需要非常繁重且持续的自动化任务,仓库中还包含一个可选的
lan-bot 子项目,专门用于此类工作负载。
Codex Client Control started from a simple problem: most AI tools can explain Minecraft, talk about Minecraft, and write code for Minecraft, but they still cannot actually operate a running Minecraft client.
That gap is what this mod is meant to close. It opens a token-protected local HTTP and WebSocket interface on 127.0.0.1, so an AI agent on the same machine can read client state and send real in-game actions back to the client it is supposed to control.
This project was built with Codex in mind first. The name is not accidental: it exists to give Codex a practical way to see what the client is doing, inspect the current UI, and perform actual gameplay-side operations instead of stopping at text-only reasoning.
In practice, that means an external tool can read chat, inspect the current screen, check the focused block, look at container contents, move the player, turn the camera, switch hotbar slots, type into GUI fields, click widgets, take screenshots, or run short action sequences.
HTTP was chosen on purpose. It is simple, easy to inspect, easy to debug, and easy for AI tools to call. If an agent can make a normal local request, it can control the client without needing a special plugin host or an embedded scripting environment.
Why It Exists
- To let AI tools operate a real Minecraft client instead of only talking about one
- To give Codex a straightforward control path through a local API
- To make client automation easy to inspect, test, and extend
- To bridge normal scripts, desktop tools, and AI agents with a running game client
What It Can Control
- Player state, chat history, crosshair target, container contents, current screen, and player list
- Movement keys, look control, hotbar selection, chat sending, and command execution
- GUI clicks, scroll input, key input, text entry, and widget targeting
- Screenshots, action sequences, managed actions, and local debug helpers
Notes
- The API is local-only by default and token-protected.
- It controls the client you are already running; it does not log in a second account.
- It was built for Codex first, but anything that can call the local API can use it.
- If you need very heavy continuous automation, the repository also includes an optional
lan-bot side project for that style of workload.
评论 0
登录后参与评分
还没有评论,来抢沙发吧