AgentStateCheckpoint class

Represents a serialized snapshot of an agent's execution state. This allows resuming interrupted sessions if the app is closed during a tool execution or long generation.

Constructors

AgentStateCheckpoint({required bool isRunning, required String currentStep, required int iterationCount, String? errorMessage, required DateTime timestamp})
Creates a new AgentStateCheckpoint.
const
AgentStateCheckpoint.fromJson(Map<String, dynamic> json)
Creates a checkpoint from a JSON map.
factory
AgentStateCheckpoint.fromJsonString(String source)
Creates a checkpoint from a JSON string.
factory

Properties

currentStep String
The description of the current step.
final
errorMessage String?
Any error message present at the time of the checkpoint.
final
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Whether the agent was running when the checkpoint was saved.
final
iterationCount int
The current iteration count in the ReAct loop.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
The timestamp of the checkpoint.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this checkpoint to a JSON map.
toJsonString() String
Returns the checkpoint as a JSON string.
toString() String
A string representation of this object.
inherited

Operators

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