WitnessAgent class
- Inheritance
-
- Object
- SpectraAgent
- WitnessAgent
Constructors
- WitnessAgent({required String id, required LLMProvider provider, required Logger logger, required OrchestratorService orchestrator, Duration timeoutThreshold = const Duration(minutes: 5)})
Properties
- currentTaskId ↔ String?
-
ID of the task currently being processed, if any.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for this agent.
finalinherited
- lastActivity ↔ DateTime
-
Timestamp of the agent's last activity.
getter/setter pairinherited
- logger → Logger
-
Logger for agent output.
finalinherited
- orchestrator → OrchestratorService
-
final
- provider → LLMProvider
-
The LLM provider used for AI-powered operations.
finalinherited
- role → AgentRole
-
The role this agent fulfills (mayor, worker, witness).
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → AgentState
-
Returns the current state of this agent as an immutable snapshot.
no setterinherited
- status ↔ AgentStatus
-
Current operational status of the agent.
getter/setter pairinherited
- timeoutThreshold → Duration
-
final
Methods
-
markActive(
) → void -
Marks the agent as active (updates lastActivity).
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
step(
) → Future< void> -
Executes a single step of the agent's main logic.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateStatus(
AgentStatus newStatus) → void -
Updates the agent's status and marks it as active.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited