AgentLifecycle class

Callbacks for sub-agent lifecycle events.

Sub-agents are forked conversations that run in parallel.

Constructors

AgentLifecycle({Future<void> onAgentSpawned(AgentSpawnedEvent event)?, Future<void> onAgentMessage(AgentMessageEvent event)?, Future<void> onAgentCompleted(AgentCompletedEvent event)?, Future<void> onAgentError(AgentErrorEvent event)?, Future<void> onAgentTimeout(AgentTimeoutEvent event)?})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
onAgentCompleted Future<void> Function(AgentCompletedEvent event)?
Fired when a sub-agent completes its task.
final
onAgentError Future<void> Function(AgentErrorEvent event)?
Fired when a sub-agent encounters an error.
final
onAgentMessage Future<void> Function(AgentMessageEvent event)?
Fired when a sub-agent sends a message or update.
final
onAgentSpawned Future<void> Function(AgentSpawnedEvent event)?
Fired when a sub-agent is spawned.
final
onAgentTimeout Future<void> Function(AgentTimeoutEvent event)?
Fired when a sub-agent times out.
final
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
toString() String
A string representation of this object.
inherited

Operators

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