Expand description
§daimon-plugin-opensearch
An OpenSearch k-NN backed VectorStore plugin
for the Daimon AI agent framework.
This crate provides OpenSearchVectorStore, which stores document
embeddings in OpenSearch using its native
k-NN plugin.
It supports cosine similarity, L2 (euclidean), and inner product distance
metrics with HNSW indexing via nmslib, faiss, or lucene engines.
§Quick Start
ⓘ
use daimon_plugin_opensearch::{OpenSearchVectorStoreBuilder, SpaceType, Engine};
use daimon::retriever::SimpleKnowledgeBase;
use std::sync::Arc;
let store = OpenSearchVectorStoreBuilder::new("http://localhost:9200", 1536)
.index("my_docs")
.space_type(SpaceType::CosineSimilarity)
.engine(Engine::Lucene)
.build()
.await?;
// Compose with an embedding model for a full RAG pipeline:
let kb = SimpleKnowledgeBase::new(embedding_model, store);§Manual Index Setup
If you prefer to manage index creation yourself, disable auto-creation
and use the JSON from index_settings:
ⓘ
let store = OpenSearchVectorStoreBuilder::new(url, 1536)
.auto_create_index(false)
.build()
.await?;§AWS OpenSearch Service
Enable the aws-auth feature for SigV4 authentication:
daimon-plugin-opensearch = { version = "0.15", features = ["aws-auth"] }Modules§
- index_
settings - Index creation JSON for manual setup.
Structs§
- Open
Search Vector Store - A
VectorStorebacked by OpenSearch with the k-NN plugin. - Open
Search Vector Store Builder - Builds an
OpenSearchVectorStorewith optional auto-index-creation.