构建 Claude Code 的经验教训:像 Agent 一样观察

[

[

](https://x.com/trq212)

](https://x.com/trq212)

[

[

Image

](https://x.com/trq212/article/2027463795355095314/media/2027448284764336128)

](https://x.com/trq212/article/2027463795355095314/media/2027448284764336128)

Lessons from Building Claude Code: Seeing like an Agent

构建 Claude Code 的经验教训:像 Agent 一样观察

One of the hardest parts of building an agent harness is constructing its action space.

构建 agent harness 最困难的部分之一是构建其 action space。

Claude acts through Tool Calling, but there are a number of ways tools can be constructed in the Claude API with primitives like bash, skills and recently code execution (read more about programmatic tool calling on the Claude API in

Claude 通过 Tool Calling 行动,但是在 Claude API 中,有多种方式使用像 bash、skills 和最近的 code execution 等 primitives 来构建 tools(阅读更多关于 Claude API 中的 programmatic tool calling 的信息在

@RLanceMartin's new article

@RLanceMartin 的新文章

).

).

Given all these options, how do you design the tools of your agent? Do you need just one tool like code execution or bash? What if you had 50 tools, one for each use case your agent might run into?

鉴于所有这些选项,你如何设计你的 agent 的 tools?你只需要像 code execution 或 bash 这样的一个 tool 吗?如果有 50 个 tools,每个针对你的 agent 可能遇到的 use case 呢?

To put myself in the mind of the model I like to imagine being given a difficult math problem. What tools would you want in order to solve it? It would depend on your own skills!

为了让自己进入模型的思维,我喜欢想象被给出一个困难的数学问题。为了解决它,你会想要什么工具?这将取决于你自己的技能!

Paper would be the minimum, but you’d be limited by manual calculations. A calculator would be better, but you would need to know how to operate the more advanced options. The fastest and most powerful option would be a computer, but you would have to know how to use it to write and execute code.

纸笔是最基本的,但你会受限于手动计算。计算器会更好,但你需要知道如何操作更高级的选项。最快且最强大的选项是计算机,但你必须知道如何使用它来编写和执行代码。

This is a useful framework for designing your agent. You want to give it tools that are shaped to its own abilities. But how do you know what those abilities are? You pay attention, read its outputs, experiment. You learn to see like an agent.

这是...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.0. UTC+08:00, 2026-03-24 03:16
浙ICP备14020137号-1 $访客地图$