Class TaskTool
java.lang.Object
com.alibaba.cloud.ai.graph.agent.tools.task.TaskTool
- All Implemented Interfaces:
BiFunction<TaskTool.Request,org.springframework.ai.chat.model.ToolContext, String>
public class TaskTool
extends Object
implements BiFunction<TaskTool.Request,org.springframework.ai.chat.model.ToolContext,String>
Tool that enables invoking sub-agents to handle complex, isolated tasks.
Inspired by spring ai TaskTool, this allows the main agent to delegate work to specialized sub-agents, each with their own context and capabilities. Supports both synchronous and background execution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordRequest structure for the Task tool. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(TaskTool.Request request, org.springframework.ai.chat.model.ToolContext toolContext) static TaskTool.Builderbuilder()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
DEFAULT_DESCRIPTION
- See Also:
-
-
Constructor Details
-
TaskTool
-
-
Method Details
-
apply
public String apply(TaskTool.Request request, org.springframework.ai.chat.model.ToolContext toolContext) - Specified by:
applyin interfaceBiFunction<TaskTool.Request,org.springframework.ai.chat.model.ToolContext, String>
-
builder
-