CommunityToolkit.Aspire.Hosting.Chroma 17.0.0-beta.1009

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Hosting.Chroma.
dotnet add package CommunityToolkit.Aspire.Hosting.Chroma --version 17.0.0-beta.1009
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Chroma -Version 17.0.0-beta.1009
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Chroma" Version="17.0.0-beta.1009" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Chroma" Version="17.0.0-beta.1009" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Chroma" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommunityToolkit.Aspire.Hosting.Chroma --version 17.0.0-beta.1009
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Chroma, 17.0.0-beta.1009"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CommunityToolkit.Aspire.Hosting.Chroma@17.0.0-beta.1009
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Chroma&version=17.0.0-beta.1009&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Chroma&version=17.0.0-beta.1009&prerelease
                    
Install as a Cake Tool

CommunityToolkit.Aspire.Hosting.Chroma

Provides extension methods for adding a ChromaDB resource to an Aspire application model. The resource runs the chromadb/chroma container image, with a health check on the /api/v2/heartbeat endpoint.

Installation

dotnet add package CommunityToolkit.Aspire.Hosting.Chroma

Usage

In your AppHost's Program.cs:

var builder = DistributedApplication.CreateBuilder(args);

var chroma = builder.AddChroma("chroma");

builder.AddProject<Projects.MyWebApp>("mywebapp")
       .WithReference(chroma);

builder.Build().Run();

AddChroma("chroma") adds a container resource named chroma, with the HTTP endpoint http on port 8000 of the container. The port on the host changes at each run; AddChroma("chroma", port: 8000) sets it. A resource that references it gets the connection string ConnectionStrings__chroma, Endpoint=http://{host}:{port}, and the variables CHROMA_HOST, CHROMA_PORT and CHROMA_URI: the values of the Host, Port and UriExpression properties of the resource.

TypeScript AppHost

import { createBuilder } from "./.aspire/modules/aspire.mjs";

const builder = await createBuilder();

const chroma = await builder.addChroma("chroma", { port: 8000 });
await chroma.withDataVolume({ name: "chroma-data" });

await builder.build().run();

withDataBindMount(source) adds a bind mount, and host(), port() and uriExpression() give the connection properties.

Chroma versions

The default image is chromadb/chroma:1.5.9. WithImageTag picks another one, from Chroma 0.5.16: the health check calls /api/v2/heartbeat, which older images answer with 404, so their resource never becomes healthy.

Persistence

You can configure persistence using either a Docker volume:

var chroma = builder.AddChroma("chroma")
                    .WithDataVolume();

or a bind mount:

var chroma = builder.AddChroma("chroma")
                    .WithDataBindMount("C:/chroma/data");

Logs

While the AppHost runs, the resource sets CHROMA_STDOUT_TRACING to true, so Chroma writes the requests it serves to its log, which the dashboard shows. A published app does not get the variable. To turn the request logs off:

var chroma = builder.AddChroma("chroma")
                    .WithEnvironment("CHROMA_STDOUT_TRACING", "false");

Known limitations

The integration does not send the telemetry of the Chroma server to the dashboard. Chroma 1.5.9 sends its OTLP traces as gRPC without TLS, also to an https:// endpoint like the default one of the dashboard.

In Docker Compose, WaitFor(chroma) waits until the Chroma container has started, not until Chroma answers: the publisher of Aspire gives the waiting service condition: service_started and does not turn the HTTP health check into a Compose healthcheck.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
17.0.0-beta.1009 0 11/5/2026
17.0.0-beta.994 48 11/4/2026
17.0.0-beta.993 50 11/4/2026