
Octomind 发布开源 AI 编码代理运行时,支持任意模型与 MCP
来源标题:Octomind – open-source AI harness that saves your tokens, static rust
Octomind 是一个开源的 CLI 优先 AI 编码代理运行时,通过 MCP 工具让 LLM 直接读写文件、执行 shell、搜索代码和派发子代理。它以单一二进制运行,支持任意模型,可交互使用、通过管道接入 CI 脚本、以后台守护进程或 WebSocket 方式运行。项目以静态 Rust 构建,主打在你离开后仍能持续自主工作。
以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。
能通过管道输入运行、能按计划调度、能嵌入其他系统。一个二进制文件,适配任意模型,原生支持 MCP——为自主工作而设计,而不只是聊天。 网站 · 文档 · Tap Registry · 基准测试 · Issues
Octomind 是一个以 CLI 为主的 AI 编程 agent 运行时。它通过 MCP 工具让 LLM 真正访问你的仓库——读写文件、执行 shell、搜索代码、委派给子 agent。同一套会话引擎可以交互式工作,也可以通过 stdin 管道输入,还可以作为后台守护进程、通过 WebSocket,或作为 ACP 子 agent 运行在另一个 agent 的栈里。
交互式
octomind run developer:general
管道——CI、脚本、自动化
echo "Explain the auth module" | octomind run developer:general --format plain
守护进程——保持运行,从另一个终端与它对话
echo "watch the build" | octomind run --name watcher --daemon --format jsonl octomind send --name watcher "run the test suite"
Why Octomind?
大多数编程 agent 都假设有人在盯着屏幕。Octomind 是为那些你离开之后仍在继续的工作而构建的。
curl -fsSL https://raw.githubusercontent.com/muvon/octomind/master/install.sh | bash
在 Windows 上,使用 PowerShell:
irm https://raw.githubusercontent.com/muvon/octomind/master/install.ps1 | iex
在 macOS 上,也可以用 Homebrew 安装:
brew install muvon/tap/octomind
- 获取模型访问权限。最快的路径是 Octomind Cloud,它包含模型且无需配置:
octomind login
更想用自己的 provider key?跳过登录,导出一个即可(也支持 OPENAI_API_KEY、ANTHROPIC_API_KEY、DEEPSEEK_API_KEY),然后参照 Model access 将配置指向它:
export OPENROUTER_API_KEY="your_key"
- 在你的项目中运行一个专家 agent:
cd ~/your/project octomind run developer:general
你现在进入了一个与 agent 的会话,它能读取你的代码、运行命令并编辑文件。界面是一个纯文本行提示符,带 markdown 渲染——没有需要学习的 TUI,因此可以通过 SSH、在 tmux 中以及在 CI 日志里使用。第一次运行某个专家 agent 时,它可能会安装其工具并要求提供凭据。
developer:general 来自默认 tap muvon/tap,而不是你的本地配置。直接运行 octomind run 会启动配置中的默认角色 assistant:concierge。
试试录制的 bug 修复演示:两个失败的测试、一个 agent 修复,以及一次独立的测试重跑。
在 octobench 上针对 25 个任务测得,这些任务取自 Python、PHP、Rust、C++ 和 JavaScript 中已合并的 pull request。每个 agent 都在修复前的仓库中工作;由合并修复中的留出测试决定通过或失败。这些是 2026 年 7 月 30 日发布的结果,并非对本次检出代码的测量。
在你的仓库中放一个 .agents/guardrails.toml。运行时会确定性地强制执行它,无需编译代码,也无需安装插件。
调用前拒绝——在一类调用执行前将其拦截
[[guard]] match = "shell(command=^rm\s+-rf?)" message = "rm -rf blocked."
条件规则——仅当 agent 本次会话运行过 git status 后才触发
[[guard]] match = "shell(command=git push)" when = ["+shell(command=git status)"] message = "Review changes before pushing."
Layer When it runs What it does Guards 在工具调用之前 按能力、参数正则和会话历史进行拒绝。匹配时返回拒绝,而不是执行调用。 Hooks 在工具结果之后 非零退出会把 stdout 注入 agent 的收件箱——lint 和格式化失败会自动变成修正,无需重启本轮。 Validators 在一轮之后 agent 在下一轮读取的脚本。这在自主循环中取代了「批准此更改?」之类的提示。
Hook 和 validator 脚本示例:Guardrails 指南。
同一套会话引擎,按你的工作流需要以任何方式暴露。
需要机器可读的结果?传入 --schema schema.json 将最终响应约束为某个 JSON Schema(需要支持结构化输出的模型)。参见 Structured output。
Feature What you get Learn more Specialists & taps 打包好的 agent,包含模型、提示词、MCP 服务器和权限;首次使用时安装其工具依赖 Tap system Roles 按角色配置模型、温度、系统提示词、工具 Roles Workflows 多步流水线,每一步都有自己的模型和工具集 Workflows MCP client stdio 和 Streamable HTTP 服务器,支持 OAuth;可在会话中途启用/禁用服务器 MCP tools Intent-driven context Skills 和能力按需激活,保持上下文精简 Skills Local project tools .agents/tools/ 中的可执行脚本会自动注册为工具 Local tools Supervisor & learning 外部规划与门控;基于文件的学习记录 Supervisor, Learning Sandbox --sandbox 将文件系统写入限制在工作目录内 Config reference Token efficiency 缓存感知的计量与压缩 Token efficiency
Specialists
octomind run developer:general # 通用开发,语言 skills 自动激活 octomind run doctor:blood # 血液检测解读专家 octomind run lawyer:sg # 法律专家
运行一个专家 agent 会从 tap registry 获取其 manifest、安装所需二进制、解析凭据、启动相应的 MCP 服务器,然后打开会话。
octomind tap init yourteam/my-tap # 脚手架、校验、git-init 并在本地注册 octomind tap yourteam/my-tap # 在另一台机器上,发布到 GitHub 之后
octomind- 前缀会自动添加:yourteam/my-tap 映射到仓库 yourteam/octomind-my-tap。
Method Command Install script (recommended) curl -fsSL https://raw.githubusercontent.com/muvon/octomind/master/install.sh | bash Install script (Windows PowerShell) irm https://raw.githubusercontent.com/muvon/octomind/master/install.ps1 | iex Homebrew (macOS) brew install muvon/tap/octomind Scoop (Windows) scoop bucket add muvon https://github.com/Muvon/scoop-bucket then scoop install muvon/octomind Cargo (Rust 1.95+) cargo install octomind Docker docker run --rm ghcr.io/muvon/octomind --help From source git clone https://github.com/muvon/octomind.git && cd octomind && cargo build --release
(原文较长,此处译出前 6000 字,完整内容请点「打开原文」。)
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。