注册并分享邀请链接,可获得视频播放与邀请奖励。

Charlie Hills
@charliejhills
I help you (actually) use AI | collabs@charliehills.ai
加入 September 2021
464 正在关注    13.8K 粉丝
Anthropic just defined what an agent loop is. There are 4 and each one hands off more of the job: A loop is an agent repeating cycles of work until a stop condition is met (their words, not mine). The only thing separating the four is how much you stop doing yourself. 1. Turn-based You hand off the check. - Triggered by a prompt you send. - Stops when Claude thinks it's done. - Best for short tasks, outside a process. - Keep it cheap with skills, not more turns. No command here. You write the check once, as a skill. Save it as a file called SKILL .md and Claude runs it on every job from then on. Ask for it in plain English: "Create a skill that checks my work: open the page, screenshot before and after, check the console, fix what fails and rerun." That's turn-based. You still say go. 2. Goal-based You hand off the stop condition. - Triggered by a prompt, in real time. - Stops at the goal, or the turn cap. - Best for work with a clear finish line. - Keep it cheap with a cap, said out loud. Type /goal, then the bar and the limit together. "/goal get the homepage Lighthouse score to 90 or above, stop after 5 tries" The cap is how Claude knows when to stop. 3. Time-based You hand off the trigger. - Triggered by an interval you set. - Stops when you cancel, or the work is done. - Best for recurring jobs and outside systems. - Keep it cheap with longer gaps between runs. Type /loop, then the interval, then the job. "/loop 5m check my PR, address comments, fix failing CI" /loop runs on your machine. If you close the lid, it stops. 4. Proactive You hand off the prompt. - Triggered by an event or a schedule. - Stops each task at its goal, then carries on. - Best for triage, bug reports, upgrades. - Keep it cheap with a smaller, faster model. /schedule moves that same loop into Anthropic's cloud, where it runs as a routine. Type /schedule, then when and what: "/schedule every hour: check the feedback channel for bug reports" That one keeps going without you. Every one of them still needs a stop condition. That's the bit people skip, and it's what had me burning tokens overnight. I had Claude critiquing its own work in a cycle that could run all night. The fix is one cap, like "stop after 5 tries". Everything you need to know to master loops: How I run loops: Their guide: /goal: Routines: Skills: Every prompt, skill and guide I've built this year is free here. Check it out Repost ♻️ this if it saved you a read. P.S. Have you built a loop before?
显示更多
0
21
182
23
转发到社区