AI SDK(@aisdk)
𝙷𝚊𝚛𝚗𝚎𝚜𝚜𝙰𝚐𝚎𝚗𝚝 now supports 𝚜𝚝𝚘𝚙𝚆𝚑𝚎𝚗 for per-step control
8.5内容质量

TL;DR · AI 摘要
HarnessAgent新增stopWhen功能,支持每一步控制,提升代码执行的灵活性和可控性。
核心要点
- stopWhen参数可通过isStepCount(1)实现步骤级中断控制
- 与Vercel Sandbox集成支持Node.js 24运行时环境
- 提供workflow-harness SDK实现分步边界管理
结构提纲
按章节快速跳转。
- §功能发布
宣布HarnessAgent新增stopWhen参数实现步骤控制
- ·核心机制
通过isStepCount(1)实现特定步骤中断执行
- ›集成方案
- ·应用示例
展示stepped-harness-agent.ts代码实现方式
通过workflow-harness SDK实现分步边界控制
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- HarnessAgent新功能
- stopWhen机制
- isStepCount(1)参数控制
- 集成方案
- Vercel Sandbox支持
- Node.js 24运行时
- 应用示例
- stepped-harness-agent.ts代码
- workflow-harness SDK
金句 / Highlights
值得收藏与分享的关键句。
stopWhen: isStepCount(1)可精确控制代理执行步骤
Vercel Sandbox集成提供node24运行时和4000端口配置
workflow-harness SDK实现分步边界管理提升可控性
#AI SDK#HarnessAgent#Vercel#代码控制
打开原文AI SDK on X: "𝙷𝚊𝚛𝚗𝚎𝚜𝚜𝙰𝚐𝚎𝚗𝚝 now supports 𝚜𝚝𝚘𝚙𝚆𝚑𝚎𝚗 for per-step control https://t.co/skglw8lUp3" / X
[](https://x.com/)
-  AI SDK @aisdk 𝙷𝚊𝚛𝚗𝚎𝚜𝚜𝙰𝚐𝚎𝚗𝚝 now supports 𝚜𝚝𝚘𝚙𝚆𝚑𝚎𝚗 for per-step control [![Image 4: Code snippet demonstrating the use of
HarnessAgentwithstopWhen: // stepped-harness-agent.ts import { HarnessAgent } from '@ai-sdk/harness/agent'; import { claudeCode } from '@ai-sdk/harness-claude-code'; import { createVercelSandbox } from '@ai-sdk/sandbox-vercel'; import { isStepCount } from 'ai'; export const agent = new HarnessAgent({ harness: claudeCode, sandbox: createVercelSandbox({ runtime: 'node24', ports: [4000], }), instructions: 'You are a helpful coding assistant.', stopWhen: isStepCount(1), });](https://pbs.twimg.com/media/HOU58KPbUAAr8ba?format=webp&name=medium)](https://x.com/aisdk/status/2082134111725183324/photo/1) [](https://x.com/aisdk/status/2082134111725183324/photo/1) 4:00 PM · Jul 28, 202612.4K Views 3 4 78 32 -  AI SDK @aisdk Jul 28 Use 𝙷𝚊𝚛𝚗𝚎𝚜𝚜𝙰𝚐𝚎𝚗𝚝 with workflow and clean agent step boundary  [](https://x.com/aisdk/status/2082134128825426164/photo/1) 2 5 [](https://x.com/aisdk/status/2082134128825426164/quotes)1.3K  AI SDK @aisdk Jul 28 Learn more: ai-sdk.dev/docs/ai-sdk-ha… 2 [](https://x.com/aisdk/status/2082134141450256458/quotes)856
- # Join the conversation
Log in or sign up for X
See what’s happening and join the conversation
Continue with phoneContinue with Apple Continue with Google
or