cascade-agent 0.1.0

Async LLM agentic engine with tool execution, memory management, and dynamic skills
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use llm_cascade::Message;

/// Trait for conversation state that memory management can operate on.
///
/// This decouples the memory module from any specific agent state representation.
/// The agent's `ConversationState` (e.g., in `src/agent/state.rs`) implements this trait.
pub trait ConversationStateAccess {
    /// Returns the current conversation messages as a slice.
    fn messages(&self) -> &[Message];

    /// Returns a mutable reference to the messages vector for in-place compaction.
    fn messages_mut(&mut self) -> &mut Vec<Message>;

    /// Returns the system prompt string (first system message content).
    fn system_prompt(&self) -> &str;
}