Skip to main content

LoopMemoryStore

Trait LoopMemoryStore 

Source
pub trait LoopMemoryStore: Send + Sync {
    // Required methods
    fn read_notes(&self) -> Result<String>;
    fn write_note(&self, note: &str) -> Result<()>;
    fn read_decisions(&self) -> Result<String>;
    fn write_decision(&self, decision: &str) -> Result<()>;
}
Expand description

A trait for persisting loop-level memory across runs. Implementations may store notes and decisions in markdown, a database, or any other durable form.

Required Methods§

Source

fn read_notes(&self) -> Result<String>

Read all accumulated notes.

Source

fn write_note(&self, note: &str) -> Result<()>

Append a note. Notes are agent-written, human-readable, append-only.

Source

fn read_decisions(&self) -> Result<String>

Read all accumulated decisions.

Source

fn write_decision(&self, decision: &str) -> Result<()>

Append a decision entry. Decisions are the agent’s choices that should survive across loop iterations.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl LoopMemoryStore for MarkdownLoopMemory

Source§

impl LoopMemoryStore for SqliteLoopMemory

Available on crate feature sqlite only.