State

Trait State 

Source
pub trait State: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Option<Value>;
    fn set(&mut self, key: String, value: Value);
    fn all(&self) -> HashMap<String, Value>;
}
Expand description

Core traits and types.

Always available regardless of feature flags. Includes:

  • Agent - The fundamental trait for all agents
  • Tool / Toolset - For extending agents with capabilities
  • Session / State - For managing conversation context
  • Event - For streaming agent responses
  • AdkError / Result - Unified error handling

Required Methods§

Source

fn get(&self, key: &str) -> Option<Value>

Source

fn set(&mut self, key: String, value: Value)

Source

fn all(&self) -> HashMap<String, Value>

Implementors§