AS AgentScopeAPI 手册 / API Reference

WaitForTool

public class WaitForTool extends BrowserSandboxTool
源码Source io/agentscope/runtime/sandbox/tools/browser/WaitForTool.java:30–99

Wait 用于工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools.browser 包,继承自 BrowserSandboxTool。核心成员包括 bind、browser_wait_for、WaitForTool。

A class in io.agentscope.runtime.sandbox.tools.browser that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.browser. Extends BrowserSandboxTool.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Request记录record
承载请求数据的记录类型。
A record in io.agentscope.runtime.sandbox.tools.browser that carries data used when components lets agents invoke external capabilities under control.
Response记录record
承载响应数据的记录类型。
A record in io.agentscope.runtime.sandbox.tools.browser that carries data used when components lets agents invoke external capabilities under control.

构造器摘要Constructor Summary

构造器Constructor说明Description
public WaitForTool()
初始化 `WaitForTool` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public SandboxTool bind(Sandbox sandbox)
设置该参数。
Performs the bind operation.
public String browser_wait_for(Double time, String text, String textGone)
执行 `browser_wait_for` 方法。
Performs the browser wait for operation.

构造器详情Constructor Detail

WaitForTool

public WaitForTool()

初始化 WaitForTool 实例。

Creates a new instance.

源码Source io/agentscope/runtime/sandbox/tools/browser/WaitForTool.java:34–58

方法详情Method Detail

bind

public SandboxTool bind(Sandbox sandbox)

设置该参数。

Performs the bind operation.

参数Parameters
名称Name类型Type说明Description
sandboxSandbox沙箱(类型 `Sandbox`)。The sandbox.
返回Returns SandboxTool
返回SandboxTool。Returns sandbox tool.
源码Source io/agentscope/runtime/sandbox/tools/browser/WaitForTool.java:60–64

browser_wait_for

public String browser_wait_for(Double time, String text, String textGone)

执行 browser_wait_for 方法。

Performs the browser wait for operation.

参数Parameters
名称Name类型Type说明Description
timeDouble时间(类型 `Double`)。The time.
textString文本(类型 `String`)。The text.
textGoneString文本 Gone(类型 `String`)。The text gone.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/tools/browser/WaitForTool.java:66–77

嵌套类详情Nested Class Detail

Request

public record Request( @JsonProperty("time") @JsonPropertyDescription("time in seconds") Double time, @JsonProperty("text") String text, @JsonProperty("textGone") String textGone )

承载请求数据的记录类型。位于 io.agentscope.runtime.sandbox.tools.browser 包。核心成员包括 time、text、textGone、Request。

A record in io.agentscope.runtime.sandbox.tools.browser that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.browser.

Response

@JsonClassDescription("The result contains browser tool output and message") public record Response(String result, String message)

承载响应数据的记录类型。位于 io.agentscope.runtime.sandbox.tools.browser 包。核心成员包括 result、message。

A record in io.agentscope.runtime.sandbox.tools.browser that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.browser.

继承成员Inherited Members

继承自Methods inherited from BrowserSandboxTool
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.