Chroma is one of the most used open source vector databases for semantic search and for RAG, that is, for giving a language model the right documents to answer from. From Python it takes two lines.

For .NET, in February 2025 Microsoft introduced the community library ChromaDB.Client on the .NET Blog (archived copy, Chinese edition). That post is no longer on the English blog, and the library has stopped: it is still on the v1 API, which Chroma 1.x no longer serves.

ChromaDotNet exists for this reason: it picks up that work where it stopped and carries it on, with the original code and its authors in the history of the project:

chromadotnet.org

What's inside

  • ChromaDotNet.Client: a client for the whole Chroma v2 API, Chroma Cloud included, tested with Chroma 0.4.10 to 1.5.9. It runs on .NET 8 and later, .NET 10 included, on .NET Framework 4.6.2 and on .NET Standard 2.0 platforms, with OpenTelemetry traces and metrics.
  • ChromaDotNet.VectorData: a provider for Microsoft.Extensions.VectorData, the abstractions that Semantic Kernel and Microsoft Agent Framework use. With Chroma as the vector store, the application code stays the same.
  • ChromaDotNet.Testcontainers: a module for Testcontainers for .NET, to start a throwaway Chroma in your tests.
  • ChromaDotNet.Aspire.Hosting and ChromaDotNet.Aspire.Client: the Aspire integrations, with Chroma in the app host and the client in the services.
  • Two sample repositories, for Semantic Kernel, with Azure OpenAI, and for Agent Framework, with Microsoft Foundry; the chat samples also run locally with Ollama.

Try it in two minutes

Docker starts Chroma:

docker run -p 8000:8000 chromadb/chroma:1.5.9

Then, in a .NET console app:

dotnet add package ChromaDotNet.Client
using ChromaDB.Client;

using var client = new ChromaClient("http://localhost:8000");
var collection = await client.GetOrCreateCollectionAsync("docs");
var docs = client.GetCollectionClient(collection);

await docs.AddAsync(["doc-1"],
    embeddings: [new([0.1f, 0.4f, 0.2f])],
    documents: ["Chroma from .NET"]);

var results = await docs.QueryAsync(
    new ReadOnlyMemory<float>([0.1f, 0.4f, 0.2f]), nResults: 1);

Console.WriteLine(results[0].Document);

The embeddings are written by hand here to keep the example short: in a real project they come from a model, for example through Microsoft.Extensions.AI.

Why

More and more .NET applications have an AI part, and almost all of them need a vector store. Chroma starts locally in a container and scales on Chroma Cloud, but without an up-to-date client it was out of reach from .NET. Each library is tested in CI against real Chroma releases, and the provider runs the Microsoft.Extensions.VectorData conformance tests.

It is a community project, MIT licensed, not affiliated with Chroma. If you try it and something does not work, open an issue on GitHub.