当地代理

stop()

agent.stop()

结束当前运行。 飞行中的模型请求被中止, 队列工具调不启动, 子试剂停止了 。

synchronousstops childrenstopReason: stopped
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const running = agent.run({ message: "…" });

setTimeout(() => agent.stop(), 30_000);

const result = await running;     // stopReason: "stopped"
import threading

threading.Timer(30, agent.stop).start()

result = agent.run(message="…")    # stopReason: "stopped"

它可以做什么

  • 停止飞行中的模型请求 。
  • 设置每步顶部的环读的标记 。
  • 依次转弯发出队列的呼叫 回答 ” “ 被用户拦截 。 ” 而不是运行 。
  • 停止所有子试剂
工具已运行完成

正在执行命令, 正在写入文件, 已经在运行中的平行批次, 没有一个中途被中断。 停止是干净的, 不是即时的 。

停止的跑步从不重新尝试

重试和回溯逻辑检查:再次尝试与要求相反。

谈话是不停的

停止之前的一切 都留在特工里 并且,在会话里,在账户上 run() 继续从那里继续。

倒带前停止

rewind() 在一个运行中的代理扔 agent_running.先停止它——在写作时进行谈话不是尝试。