pub struct LoopCheckpoint {
pub schema_version: u32,
pub run_id: String,
pub session_id: String,
pub turn: usize,
pub messages: Vec<Message>,
pub total_usage: TokenUsage,
pub tool_calls_count: usize,
pub verification_reports: Vec<VerificationReport>,
pub checkpoint_ms: u64,
}Expand description
Snapshot of the agent loop at the boundary between tool rounds.
Stored under run_id so resume tooling can address the correct run
without scanning all checkpoints of a session.
Fields§
§schema_version: u32Schema version — see LOOP_CHECKPOINT_SCHEMA_VERSION.
run_id: StringLogical run identifier. Matches the run_id carried by
crate::run::RunSnapshot and AgentEvents.
session_id: StringParent session id — redundant with run_id lookup but useful
for store layouts that key by (session_id, run_id).
turn: usize1-based tool round counter at checkpoint time.
0 is reserved for “no rounds completed yet”.
messages: Vec<Message>Conversation history including the just-returned tool results. On resume, the new agent loop starts from this exact message list.
total_usage: TokenUsageRunning token usage at checkpoint time. Lets resume re-emit progress metrics without re-querying the LLM provider.
tool_calls_count: usizeHow many tool calls have been executed total in this run.
verification_reports: Vec<VerificationReport>Verification reports collected so far in this run.
checkpoint_ms: u64Wall-clock timestamp when the checkpoint was written
(Unix epoch ms — sourced from the session’s
HostEnv).
Trait Implementations§
Source§impl Clone for LoopCheckpoint
impl Clone for LoopCheckpoint
Source§fn clone(&self) -> LoopCheckpoint
fn clone(&self) -> LoopCheckpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoopCheckpoint
impl Debug for LoopCheckpoint
Source§impl<'de> Deserialize<'de> for LoopCheckpoint
impl<'de> Deserialize<'de> for LoopCheckpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for LoopCheckpoint
impl RefUnwindSafe for LoopCheckpoint
impl Send for LoopCheckpoint
impl Sync for LoopCheckpoint
impl Unpin for LoopCheckpoint
impl UnsafeUnpin for LoopCheckpoint
impl UnwindSafe for LoopCheckpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more