Skip to main content

AgentStoreApi

Trait AgentStoreApi 

Source
pub trait AgentStoreApi: Send + Sync {
    // Required methods
    fn create(&self, record: AgentRecord) -> Result<AgentRecord>;
    fn get(&self, agent_id: &str) -> Option<AgentRecord>;
    fn list(&self) -> Vec<AgentRecord>;
    fn update(
        &self,
        agent_id: &str,
        update: AgentUpdate,
    ) -> Result<Option<AgentRecord>>;
    fn delete(&self, agent_id: &str) -> Result<bool>;
    fn set_status(&self, agent_id: &str, status: AgentStatus) -> Result<bool>;
    fn count(&self) -> usize;
}
Expand description

Trait for persistent agent CRUD operations.

Implemented by AgentStore in agentzero-orchestrator. Used by AgentManageTool in agentzero-infra to avoid a circular crate dependency.

Required Methods§

Source

fn create(&self, record: AgentRecord) -> Result<AgentRecord>

Source

fn get(&self, agent_id: &str) -> Option<AgentRecord>

Source

fn list(&self) -> Vec<AgentRecord>

Source

fn update( &self, agent_id: &str, update: AgentUpdate, ) -> Result<Option<AgentRecord>>

Source

fn delete(&self, agent_id: &str) -> Result<bool>

Source

fn set_status(&self, agent_id: &str, status: AgentStatus) -> Result<bool>

Source

fn count(&self) -> usize

Implementors§