AgentCoordinator class
Coordinates multiple VanturaAgents, allowing them to hand off the conversation to each other based on user needs.
The AgentCoordinator acts as a router, managing which agent is currently handling the interaction and facilitating transfers between agents via a built-in transfer tool.
Constructors
-
AgentCoordinator(List<
VanturaAgent> agentList) - Creates a coordinator with a list of agents. The first agent in the list is set as the initial default/active agent.
Properties
- activeAgent ↔ VanturaAgent
-
The agent currently responsible for processing user requests.
getter/setter pair
-
agents
→ Map<
String, VanturaAgent> -
Map of all available agents, indexed by their VanturaAgent.name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
String prompt, {CancellationToken? cancellationToken}) → Future< VanturaResponse> - Runs the overall system, routing through agents as needed.
-
runStreaming(
String prompt, {CancellationToken? cancellationToken}) → Stream< VanturaResponse> - Streams the overall system execution.
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerHandoff(
String targetAgentName) → void -
Triggers a handoff to the
targetAgentName. The transfer will take effect on the NEXT run or iteration.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited