TaskAgentTool class

Tool adapter for a sub-agent configured with mode: 'task'.

Inheritance

Constructors

TaskAgentTool({required BaseAgent agent, bool skipSummarization = false, bool includePlugins = true, bool propagateGroundingMetadata = false})
Creates a framework delegation marker for a task-mode agent.

Properties

agent BaseAgent
Agent invoked by this tool.
finalinherited
customMetadata Map<String, dynamic>?
Arbitrary metadata attached to this tool declaration.
getter/setter pairinherited
defersResponse bool
Whether response event creation is handled by framework code elsewhere.
getter/setter pairinherited
description String
Human-readable purpose text shown to the model.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
includePlugins bool
Whether parent runner plugins are inherited by the child runner.
finalinherited
isLongRunning bool
Whether the tool can outlive a single response turn.
getter/setter pairinherited
name String
Unique tool name used in function-calling payloads.
getter/setter pairinherited
propagateGroundingMetadata bool
Whether child grounding metadata is made available to the parent response.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipSummarization bool
Whether model-side summarization is skipped after tool execution.
finalinherited

Methods

detectErrorInResponse(Object? response) String?
Returns a telemetry error type when response represents a tool error.
inherited
getDeclaration() FunctionDeclaration?
Returns the function declaration exposed to the model, if any.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processLlmRequest({required ToolContext toolContext, required LlmRequest llmRequest}) Future<void>
Mutates outgoing llmRequest before model generation.
inherited
run({required Map<String, dynamic> args, required ToolContext toolContext}) Future<Object?>
Executes the tool and returns a JSON-like response payload.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited