Class AguiToolConverter
java.lang.Object
io.agentscope.core.agui.converter.AguiToolConverter
Converter between AG-UI tools and AgentScope tool schemas.
This class handles the bidirectional conversion between the AG-UI protocol's tool format and AgentScope's internal ToolSchema format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoAguiTool(io.agentscope.core.model.ToolSchema schema) Convert an AgentScope ToolSchema to an AG-UI tool.toAguiToolList(List<io.agentscope.core.model.ToolSchema> schemas) Convert a list of AgentScope ToolSchemas to AG-UI tools.io.agentscope.core.model.ToolSchematoToolSchema(AguiTool aguiTool) Convert an AG-UI tool to an AgentScope ToolSchema.List<io.agentscope.core.model.ToolSchema> toToolSchemaList(List<AguiTool> aguiTools) Convert a list of AG-UI tools to AgentScope ToolSchemas.
-
Constructor Details
-
AguiToolConverter
public AguiToolConverter()
-
-
Method Details
-
toToolSchema
Convert an AG-UI tool to an AgentScope ToolSchema.- Parameters:
aguiTool- The AG-UI tool to convert- Returns:
- The converted ToolSchema
-
toAguiTool
Convert an AgentScope ToolSchema to an AG-UI tool.- Parameters:
schema- The AgentScope ToolSchema to convert- Returns:
- The converted AG-UI tool
-
toToolSchemaList
Convert a list of AG-UI tools to AgentScope ToolSchemas.- Parameters:
aguiTools- The AG-UI tools to convert- Returns:
- The converted ToolSchemas
-
toAguiToolList
Convert a list of AgentScope ToolSchemas to AG-UI tools.- Parameters:
schemas- The AgentScope ToolSchemas to convert- Returns:
- The converted AG-UI tools
-