ChromaDotNet

.NET client and libraries for Chroma and Chroma Cloud

A client for the Chroma API, a Microsoft.Extensions.VectorData provider, a Testcontainers module, Aspire integrations, Chroma without Docker, and the default embedding function of Chroma. We test the client with Chroma 0.4.10 to 1.5.9 and with Chroma Cloud: see the compatibility table.

Independent project. Not affiliated with, endorsed by or sponsored by Chroma Inc. CHROMA is a registered trademark of Chroma Inc., used here only to describe compatibility.

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);

The packages are named ChromaDotNet.*. The namespaces keep their original names, such as ChromaDB.Client.

Try it in your browser: a GitHub Codespace with .NET and Chroma, then dotnet run Samples/quickstart.cs.

Used by

On the way

  • Semantic Kernel samplesProposed. Chroma in the multi-store vector search sample and in the VectorStoreRAG demo of Semantic Kernel, through CommunityToolkit.VectorData.Chroma.
  • Semantic Kernel documentation, hybrid searchProposed. Hybrid search and two limitations on the C# page of the Chroma connector.
  • awesome-dotnetProposed. ChromaDotNet.Client in the list of .NET libraries.
  • Microsoft Agent Framework samplesRequested. A sample that keeps the chat history of an agent in Chroma, through CommunityToolkit.VectorData.Chroma.
  • Chroma documentationProposed. Semantic Kernel and Agent Framework pages for .NET, through CommunityToolkit.VectorData.Chroma.
  • Chroma referenceProposed. ChromaDotNet.Client in the list of the community SDKs of the Chroma reference.

Libraries

ChromaDotNet.Client is the .NET client for Chroma. The Microsoft.Extensions.VectorData provider and the Aspire client integration are built on it.

ChromaDotNet.Client

The client covers every operation in the Chroma v2 API, including Chroma Cloud. It runs on .NET 8 and later (including .NET 10), .NET Framework 4.6.2 and .NET Standard 2.0 platforms. For dependency injection, use ChromaDotNet.Client.DependencyInjection.

dotnet add package ChromaDotNet.Client

CommunityToolkit.VectorData.Chroma

The Chroma provider for Microsoft.Extensions.VectorData, in the AI Community Toolkit of the .NET Foundation. Use it with Semantic Kernel, Agent Framework or any code written against the abstractions. It supports hybrid search on Chroma Cloud. Recommended by Semantic Kernel and listed among the .NET community projects of Microsoft Agent Framework.

dotnet add package CommunityToolkit.VectorData.Chroma --prerelease

ChromaDotNet.Local

Chroma on your machine, without Docker and without Python. It starts the Chroma executable as a child process of your app, and stops it when the app ends. Windows, Linux and macOS. ChromaDotNet.Local.ChromaDB brings Chroma 1.5.9 with the executables of every platform; with the property ChromaDotNetLocalChromaDBDownload, the first start downloads the one of its platform instead. Preview.

dotnet add package ChromaDotNet.Local.ChromaDB --prerelease

ChromaDotNet.Embeddings

The default embedding function of Chroma for .NET: all-MiniLM-L6-v2, with the same vectors as the Python client. Give it to ChromaDotNet.Client, and add or query records by their text. It also computes the hosted functions of Chroma Cloud, Qwen3-Embedding and SPLADE, on your machine. Preview.

dotnet add package ChromaDotNet.Embeddings --prerelease

ChromaDotNet.Testcontainers

A Testcontainers for .NET module. It gives your tests a throwaway Chroma container.

dotnet add package ChromaDotNet.Testcontainers

CommunityToolkit.Aspire.Chroma

Aspire integrations, in the Aspire Community Toolkit. Add Chroma to the app host and the client to your services, with health checks, traces and metrics. Beta. Until Aspire 17 is on NuGet, use ChromaDotNet.Aspire.Hosting 0.2.10 in the AppHost.

dotnet add package CommunityToolkit.Aspire.Chroma --prerelease
dotnet add package ChromaDotNet.Aspire.Hosting --version 0.2.10

ChromaDB.Operator

A Kubernetes operator for Chroma 1.x, single-node and distributed, and for VecturaDB single-node. It creates the volume, the Pod and the Service of each Chroma, and gives its address when it is ready.

kubectl apply -f https://github.com/ChromaDotNet/ChromaDB.Operator/releases/latest/download/chroma-operator.yaml

Samples

The Semantic Kernel samples run with Azure OpenAI. The Agent Framework samples run with Microsoft Foundry. The chat samples also run locally with Ollama.

  • Semantic KernelVector search and an agent that answers from documents stored in Chroma.
  • Microsoft Agent FrameworkChat history kept in Chroma, and an agent that answers from documentation stored there.

About

ChromaDotNet is an independent community project that provides .NET libraries and tools for Chroma. Independent project. Not affiliated with, endorsed by or sponsored by Chroma Inc. CHROMA is a registered trademark of Chroma Inc., used here only to describe compatibility. We use the name "Chroma" only to say which software our projects work with. It does not mean that Chroma Inc. made, approved or supports them.