pub struct PersistedAgentContext {
pub version: u32,
pub agent_type: String,
pub saved_at: DateTime<Utc>,
pub config: Option<AgentConfig>,
pub conversation_history: Vec<LlmMessage>,
pub execution_context: Option<AgentExecutionContext>,
}Expand description
A versioned, serializable snapshot of an agent’s context
Fields§
§version: u32Snapshot version for forward compatibility
agent_type: StringImplementation identifier (e.g., “coro_agent”)
saved_at: DateTime<Utc>When this snapshot was saved
config: Option<AgentConfig>Optional agent configuration captured at the time of saving
conversation_history: Vec<LlmMessage>Full conversation message history (including system/user/assistant/tool)
execution_context: Option<AgentExecutionContext>Execution context: goal, current task, token usage, etc.
Implementations§
Source§impl PersistedAgentContext
impl PersistedAgentContext
Sourcepub fn new(
agent_type: String,
config: Option<AgentConfig>,
conversation_history: Vec<LlmMessage>,
execution_context: Option<AgentExecutionContext>,
) -> Self
pub fn new( agent_type: String, config: Option<AgentConfig>, conversation_history: Vec<LlmMessage>, execution_context: Option<AgentExecutionContext>, ) -> Self
Create a new snapshot
Trait Implementations§
Source§impl Clone for PersistedAgentContext
impl Clone for PersistedAgentContext
Source§fn clone(&self) -> PersistedAgentContext
fn clone(&self) -> PersistedAgentContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersistedAgentContext
impl Debug for PersistedAgentContext
Source§impl<'de> Deserialize<'de> for PersistedAgentContext
impl<'de> Deserialize<'de> for PersistedAgentContext
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PersistedAgentContext
impl RefUnwindSafe for PersistedAgentContext
impl Send for PersistedAgentContext
impl Sync for PersistedAgentContext
impl Unpin for PersistedAgentContext
impl UnwindSafe for PersistedAgentContext
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
Mutably borrows from an owned value. Read more