AS AgentScopeAPI 手册 / API Reference

AguiTool

public class AguiTool
源码Source io/agentscope/core/agui/model/AguiTool.java:31–109

表示工具定义,使用 AG-UI 协议。位于 io.agentscope.core.agui.model 包。核心成员包括 getName、getDescription、getParameters、toString、equals、hashCode。

Represents a tool definition in the AG-UI protocol.

Tools are functions that the agent can call to perform actions or retrieve information. This class defines the tool's interface including its name, description, and parameter schema.

构造器摘要Constructor Summary

构造器Constructor说明Description
public AguiTool(String name, String description, Map<String, Object> parameters)
创建新的AguiTool。
Creates a new AguiTool.

方法摘要Method Summary

方法Method说明Description
public String getName()
获取工具名称。
Get the tool name.
public String getDescription()
获取 `getDescription`。
Get the tool description.
public Map<String, Object> getParameters()
获取参数 JSON 模式。
Get the parameters JSON Schema.
public String toString()
返回 `toString` 结果。
Returns the to string.
public boolean equals(Object o)
设置该参数。
Performs the equals operation.
public int hashCode()
返回 `hashCode` 结果。
Returns the hash code.

构造器详情Constructor Detail

AguiTool

public AguiTool(String name, String description, Map<String, Object> parameters)

创建新的AguiTool。

Creates a new AguiTool.

参数Parameters
名称Name类型Type说明Description
nameString工具名称。The tool name
descriptionString描述(类型 `String`)。The tool description
parametersMap<String, Object>参数 JSON 模式。The parameters JSON Schema
源码Source io/agentscope/core/agui/model/AguiTool.java:44–55

方法详情Method Detail

getName

public String getName()

获取工具名称。

Get the tool name.

返回Returns String
工具名称。The tool name
源码Source io/agentscope/core/agui/model/AguiTool.java:62–64

getDescription

public String getDescription()

获取 getDescription。

Get the tool description.

返回Returns String
返回字符串结果。The tool description
源码Source io/agentscope/core/agui/model/AguiTool.java:71–73

getParameters

public Map<String, Object> getParameters()

获取参数 JSON 模式。

Get the parameters JSON Schema.

返回Returns Map<String, Object>
参数模式 as 不可变映射。The parameters schema as an immutable map
源码Source io/agentscope/core/agui/model/AguiTool.java:80–82

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/model/AguiTool.java:84–93

equals

public boolean equals(Object o)

设置该参数。

Performs the equals operation.

参数Parameters
名称Name类型Type说明Description
oObjecto(类型 `Object`)。The o.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/agui/model/AguiTool.java:95–103

hashCode

public int hashCode()

返回 hashCode 结果。

Returns the hash code.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/agui/model/AguiTool.java:105–108
基于官方固定版本源码静态生成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.