Rediger

Vector store integrations

Vector stores keep data and its vector embeddings together so applications can find records by semantic similarity. In Agent Framework applications, you can use vector stores to retrieve grounding data for Retrieval Augmented Generation (RAG) or to store information that an agent can recall later.

Vector store abstractions provide common operations for collections and records, keeping your application logic separated from the specific vector store implementation. You can, for example, start with a local implementation and switch to a managed service with minimal changes.

How vector store integrations work

A typical vector store workflow includes these steps:

  1. Define a data model that identifies the record key, data fields, and vector fields.
  2. Configure an embedding generator if the vector store doesn't generate embeddings.
  3. Connect to a vector store and select or create a collection.
  4. Generate embeddings and upsert records into the collection.
  5. Search the collection with text or a vector, depending on the implementation's capabilities.
  6. Pass relevant search results to an agent as context or expose search as an agent tool.

.NET vector store support

Agent Framework uses the .NET AI ecosystem's standalone abstractions:

Where an Agent Framework component accepts a vector store, you can supply a compatible Microsoft.Extensions.VectorData implementation. Each database implementation is distributed separately from the abstractions package.

Core abstractions

Abstraction Purpose
VectorStore Provides operations across collections and creates typed collection instances.
VectorStoreCollection<TKey, TRecord> Creates or deletes a collection and upserts, retrieves, or deletes its records.
IVectorSearchable<TRecord> Searches records by vector or by text when an embedding generator or database-side embedding capability is available.

Available vector store implementations

The following implementations use the common .NET vector store abstractions. Review each implementation's documentation for package versions, supported data types, and service-specific limitations.

Implementation Availability Uses an officially supported database SDK Maintainer or vendor
Azure AI Search Available Yes Microsoft
Azure Cosmos DB for MongoDB vCore Available Yes Microsoft
Azure Cosmos DB for NoSQL Available Yes Microsoft
Couchbase Available Yes Couchbase
Elasticsearch Available Yes Elastic
Chroma Planned Not applicable Not applicable
In-memory Available Not applicable Microsoft
Milvus Planned Not applicable Not applicable
MongoDB Available Yes Microsoft
Neon Serverless Postgres Use the Postgres implementation Yes Microsoft
Oracle Available Yes Oracle
Pinecone Available No Microsoft
Postgres Available Yes Microsoft
Qdrant Available Yes Microsoft
Redis Available Yes Microsoft
SQL Server Available Yes Microsoft
SQLite Available Yes Microsoft
Volatile in-memory Deprecated; use the in-memory implementation Not applicable Microsoft
Weaviate Available Yes Microsoft

Important

Vector store implementations come from multiple maintainers. Evaluate each implementation's quality, licensing, support policy, and version compatibility before you use it. Some implementations use database SDKs that the database provider doesn't officially support.

Get started

  1. Add the Microsoft.Extensions.VectorData.Abstractions package and the package for your chosen vector store implementation.
  2. Define a record type and identify its key, data, and vector properties.
  3. Configure an IEmbeddingGenerator if your implementation requires application-generated embeddings.
  4. Create the implementation's VectorStore, and then get a typed VectorStoreCollection<TKey, TRecord>.
  5. Ensure that the collection exists, upsert records, and call SearchAsync with text or a vector.

For a complete introduction to data models, ingestion, embeddings, and search, see Vector databases for .NET AI apps.

Python vector store support

Agent Framework uses the vector store abstractions and implementations from Semantic Kernel for Python. Semantic Kernel collections provide common operations for creating collections, upserting and retrieving records, and running vector, keyword, or hybrid searches when the selected implementation supports them.

Warning

Semantic Kernel Vector Store functionality for Python is a release candidate. Limited breaking changes might occur before general availability.

Available vector store implementations

Implementation Availability Uses an officially supported database SDK Maintainer or vendor
Azure AI Search Available Yes Microsoft Semantic Kernel project
Azure Cosmos DB for MongoDB vCore Available Yes Microsoft Semantic Kernel project
Azure Cosmos DB for NoSQL Available Yes Microsoft Semantic Kernel project
Chroma Available Yes Microsoft Semantic Kernel project
Elasticsearch Planned Not applicable Not applicable
Faiss Available Yes Microsoft Semantic Kernel project
In-memory Available Not applicable Microsoft Semantic Kernel project
MongoDB Available Yes Microsoft Semantic Kernel project
Neon Serverless Postgres Use the Postgres implementation Yes Microsoft Semantic Kernel project
Oracle Available Yes Oracle
Pinecone Available Yes Microsoft Semantic Kernel project
Postgres Available Yes Microsoft Semantic Kernel project
Qdrant Available Yes Microsoft Semantic Kernel project
Redis Available Yes Microsoft Semantic Kernel project
SQL Server Available pyodbc Microsoft Semantic Kernel project
SQLite Planned Not applicable Microsoft Semantic Kernel project
Weaviate Available Yes Microsoft Semantic Kernel project

Important

Vector store implementations come from multiple maintainers. Evaluate each implementation's quality, licensing, support policy, and version compatibility before you use it.

Get started

  1. Install semantic-kernel and the dependencies required by your chosen implementation.
  2. Define a model with the @vectorstoremodel decorator and identify its key, data, and vector fields.
  3. Create an implementation-specific collection for that model.
  4. Ensure that the collection exists, and then upsert records.
  5. Use the collection's search APIs to retrieve records for your application.

For implementation setup and complete examples, see Semantic Kernel Vector Stores.

Go vector store support

Vector store integration isn't yet available in Agent Framework for Go. See the Agent Framework Go repository for the latest status.

Next steps