Skip to main content

deepstrike_sdk/
knowledge.rs

1use async_trait::async_trait;
2
3/// Inject run-scoped evidence (RAG, API responses) before the first LLM call.
4#[async_trait]
5pub trait KnowledgeSource: Send + Sync {
6    async fn retrieve(&self, goal: &str, top_k: usize) -> crate::Result<Vec<String>>;
7    /// One-time warmup called before the first run (load index, open connection, etc.).
8    async fn init(&self) -> crate::Result<()>;
9}