Session

Trait Session 

Source
pub trait Session: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn app_name(&self) -> &str;
    fn user_id(&self) -> &str;
    fn state(&self) -> &dyn State;
    fn conversation_history(&self) -> Vec<Content>;
}
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 id(&self) -> &str

Source

fn app_name(&self) -> &str

Source

fn user_id(&self) -> &str

Source

fn state(&self) -> &dyn State

Source

fn conversation_history(&self) -> Vec<Content>

Returns the conversation history from this session as Content items

Implementors§