SubAgentExecution class
Represents the execution state of an autonomous child/sub-agent delegated by the main agent.
Constructors
-
SubAgentExecution({required String id, required String task, required int depth, required DateTime startedAt, DateTime? completedAt, String status = 'running', String? result, String? error, List<
String> ? progressUpdates, List<String> ? toolCalls}) -
SubAgentExecution.fromJson(Map<
String, dynamic> json) -
factory
Properties
- completedAt ↔ DateTime?
-
When the sub-agent completed execution, or null if still running.
getter/setter pair
- depth → int
-
Delegation recursion depth (0 = top-level agent, 1 = direct child, etc.).
final
- duration → Duration
-
no setter
- error ↔ String?
-
Error message if the sub-agent failed.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of the sub-agent execution.
final
- isCompleted → bool
-
no setter
- isFailed → bool
-
no setter
- isRunning → bool
-
no setter
-
progressUpdates
→ List<
String> -
Stream of progress notifications or milestone messages.
final
- result ↔ String?
-
Final output produced by the sub-agent.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startedAt → DateTime
-
When the sub-agent started execution.
final
- status ↔ String
-
Current execution status: 'running', 'completed', 'failed', or 'cancelled'.
getter/setter pair
- task → String
-
High-level task assigned to the sub-agent.
final
-
toolCalls
→ List<
String> -
Optional list of tool calls performed by the sub-agent.
final
Methods
-
addProgress(
String update) → void -
addToolCall(
String toolCall) → void -
complete(
String finalResult) → void -
fail(
String errorMessage) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited