pub struct AgenticDB { /* private fields */ }Expand description
Main AgenticDB interface
Implementations§
Source§impl AgenticDB
impl AgenticDB
Sourcepub fn with_dimensions(dimensions: usize) -> Result<Self>
pub fn with_dimensions(dimensions: usize) -> Result<Self>
Create with default options
Sourcepub fn insert(&self, entry: VectorEntry) -> Result<VectorId>
pub fn insert(&self, entry: VectorEntry) -> Result<VectorId>
Insert a vector entry
Sourcepub fn insert_batch(&self, entries: Vec<VectorEntry>) -> Result<Vec<VectorId>>
pub fn insert_batch(&self, entries: Vec<VectorEntry>) -> Result<Vec<VectorId>>
Insert multiple vectors in a batch
Sourcepub fn search(&self, query: SearchQuery) -> Result<Vec<SearchResult>>
pub fn search(&self, query: SearchQuery) -> Result<Vec<SearchResult>>
Search for similar vectors
Sourcepub fn store_episode(
&self,
task: String,
actions: Vec<String>,
observations: Vec<String>,
critique: String,
) -> Result<String>
pub fn store_episode( &self, task: String, actions: Vec<String>, observations: Vec<String>, critique: String, ) -> Result<String>
Store a reflexion episode with self-critique
Sourcepub fn retrieve_similar_episodes(
&self,
query: &str,
k: usize,
) -> Result<Vec<ReflexionEpisode>>
pub fn retrieve_similar_episodes( &self, query: &str, k: usize, ) -> Result<Vec<ReflexionEpisode>>
Retrieve similar reflexion episodes
Sourcepub fn create_skill(
&self,
name: String,
description: String,
parameters: HashMap<String, String>,
examples: Vec<String>,
) -> Result<String>
pub fn create_skill( &self, name: String, description: String, parameters: HashMap<String, String>, examples: Vec<String>, ) -> Result<String>
Create a new skill in the library
Sourcepub fn search_skills(
&self,
query_description: &str,
k: usize,
) -> Result<Vec<Skill>>
pub fn search_skills( &self, query_description: &str, k: usize, ) -> Result<Vec<Skill>>
Search skills by description
Sourcepub fn auto_consolidate(
&self,
action_sequences: Vec<Vec<String>>,
success_threshold: usize,
) -> Result<Vec<String>>
pub fn auto_consolidate( &self, action_sequences: Vec<Vec<String>>, success_threshold: usize, ) -> Result<Vec<String>>
Auto-consolidate action sequences into skills
Sourcepub fn add_causal_edge(
&self,
causes: Vec<String>,
effects: Vec<String>,
confidence: f64,
context: String,
) -> Result<String>
pub fn add_causal_edge( &self, causes: Vec<String>, effects: Vec<String>, confidence: f64, context: String, ) -> Result<String>
Add a causal edge (supporting hypergraphs with multiple causes/effects)
Sourcepub fn query_with_utility(
&self,
query: &str,
k: usize,
alpha: f64,
beta: f64,
gamma: f64,
) -> Result<Vec<UtilitySearchResult>>
pub fn query_with_utility( &self, query: &str, k: usize, alpha: f64, beta: f64, gamma: f64, ) -> Result<Vec<UtilitySearchResult>>
Query with utility function: U = α·similarity + β·causal_uplift − γ·latency
Sourcepub fn start_session(
&self,
algorithm: String,
state_dim: usize,
action_dim: usize,
) -> Result<String>
pub fn start_session( &self, algorithm: String, state_dim: usize, action_dim: usize, ) -> Result<String>
Start a new learning session
Sourcepub fn add_experience(
&self,
session_id: &str,
state: Vec<f32>,
action: Vec<f32>,
reward: f64,
next_state: Vec<f32>,
done: bool,
) -> Result<()>
pub fn add_experience( &self, session_id: &str, state: Vec<f32>, action: Vec<f32>, reward: f64, next_state: Vec<f32>, done: bool, ) -> Result<()>
Add an experience to a learning session
Sourcepub fn predict_with_confidence(
&self,
session_id: &str,
state: Vec<f32>,
) -> Result<Prediction>
pub fn predict_with_confidence( &self, session_id: &str, state: Vec<f32>, ) -> Result<Prediction>
Predict action with confidence interval
Sourcepub fn get_session(&self, session_id: &str) -> Result<Option<LearningSession>>
pub fn get_session(&self, session_id: &str) -> Result<Option<LearningSession>>
Get learning session by ID
Auto Trait Implementations§
impl Freeze for AgenticDB
impl !RefUnwindSafe for AgenticDB
impl Send for AgenticDB
impl Sync for AgenticDB
impl Unpin for AgenticDB
impl !UnwindSafe for AgenticDB
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more