Skip to main content

KnowledgeStore

Trait KnowledgeStore 

Source
pub trait KnowledgeStore: Send + Sync {
    // Required method
    fn search_knowledge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        org_id: OrgId,
        kb_public_ids: &'life1 [String],
        query: &'life2 str,
        kind: Option<&'life3 str>,
        tags: &'life4 [String],
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeSearchHit>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
}
Expand description

Org-scoped search over curated Knowledge Bases, backing the agent-facing search_knowledge tool. Implementations MUST scope to org_id and silently ignore KB ids not owned by that org (no existence leak across tenants).

Required Methods§

Source

fn search_knowledge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, org_id: OrgId, kb_public_ids: &'life1 [String], query: &'life2 str, kind: Option<&'life3 str>, tags: &'life4 [String], limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeSearchHit>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§