Skip to main content

EvolutionRuntime

Trait EvolutionRuntime 

Source
pub trait EvolutionRuntime: Send + Sync {
    // Required methods
    fn feedback<'a>(
        &'a self,
        agent: &'a str,
        rating: u8,
        comment: Option<&'a str>,
    ) -> BoxFuture<'a, Result<f64>>;
    fn remember<'a>(
        &'a self,
        agent: &'a str,
        insight: &'a str,
        tags: &'a [String],
    ) -> BoxFuture<'a, Result<()>>;
    fn evolve<'a>(
        &'a self,
        agent: &'a Agent,
        context: &'a EvolutionContext,
    ) -> BoxFuture<'a, Result<String>>;
    fn rollback<'a>(
        &'a self,
        agent: &'a str,
        version: u32,
    ) -> BoxFuture<'a, Result<String>>;
}
Expand description

Persistent self-evolution primitives (Sixth Principle: persistent self-evolution).

This trait is the Phase 2 addition in the independent agent-kernel repository. Implement this trait in the product shell (e.g. OhMyZeroClaw) to wire up feedback tracking, memory storage, SOUL.md optimization, and version rollback.

Only the trait definition lives in the kernel — no implementation provided.

Required Methods§

Source

fn feedback<'a>( &'a self, agent: &'a str, rating: u8, comment: Option<&'a str>, ) -> BoxFuture<'a, Result<f64>>

Record user feedback for an agent and return the updated quality_score.

Source

fn remember<'a>( &'a self, agent: &'a str, insight: &'a str, tags: &'a [String], ) -> BoxFuture<'a, Result<()>>

Store a discussion insight into the agent’s persistent memory.

Source

fn evolve<'a>( &'a self, agent: &'a Agent, context: &'a EvolutionContext, ) -> BoxFuture<'a, Result<String>>

Evolve an agent’s SOUL.md given an EvolutionContext. Returns the new SOUL.md.

Source

fn rollback<'a>( &'a self, agent: &'a str, version: u32, ) -> BoxFuture<'a, Result<String>>

Roll back an agent’s SOUL.md to a specific version. Returns the rolled-back SOUL.md.

Implementors§