Add a workspace
加入工作區
Point MAT at a project directory by absolute path, or pick it with Browse in the desktop app. Optionally set a verification command such as npm test.
用絕對路徑指定專案目錄,桌面版也可以用 Browse 選資料夾。可以順便設定驗證指令,例如 npm test。
Claude Code, Codex, Grok, and Antigravity run through their own headless runtimes, and OpenRouter models run through Codex. An orchestrator agent gates each stage, your test command can check each patch, and the whole run stays replayable.
Claude Code、Codex、Grok、Antigravity 都透過各自的 headless runtime 執行,OpenRouter 的模型則借用 Codex 執行。每個階段由協調者 agent 把關,patch 可以交給你自己的測試指令檢查,整個執行過程都能回放。
Its predecessor, multi-ai-chat-desktop, orchestrated web chats. That is fine for comparing answers, but a chat window cannot edit your repository, run your tests, or record who decided what. Multi-AI Terminal (MAT) drives each agent's headless runtime inside your workspace, so every edit, check, and decision is kept as data.
前一代的 multi-ai-chat-desktop 串的是網頁聊天。拿來比較答案沒問題,但聊天視窗改不了你的 repo、跑不了你的測試,也記不下誰做了什麼決定。Multi-AI Terminal(MAT)直接驅動各家 agent 的 headless runtime,在你的工作區裡動手,每一次修改、檢查與決策都會存成資料。
A degraded or unverified advance is labeled, never hidden.
降級放行或未經驗證的結果,都會清楚標示,絕不藏起來。A run applies a workflow to a workspace: ordered stages, each holding one or more agent slots, with an optional gate after each stage.
一次執行,就是把一個工作流套用到一個工作區:依序排好的階段,每個階段放一個以上的 agent 槽位,階段結束後可以設一道關卡。
Point MAT at a project directory by absolute path, or pick it with Browse in the desktop app. Optionally set a verification command such as npm test.
用絕對路徑指定專案目錄,桌面版也可以用 Browse 選資料夾。可以順便設定驗證指令,例如 npm test。
Start from Planning, Build, Review, or Pipeline. Under Customize, each slot sets provider, model, reasoning effort, permission tier, prompt template, and count.
從規劃、建置、審查或 Pipeline 四個內建流程開始。在「進階設定」裡,每個槽位可以指定 provider、模型、推理強度、權限層級、提示範本與數量。
A stage's agents run in parallel, each optionally in its own git worktree. At a gated stage, an orchestrator agent reads a digest of the candidates and answers advance, retry, or abort in strict JSON.
同一階段的 agent 平行執行,也可以各自在獨立的 git worktree 裡動手。遇到有關卡的階段,協調者 agent 會讀取候選結果的摘要,用嚴格的 JSON 回覆繼續、重試或中止。
Conversation lists each answer, decision, check, and failure. Timeline replays the raw event log. Export a Markdown report or a debug bundle when you hand the work on.
「對話」列出每個回答、決策、檢查與失敗,「時間軸」回放原始事件紀錄。要交接時,可以匯出 Markdown 報告或除錯套件。
The slots in one stage run together. One gate then answers for the whole stage.
同一個階段的槽位一起跑。再由一個關卡替整段回答。
Stage
A stage holds at most 12 slots, and the same provider waits 1.5 seconds between starts.
Candidates
The text stays, and a worktree run also keeps a binary patch.
Gate
The gate answers go on, try again, or stop.
階段
一個階段最多 12 個槽位,同一家 provider 要隔 1.5 秒才啟動下一個。
候選結果
文字會留下,走 worktree 時再多一份二進位 patch。
關卡
關卡的回答是繼續、再試一次,或停下來。
Environment values are hidden before anything is written down.
環境變數的值會先遮掉,再寫進檔案。
Engine
Events get appended from the stage engine while the run is still going.
Data dir
Both the web UI and the desktop app read and write here.
Event log
The timeline replays whatever landed in events.jsonl.
Patches
A binary patch from one attempt sits with that run.
Report
Generated, reviewed, advanced, and verified each get their own part of the Markdown.
引擎
執行還在跑的時候,階段引擎就把事件一筆筆寫進去。
資料目錄
網頁和桌面版讀寫的是同一個地方。
事件紀錄
events.jsonl 裡有什麼,時間軸就回放什麼。
patch
某次嘗試的二進位 patch,就放在這次執行旁邊。
報告
產生、審查、放行、驗證,在 Markdown 裡各寫一段。
MAT treats agent output as evidence to check, not as an answer to trust.
MAT 把 agent 的輸出當成要查核的證據,而不是直接採信的答案。
Claude runs through the Agent SDK and Codex through a persistent codex app-server. Grok and Antigravity run as headless CLIs behind FIFO managers, and OpenRouter models run through Codex with an isolated config.
Claude 透過 Agent SDK 執行,Codex 透過常駐的 codex app-server。Grok 與 Antigravity 以 headless CLI 執行,各自前面有一個 FIFO manager 負責排隊;OpenRouter 的模型則借用 Codex 執行,並使用獨立的設定。
server/src/providers/Any provider can orchestrate. A retry can target specific nodes and add a prompt addendum. If the answer cannot be parsed or the retry budget runs out (2 per stage by default), the stage advances and is marked degraded.
任何 provider 都能擔任協調者。重試可以只針對特定節點,並附上補充提示。回覆無法解析,或用完重試額度(預設每階段 2 次)時,階段會繼續往下,並標為降級。
server/src/orchestrator/Nodes can run in their own git worktree, and each attempt is captured as a binary patch. Apply one from the UI: MAT checks it with git apply first and lists conflicts instead of forcing it.
節點可以在獨立的 git worktree 裡執行,每次嘗試的修改都存成二進位 patch。從介面套用時,MAT 會先用 git apply 檢查,有衝突就列出來,不會硬套。
server/src/engine/worktree.tsEach workspace can set a command such as npm test, with a 600-second default timeout. Worktree candidates with a non-empty patch run it, and a stage with requireVerified retries failed checks when nothing passed.
每個工作區可以設定一個驗證指令,例如 npm test,預設逾時 600 秒。若候選結果使用 worktree 且 patch 不是空的,就會執行這個指令;開啟 requireVerified 的階段,如果沒有任何候選通過,就會重試沒過的那些。
server/src/engine/verify.tsInterrupt stops the active candidates, keeps their partial logs and patches, and runs your instruction. Queue waits for the next stage boundary. Up to 8 per run, first in, first out, never typed into a running process.
「立即插入」會停下正在執行的候選,保留已產生的日誌與 patch,再執行你的新指示;「排隊」則等到下一個階段交界。每次執行最多 8 則,先進先出,絕不會寫進執行中行程的 stdin。
server/src/engine/steer.tsThe Markdown report separates generated, reviewed, advanced, and verified work, with CLI versions, usage, patches, and checks. The debug bundle is one zip of the whole run, with environment variable values redacted.
Markdown 報告會分開標示已產生、已審查、已放行與已驗證的工作,並附上 CLI 版本、用量、patch 與驗證結果。除錯套件把整次執行打包成一個 zip,環境變數的值都會遮蔽。
GET /api/runs/:id/reportYou fill the same kind of slot no matter which provider you pick.
不管選哪一家,槽位要填的東西都一樣。
Workflow slot
You pick a provider, a model, an effort, and one of safe, auto, or full.
Runtime
Claude runs in its agent library, Codex keeps a server process, and grok and agy are command line tools with no window.
流程槽位
你選 provider、模型、推理強度,再從 safe、auto、full 裡挑一個。
執行期
Claude 走程式庫,Codex 開一個伺服器行程,grok 和 agy 用不開視窗的指令列。
Only a worktree candidate with a real patch gets this command.
只有 worktree 候選,而且 patch 真的有內容,才會跑這道指令。
Patch
Nothing to check means the command never starts.
Your command
A command like npm test stops after 600 seconds, unless the workspace sets another limit.
Result
The log keeps whichever of passed, failed, error, or skipped came back.
patch
沒有內容可看,指令就不會啟動。
你的指令
npm test 這類指令,工作區沒另設的話,600 秒就停。
結果
日誌會記下回來的是通過、失敗、錯誤還是略過。
The browser UI and the desktop shell talk to the same Node server. It owns runs, gates, and storage, and starts and stops each provider's runtime as a child process or SDK session.
瀏覽器介面和桌面版都連到同一個 Node 伺服器。執行、關卡與儲存都由它負責,各家 provider 的 runtime 也由它以子行程或 SDK session 的形式啟動與停止。
Agent processes start from argument arrays, not from a shell string.
agent 行程用參數陣列啟動,不是一整串 shell。
Default bind
From source it listens only on this computer, port 7788, and the desktop app picks a free port there too.
Wider host
A wider bind leaves the token optional, so anyone who reaches the port can run agents.
預設綁定
從原始碼跑只聽這台電腦的 7788,桌面版也在這台電腦上挑一個空的連接埠。
對外位址
綁到所有介面時 token 仍可留空,連得到連接埠的人就能跑 agent。
Driving each vendor's CLI, app-server, or SDK gives MAT tool events, usage, patches, and exit codes it can normalize into one schema. The cost: every provider needs its own install and sign-in, and the Grok and agy streams carry less detail.
直接驅動各家的 CLI、app-server 或 SDK,MAT 才拿得到工具事件、用量、patch 與結束代碼,並整理成同一套格式。代價是每個 provider 都得各自安裝、登入,而 Grok 與 agy 的串流細節也比較少。
If the orchestrator's answer cannot be parsed, or a stage spends its retry budget, the run moves on and the decision is marked degraded in the UI and the report. A run that finishes with a visible caveat beats one that never finishes.
協調者的回覆無法解析,或某個階段用完重試額度時,執行會繼續往下,這個決策會在介面與報告裡標為降級。帶著明確註記跑完,總比永遠跑不完好。
Parallel Codex sessions on one OAuth login can race the single-use refresh token. MAT starts sessions of the same provider at least 1.5 seconds apart, orchestrator included. That narrows the race without removing it, so API keys or serial use stay the durable fix.
同一個 OAuth 登入下平行跑多個 Codex session,可能會搶著輪替只能用一次的 refresh token。MAT 讓同一家 provider 的啟動至少間隔 1.5 秒,協調者也算在內。這只能減少互搶,無法根除,長久的解法還是改用 API key 或依序使用。
Provider sessions follow Better Agent Terminal: a persistent codex app-server controller and Claude Agent SDK sessions. MAT is not a fork. It ports that pattern to a Node-only server and applies it to grok and agy as well.
provider session 的處理方式參考 Better Agent Terminal:常駐的 codex app-server controller,加上 Claude Agent SDK session。MAT 不是 fork,而是把這套做法移植到純 Node 的伺服器,也套用到 grok 與 agy。
The budget is 2 retries a stage. When it's gone, the stage advances and is marked degraded.
每個階段預設能重試 2 次。用完還是往下,並標成降級。
Stage result
You get the candidate's text back, sometimes with a patch or a verification result.
Retry budget
An answer that can't be parsed advances immediately and is marked degraded.
階段結果
候選會交回文字,有時還附 patch 或驗證結果。
重試額度
回答解析不了,就立刻放行,並標成降級。
Both need Node.js 20 or newer, Git (2.32+ recommended), and sign-in or an API key for each provider you use. Claude and Codex can use runtimes MAT downloads for you; Grok needs grok, Antigravity needs agy, and OpenRouter needs OPENROUTER_API_KEY.
兩種方式都需要 Node.js 20 以上、Git(建議 2.32 以上),以及你要用的每家 provider 的登入或 API key。Claude 與 Codex 可以使用 MAT 代為下載的 runtime;Grok 需要 grok,Antigravity 需要 agy,OpenRouter 則需要 OPENROUTER_API_KEY。
Windows: the setup .exe or the .msi. macOS: the .dmg for Apple silicon or Intel; it is not signed or notarized, so allow the first launch under System Settings, Privacy & Security. Linux: .deb, .AppImage, or .rpm.
Windows 用 setup .exe 或 .msi。macOS 依晶片選 Apple silicon 或 Intel 的 .dmg;它沒有簽章也沒有經過公證,第一次開啟要到「系統設定」的「隱私權與安全性」允許。Linux 可選 .deb、.AppImage 或 .rpm。
Clone the repository, then build and start it. The UI and API come up on http://127.0.0.1:7788. Port, host, data directory, and token can each be set with a flag or an environment variable.
先 clone 這個 repo,再建置並啟動。網頁介面與 API 會開在 http://127.0.0.1:7788。連接埠、位址、資料目錄與 token 都可以用參數或環境變數設定。
npm install npm run build npm start
In Projects, add a workspace. Back in Launch, pick Planning, Build, Review, or Pipeline, describe the task, and press Start. Open Customize only to change stages or agents.
在「專案」加入工作區,回到「啟動」選規劃、建置、審查或 Pipeline,寫下任務後按「開始執行」。要改階段或 agent 時,才需要打開「進階設定」。
Built in six days: 21 releases, from v0.1.0 on July 18, 2026 to v0.2.10 on July 23. No feature changes since. An October 2026 cleanup removed personal notes, fixed the docs, and updated dependencies to close every open Dependabot alert; those updates are on main and not yet in a release.
六天內做出來:從 2026 年 7 月 18 日的 v0.1.0 到 7 月 23 日的 v0.2.10,共 21 個版本。之後沒有新功能。2026 年 10 月整理過一次,移除個人筆記、修正文件,並更新相依套件,關掉所有未處理的 Dependabot 警示;這些更新目前只在 main 上,還沒有包進新版本。
More from Ted Huang. Every public project has a page like this one, in English and Traditional Chinese.
Ted Huang 的其他作品。每個公開專案都有一頁像這樣的中英雙語介紹。
All projects →全部專案 →