MarsDawn 已在 Mac App Store 上架

Anthropic 說 agent 要透明,那攤開的東西誰來讀?

Anthropic 在 2024 年 12 月發表了〈Building Effective Agents〉,寫給打造 AI agent 的人。文章的總結列出三個原則,其中一個是透明。這篇要談的是這個原則的另一端:agent 把步驟攤開之後,總得有人去讀。

透明是 agent 要做到的事,讀是你要做的事。Anthropic 要求開發者把 agent 的規劃步驟攤開;對大多數在驅動 coding agent 的人來說,這些步驟最後會變成一份 Markdown 檔案,要有人在對的時間點讀它。

指南裡寫了什麼

Erik S. 與 Barry Zhang 在總結裡這樣寫:

“When implementing agents, we try to follow three core principles: Maintain simplicity in your agent's design. Prioritize transparency by explicitly showing the agent’s planning steps. Carefully craft your agent-computer interface (ACI) through thorough tool documentation and testing.”

(實作 agent 時,我們盡量遵守三個核心原則:讓 agent 的設計保持簡單;優先重視透明度,明確展示 agent 的規劃步驟;透過完整的工具文件與測試,仔細打造 agent 與電腦之間的介面(ACI)。)

這些是寫給開發 agent 的人的設計原則,不是給使用者的操作指示。原則要求把步驟攤開,但沒有說誰來讀。

同一篇也描述了 agent 拿到任務之後會做什麼:「Once the task is clear, agents plan and operate independently, potentially returning to the human for further information or judgement.」(任務明確之後,agent 會自己規劃、獨立運作,必要時回頭找人類要更多資訊或判斷。)還有:「Agents can then pause for human feedback at checkpoints or when encountering blockers.」(Agent 可以在檢查點或遇到阻礙時暫停,等待人類回饋。)注意用詞:potentially(必要時)和 can(可以)。檢查點是 agent 可以有的設計,不是一定要有。

大部分的檢查,不是你在做

這裡很容易講過頭,所以先看指南真正放在前面的是什麼。agent 會拿外界的結果來檢查自己:「During execution, it's crucial for the agents to gain “ground truth” from the environment at each step (such as tool call results or code execution) to assess its progress.」(執行過程中,agent 必須在每一步從環境取得「ground truth」,例如工具呼叫的結果或程式執行的結果,用來評估自己的進度。)這句話裡的 ground truth 指的是測試結果和工具輸出,不是人。

指南對風險也講得很直接:「The autonomous nature of agents means higher costs, and the potential for compounding errors.」(Agent 的自主性意味著更高的成本,以及錯誤不斷累積的可能。)它給的解方是在沙盒環境裡大量測試、加上適當的防護,並沒有說「要讀得更仔細」。

人真正出場,是在附錄談 coding agent 的段落:「However, whereas automated testing helps verify functionality, human review remains crucial for ensuring solutions align with broader system requirements.」(然而,自動化測試雖然有助於驗證功能,但要確保解法符合更廣泛的系統需求,人工審閱仍然至關重要。)這句講的是程式碼。不過它點出的落差,用過 agent 的人都不陌生:測試能告訴你東西能動,不能告訴你那是不是你要的。

攤開的步驟,最後去了哪裡

以下是我們的解讀,不是 Anthropic 的主張。

如果你每天都在用 coding agent,它的規劃步驟通常不會出現在什麼儀表板上,而是變成檔案:plan.md、一份有勾選框的待辦清單、一個 agent 一直在改寫的進度檔,最後再來一份總結。從你這邊看,透明的意思就是要讀的東西變多了。

把步驟攤開,是 agent 那一半的責任。另一半,是有人在關鍵時刻讀它:資料庫遷移執行之前、分支合併之前、接受「做完了」之前。一個 agent 把所有東西都寫進一份 600 行、沒人打開的檔案,紙面上很透明,實際上沒人在看。

Harrison Chase 在 2024 年也講過類似的話,不過他談的是 agent 框架該怎麼設計,不是文件:「You’ll want the ability to observe what is going on inside, since the exact steps taken may not be known ahead of time.」(你會希望能觀察系統內部發生了什麼,因為它實際採取的步驟事先可能無法得知。)他講的是給開發 agent 的人用的工具。如果你是驅動 agent 的那個人,它一直在寫的那份純文字檔,常常就是你看得到的部分。

以上幾位作者都沒有提到 MarsDawn,也沒有推薦 MarsDawn 或任何 Markdown 工具。

比看起來難讀

檔案很長,重要的地方很少在最上面。說明這次改動的那張圖,是一段 Mermaid 原始碼,不是圖(想在 Mac 上看到排好的樣子,可以先看在 Mac 上怎麼看 Markdown 檔案)。你讀到一半,agent 可能正在改寫它。檔案常常不只一份,有時還分散在不同的分支或 worktree。等你真的找到問題,說「快取那段怪怪的」,agent 只能用猜的。完整的說明在讀懂 agent 交回來的 Markdown。

MarsDawn 幫得上、幫不上的地方

MarsDawn 是為這種閱讀做的 Mac app。它不會讓 agent 變得更透明,裡面也沒有 AI 模型:它不會幫你摘要計畫,也不會告訴你計畫對不對。它做的是:

讀的人還是你。MarsDawn 負責讓一份又長又會變的檔案,在你讀的時候保持好讀。

試試看

MarsDawn 已在 Mac App Store 上架。另外還有免費的 marsdawn 命令列工具:

brew install redtear1115/tap/marsdawn

它不需要 app 就能把 Markdown 輸出成 PDF。

命令列工具 · 買之前先看:MarsDawn 做不到的事

接下來

資料來源