你完全可以直接让 AI 去做事
原题You can just ask AI to do things
推荐理由Sean Goedecke 用环境搭建、日志排查等任务说明如何把重复操作交给 AI。文章提供的是识别可委托工作的习惯,帮助工程师把工具能力转成日常行动。
读前速览
作者探讨了如何利用 AI 智能体来自动化环境搭建、日志分析、会话管理等重复性工程任务,并强调在 AI 时代,主动性才是关键能力。
与 AI 协作时最重要的技能是主动性——愿意去尝试大量新事物。
技术能力的重心正从「会写代码」转向「懂得如何把复杂工作流委派给 AI 智能体」。
AI 智能体非常擅长运行开发服务器、监控日志这类枯燥重复的任务。
智能体拥有无限的耐心和广博的知识,非常适合处理人类觉得无聊的环境搭建与验证工作。
通过 AI 进行前置工作报告,能显著改善一天工作的开端。
在你睡觉时让智能体扫描未读消息和日志,醒来后就能直接拿到一份高信息量的摘要。
人类必须继续对高层设计决策和代码审查负责。
尽管 AI 能力强大,作者仍坚持亲自审查代码并做出决策,以确保质量和责任归属。
使用桌面智能体时,AI 会话管理是一项必要的开销。
频繁使用会形成一张「会话蛛网」,需要借助 AI 来整理和归档不活跃的会话线程。
使用 AI 最重要的技能之一是主动性:愿意尝试新颖且有挑战性的事情。这不仅适用于你构建的东西,也适用于你构建它们的方式。AI 模型进步得如此之快,以至于我们大多数人都受限于¹未能意识到 AI 智能体可以帮助自动化特定任务。以下是我日常工作中的一些例子。One of the most important skills in working with AI is agency: being willing to try new and ambitious things. This is true for what you build, but it’s also true for how you build. AI models are improving so quickly that most of us are bottlenecked1 on noticing that AI agents can help automate particular tasks. Here are some examples of that from my daily work.
让代理帮我运行开发服务器。代理非常擅长解决奇怪的开发环境问题,因为它们行动迅速、耐心无限,而且知识面极广。我现在几乎再也不自己运行启动开发服务器的 bash 命令了。Asking the agent to run my dev server. Agents are very good at fixing weird dev environment issues because they work fast, have infinite patience, and have a huge breadth of knowledge. I almost never run the bash commands to start my dev server anymore.
让代理向我的开发服务器发送请求。我不手动启动开发服务器,部分原因是我也不会手动向它发送请求。相反,我会说:“好,现在启动开发服务器,然后用 curl 跑一遍正常流程。”原本需要相对手动地组合一系列 curl 请求并验证输出的过程,现在可以完全自动化了²。Asking the agent to make requests to my dev server. Part of why I don’t run my dev server manually is that I don’t make requests to it manually either. Instead I’ll say “okay, now start the dev server and run through the happy paths with curl”. The relatively manual process of assembling a set of curl requests and validating the output can now be entirely automated2.
让智能体观察我进行生产环境变更。每次部署或切换功能开关时,我都会让智能体在变更前后轮询指标和日志。智能体能处理比我多得多的日志,也比我有耐心(例如,我经常会让它每小时轮询一次,一直持续到当天结束;如果靠我自己,大多数变更我都不会这么做)。Asking the agent to watch as I make a production change. Every time I do a deploy or flip feature flags, I ask an agent to poll metrics and logs before and after the change. Agents can ingest more logs than I can and are much more patient than me (for instance, I routinely ask for an hourly poll over the rest of the day, which I would not do for most changes on my own).
让智能体征求其他模型的第二意见。我日常主要使用 Claude Opus 5.5,它是个不错的模型,但并不一定比 GPT-6-Astra 或 Gemini Argon3 更好。想好代码改动方案后,我通常会说⁴“请启动子智能体,征求 Astra 和 Argon 的意见”。GitHub Copilot⁵ 内置了所有顶级模型,因此这件事会更容易;不过我猜,如果你同时订阅了 Claude Code 和 Codex,让 Claude Code 启动一个无头 Codex 会话应该也很简单。Asking the agent to get a second opinion from other models. My daily driver is Claude Opus 5.5, which is a good model, but it’s not strictly better than GPT-6-Astra or Gemini Argon3. After I’ve come up with a code change, I typically will say4 “please open subagents to get Astra and Argon’s opinion”. This is made easier by the fact that GitHub Copilot5 has all the top models built in, but I suspect it’d be straightforward enough to ask Claude Code to run a headless Codex session if you’ve got subscriptions to both.
让智能体在我上班前先检查一遍所有未读消息、日志等内容。这是我做过的最有用的事情之一,因为我在澳大利亚工作,而我的美国同事会在我醒来前几个小时就开始工作。我每天早上 6 点都会安排一个定时任务,让智能体梳理未读消息,找出那些在向我提问或存在我需要关注的问题的消息,并进行初步调查(例如查找相关日志行)。这样,我就能在开始工作时先浏览这份报告;相比过去必须自己整理所有内容,这有了很大的改善6。Asking the agent to do a pre-work pass through all my unread messages, logs, and so on. This is one of the most useful things I do, since I work in Australia and my American colleagues start hours before I wake up. I have a scheduled job at 6am every day for an agent to comb through unread messages, identify ones that are asking me questions or have problems I should look at, and do preliminary research (e.g. looking up relevant log lines). That way I can start my workday by scanning that report, which is a big improvement over having to collate everything myself6.
要求智能体改进自身。很多这类工作流的一大障碍,是配置好日志和指标以及 Slack MCP 服务器⁷,或编写技能等事情很麻烦。但事实上,智能体完全可以自己完成这一切!正如它能解决开发服务器上各种棘手的问题一样,它也能解决自身配置中的各种棘手问题。你只需要生成 API 密钥,并将它们粘贴到正确的位置即可。Asking the agent to improve itself. One blocker to a lot of these flows is the pain of setting up the right logs and metrics and Slack MCP servers7, or writing the skills, and so on. But in fact the agent can do all of this itself! Just as it can solve weird problems with your dev server, it can solve weird problems with its own setup. You just have to generate API keys and paste them in the right spots.
让智能体管理自己的会话。如果你使用 GitHub Copilot 这类桌面智能体工具(或 ChatGPT 应用、Claude Code 桌面版等),很快就会积累出一团错综复杂的会话和子会话。要找出哪些线程值得继续跟进,可能并不容易。好在智能体也能帮你处理这件事。我经常让它清理掉过去 24 小时内没有活动的会话,或为我整理尚未结束的会话,并建议哪些可以归档,等等。Asking the agent to manage its own sessions. If you use a desktop agent tool like GitHub Copilot (or the ChatGPT app, or Claude Code desktop, etc), you will rapidly end up with a spiderweb of sessions and subsessions. It can be tough to identify what are the threads worth picking up. Fortunately, the agent can do this for you as well. I routinely ask it to clear away sessions that haven’t had activity in the last 24 hours, or to catalog my open sessions and suggest ones that can be archived, and so on.
我不会让代理包办所有事情。我会自己撰写消息和报告(少数附录除外)、自己做设计决策,也会亲自审查代码。部分原因是我认为自己在其中一些任务上比模型做得更好;另一部分原因是我对其中一些任务负有责任,因此理应亲自做决定。我会决定要做什么,而且往往会毫不留情地筛选代理提出的建议:对于一份列出二十项任务的建议清单,我通常一项也不选,或者只选一项。I don’t ask the agent to do everything. I write my own messages and reports (barring some appendices), I make my own design decisions, and I review code myself. This is partly because I think I’m better than models at some of these tasks, and partly because I’m responsible for some of these tasks, so I ought to make the decisions myself. I decide what to work on, and I tend to be ruthless with agent suggestions: of a suggested list of twenty tasks, I’ll often pick zero or one.
不过,我确实发现自己越来越常让智能体替我做更多事情。很多时候,这个念头会突然变得显而易见:我第无数次做着某件有点繁琐的事时,就会想8:“哦,等等,我可以直接让模型替我做这件事。”然后我就再也不会亲自动手做这件事了。However, I do find myself asking the agent to do more and more for me. Often the realization strikes me as obvious: I’ll be doing some mildly tedious task for the hundredth time and think8 “oh wait, I could just get a model to do this for me”, then I’ll never do the task by hand again.
- 正如我之前所说,我认为即使模型的发展今天就停滞下来,随着我们逐渐学会更有效地使用现有模型,至少在未来一年里仍会看到巨大的进步。 ↩
As I’ve said before, I think that model progress could stall out today and we’d still see huge improvements for at least a year as we learn how to use the models we’ve got more effectively.
↩ - 为什么不直接编写集成测试呢?嗯,很多时候,你不想每次都运行同一组操作;或者你想调整开发服务器,以便测试某种故障情形(例如,用一个故意弄坏的 Redis 客户端替换你的 Redis 客户端)。↩
Why not just have integration tests? Well, often you don’t want to run the same set of operations every time, or you want to jimmy your dev server in order to test some failure mode (e.g. replacing your Redis client with a deliberately broken Redis client).
↩ - 我还没试过 Carbon。↩
I haven’t tried Carbon yet.
↩ - 然后,我会自行浏览这些模型给出的概要反馈,或者让我的主代理会话吸收这些反馈(具体取决于这项变更的风险有多高)。↩
I will then either scan the top-line feedback from those models myself or let my main agent session incorporate the feedback (depending on how risky the change is).
↩ - 我在 GitHub Copilot 团队工作。如果你认为我在这里存在利益冲突,请换成你更喜欢的多模型智能体编程工具。↩
I work on GitHub Copilot. If you think I have a conflict of interest here, substitute your preferred multi-model agentic coding tool.
↩ - 我仍然会手动阅读所有未读消息。等我对这套预先工作报告的东西足够有信心后,也许就不再这么做了——消息实在太多了。↩
I do still read all my unread messages manually. Once I get confident enough in this pre-work report stuff I might stop doing that — it’s a lot of messages.
↩ - 有些人可能不放心把 Slack 或日志数据交给这些模型处理,这也完全可以理解。但如果你愿意这样做,很多事情都会容易得多。↩
Some people might not trust the models with Slack or log data, which is fair enough. But if you do, a lot of things get a lot easier.
↩ - 否则我会看到别人让代理来做这件事,然后意识到我也可以照做。希望这篇文章中的一两个观点能帮助其他人意识到这一点。↩
Or I’ll see someone else getting an agent to do it and realize I could just do the same. I hope one or two of the points in this post can help other people come to that realization.
↩
如果你喜欢这篇文章,可以订阅邮件更新,了解我的新文章,也可以把它分享到 Hacker News。If you liked this post, consider subscribing to email updates about my new posts, or sharing it on Hacker News.
以下是相关帖子的预览,它与这篇帖子有相同的标签。Here's a preview of a related post that shares tags with this one.
擅长使用 AI 需要时间和练习 很多人认为,想要“擅长使用 AI”轻而易举。没错,早期的一些模型确实有些技巧需要学习,但现在的模型不需要这些了。即使有些不同的技巧适用于当前的模型,下一代模型也会让它们过时,那又何必费心呢?只要告诉模型你想让它做什么就行了。 这种看法在反 AI 阵营中尤其流行。他们嘲笑有人认为不愿使用 AI 的人会落后,也不认同建议其他工程师完全不要使用 AI 可能是不负责任的说法。在他们看来,如果 AI 真有一天变得足够强大、值得使用,他们也能立刻上手,毫无学习曲线。 真是这样吗?继续阅读……Getting good at AI takes time and practice
Many people think that getting “good at AI” is trivial. Sure, with some early models there were tricks you had to learn, but current models don’t need them. Even if there are different tricks that work on current models, the next generation will render them obsolete, so why bother? Just tell the model what you want it to do.
This take is particularly popular with the anti-AI crowd, who scoff at the idea that AI-reluctant people are being left behind, or that it might be irresponsible to advise other engineers to avoid AI use entirely. According to them, if AI does ever become capable enough to be worth using, they’ll be able to start using it with no learning curve. Is that right?
Continue reading...