Skip to main content

aither_agent/
checkpoint.rs

1//! Agent checkpoint bundles for restart-safe persistence.
2
3use serde::{Deserialize, Serialize};
4
5use crate::{ContextCheckpoint, ContextWindowSnapshot};
6
7/// Checkpoint payload exported by the agent runtime.
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[serde(deny_unknown_fields)]
10pub struct AgentCheckpoint {
11    /// Non-persistent runtime context managed by the agent.
12    pub context: ContextCheckpoint,
13    /// Hash of the active tool surface for compatibility checks.
14    pub tool_surface_hash: String,
15    /// Structured snapshot of the current context window.
16    pub context_window: ContextWindowSnapshot,
17    /// Whether background work was still active when the checkpoint was exported.
18    pub has_background_tasks: bool,
19}