pub struct MemoryClient { /* private fields */ }Implementations§
Source§impl MemoryClient
impl MemoryClient
Sourcepub fn connect(base_url: impl Into<String>) -> Self
pub fn connect(base_url: impl Into<String>) -> Self
Lazy connect — no I/O until the first call.
base_url e.g. http://127.0.0.1:27697.
pub fn base_url(&self) -> &str
pub async fn health(&self) -> Result<()>
pub async fn lookup_or_create_prompt( &self, template: &str, name: &str, ) -> Result<String>
pub async fn get_prompt(&self, prompt_id: &str) -> Result<Option<PromptRecord>>
pub async fn create_agent( &self, agent_id: &str, session_id: &str, agent_idx: i64, cwd: &str, prompt_id: &str, prompt_args: &Value, system_prompt: &str, tool_definitions: &Value, request_params: &Value, model_identifier: &str, ) -> Result<()>
pub async fn get_agent(&self, agent_id: &str) -> Result<Option<AgentRecord>>
pub async fn list_agents( &self, session_id: Option<&str>, ) -> Result<Vec<AgentRecord>>
pub async fn get_max_agent_idx(&self, session_id: &str) -> Result<i64>
pub async fn add_message( &self, agent_id: &str, message: &Value, usage: Option<&Value>, ) -> Result<i64>
pub async fn load_messages(&self, agent_id: &str) -> Result<Vec<Value>>
pub async fn query_messages_by_agent( &self, agent_id: &str, order_asc: bool, limit: usize, role: Option<&str>, ) -> Result<Vec<MessageRecord>>
pub async fn search_messages( &self, query: &str, limit: usize, role: Option<&str>, ) -> Result<Vec<MessageRecord>>
pub async fn list_sessions( &self, limit: usize, offset: usize, ) -> Result<Vec<SessionInfo>>
pub async fn get_sessions_by_cwd(&self, cwd: &str) -> Result<Vec<SessionInfo>>
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryClient
impl !UnwindSafe for MemoryClient
impl Freeze for MemoryClient
impl Send for MemoryClient
impl Sync for MemoryClient
impl Unpin for MemoryClient
impl UnsafeUnpin for MemoryClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more