pub struct AgentContext {
pub segments: Vec<(String, String)>,
pub tokens_used: u64,
}Expand description
Token-budgeted context passed to the delegate alongside the task spec.
Free-form fields so different agents can lift what they need — keys
like "memory_facts", "recent_episodes", "project_conventions".
Fields§
§segments: Vec<(String, String)>Human-readable context segments (key → content), already truncated by the caller to fit the agent’s context window.
tokens_used: u64Approximate token count used by the caller’s budget tracker.
Implementations§
Trait Implementations§
Source§impl Clone for AgentContext
impl Clone for AgentContext
Source§impl Debug for AgentContext
impl Debug for AgentContext
Source§impl Default for AgentContext
impl Default for AgentContext
Source§impl<'de> Deserialize<'de> for AgentContext
impl<'de> Deserialize<'de> for AgentContext
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 AgentContext
impl RefUnwindSafe for AgentContext
impl Send for AgentContext
impl Sync for AgentContext
impl Unpin for AgentContext
impl UnsafeUnpin for AgentContext
impl UnwindSafe for AgentContext
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