Skip to main content

AgentStore

Trait AgentStore 

Source
pub trait AgentStore: Send + Sync {
    // Required method
    fn get_agent<'life0, 'async_trait>(
        &'life0 self,
        agent_id: AgentId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<AgentDefinition>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn get_agent_blocker<'life0, 'async_trait>(
        &'life0 self,
        agent_id: AgentId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<DependencyBlocker>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Narrow agent-loading seam for turn execution (EVE-872, EVE-877).

Implementations project their stored agent records into the portable AgentDefinition — the authored execution configuration. Stored Agent/AgentVersion persistence records live in everruns-platform and never cross this boundary.

Contract: records that exist but cannot execute (archived or deleted) must yield an error from AgentStore::get_agent, so lifecycle validation is enforced at the loading seam before host execution begins.

Required Methods§

Source

fn get_agent<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Option<AgentDefinition>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the portable execution definition for an agent by public id.

Provided Methods§

Source

fn get_agent_blocker<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Option<DependencyBlocker>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execution-availability probe for dependency-blocker detection.

Returns None when the agent exists and can execute. Hosted stores override this to report DependencyBlocker::AgentArchived / DependencyBlocker::AgentDeleted from the stored lifecycle status; the default treats a missing record as deleted.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: AgentStore + ?Sized> AgentStore for Arc<T>

Source§

fn get_agent<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Option<AgentDefinition>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_agent_blocker<'life0, 'async_trait>( &'life0 self, agent_id: AgentId, ) -> Pin<Box<dyn Future<Output = Result<Option<DependencyBlocker>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§