Vector Store DSL
Integrate vector stores with your agents.
Qdrantβ
vectorStore("knowledge") {
provider("qdrant")
connection("localhost", 6333)
apiKey("your-api-key")
collection("documents")
vectorSize(384)
}
Pineconeβ
vectorStore("embeddings") {
provider("pinecone")
connection("api.pinecone.io", 443)
apiKey("pinecone-key")
collection("vectors")
vectorSize(1536)
}
Automatic Search Toolβ
When you add a vector store, Spice automatically creates a search tool:
buildAgent {
vectorStore("docs") {
provider("qdrant")
connection("localhost", 6333)
}
handle { comm ->
// Auto-generated "search-docs" tool available
val result = run("search-docs", mapOf(
"query" to comm.content,
"topK" to 5
))
comm.reply(result.result, id)
}
}