技巧精选

Philipp Schmid 解析 Code Mode:智能体工具调用收敛为一段代码

精选理由

Schmid 写了篇 Code Mode 实操解析,讲清智能体为啥把一堆工具调用改写成跑代码,还带了 Gemini 4 Argon 的最小示例和可动手的 pi 工具。

Philipp Schmid 在博客中梳理了智能体工具调用的演进路径:从固定的一组工具,到动态工具搜索,再到把所有调用收敛为代码执行(Code Mode)。他指出带类型定义的 JS/Python 沙箱在处理大量工具时比直接调 bash 更可靠,并以 Gemini 4 Argon 写了一个最小示例演示。他还预测 MCP 在 2027 年会重新强势回归,并推荐用 pi 来上手试验 Code Mode。

原文 · Philipp Schmid

Are Agents soon going to have only 1 tool? We went from a handful of tools, to dynamic tool search, and now to collapsing everything into code mode. Wrote down how Code Mode works, why a typed JS/Python sandbox can beat raw bash, and why MCP is going to go back strong in 2027. With an a minimal example for Gemini 4 Argon. philschmid.de/code-mode If you plan to explore code mode i can recommend testing with pi! Easily hackable and comes with strong foundation. 💬 67 🔄 18 ❤️ 323 👀 21249 📊 124 ⚡