Skip to content

[Feature]: Add a Db2 Vector Store Implementation for Microsoft Agent Framework #6923

Description

@DhruvChaturvediIBM

Description

Db2 provides native vector capabilities, making it a suitable backend for vector search and retrieval workloads used by AI agents and Retrieval-Augmented Generation (RAG) applications.

It would be valuable to add a Db2 Vector Store integration to the Microsoft Agent Framework, enabling developers to use Db2 as a vector storage backend for embeddings, similarity search, and retrieval operations.

Proposed Feature

Introduce a Db2 Vector Store implementation that supports the framework's vector store abstractions and common operations, including:

  • Creating and managing vector collections.
  • Storing embeddings and associated metadata.
  • Performing similarity search (k-NN/vector search).
  • Updating and deleting vector records.
  • Filtering results using metadata where applicable.

Motivation

Many enterprises already use Db2 as their primary database platform. Providing a native Db2 Vector Store integration would allow developers to build AI agents without introducing an additional vector database while leveraging Db2's built-in vector capabilities.

We are interested in contributing this integration to the Microsoft Agent Framework and are open to implementing it for both the .NET (C#) and Python SDKs to provide a consistent experience across supported languages.

Before beginning development, we would appreciate feedback on whether this proposal aligns with the project's roadmap, along with any recommended architecture, extension points, or contribution guidelines that we should follow.

Code Sample

.Net

var vectorStore = new Db2VectorStore("<connection-string>");

await vectorStore.AddAsync(
    documents,
    embeddings,
    metadata);

var results = await vectorStore.SimilaritySearchAsync(
    queryEmbedding,
    top: 5);

await vectorStore.DeleteAsync(new[] { "doc-1" });



Python:

from microsoft.agents.vectorstores import Db2VectorStore

vector_store = Db2VectorStore(
    connection_string="<connection-string>"
)

await vector_store.add(
    texts=texts,
    embeddings=embeddings,
    metadata=metadata,
)

results = await vector_store.similarity_search(
    embedding=query_embedding,
    top_k=5,
)

await vector_store.delete(ids=["doc-1"])

Language/SDK

Both

Metadata

Metadata

Assignees

Labels

.NETUsage: [Issues, PRs], Target: .NetpythonUsage: [Issues, PRs], Target: Python

Fields

No fields configured for Feature.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions