pub struct SessionConfig {
pub max_turns: usize,
pub rotation_threshold_pct: u8,
pub idle_timeout_secs: u64,
pub cleanup_interval_secs: u64,
pub cleanup_idle_threshold_secs: u64,
}Expand description
Session/conversation management configuration
Controls context rotation, idle timeouts, and cleanup behavior.
Can be overridden at agent or channel level using SessionConfigOverride.
Fields§
§max_turns: usizeMaximum conversation turns before context rotation.
rotation_threshold_pct: u8Rotate context when estimated token usage exceeds this percentage of model max.
idle_timeout_secs: u64Rotate context after this many seconds of inactivity.
cleanup_interval_secs: u64Interval for cleanup task to remove stale conversations (seconds).
cleanup_idle_threshold_secs: u64Remove conversations idle longer than this (seconds).
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
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 SessionConfig
impl Debug for SessionConfig
Source§impl Default for SessionConfig
impl Default for SessionConfig
Source§impl<'de> Deserialize<'de> for SessionConfig
impl<'de> Deserialize<'de> for SessionConfig
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
Source§impl PartialEq for SessionConfig
impl PartialEq for SessionConfig
Source§impl Serialize for SessionConfig
impl Serialize for SessionConfig
impl StructuralPartialEq for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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