Skip to content
Docs Try Aspire
Docs Try

Get started with the flagd integrations

⭐ Community Toolkit flagd logo

flagd is a feature flag evaluation engine that provides an OpenFeature-compliant backend for managing and evaluating feature flags in real-time. The Aspire flagd integration lets you model a flagd server as a first-class resource in your AppHost, then hand the connection information to any consuming app — regardless of language.

Adding flagd through Aspire — rather than wiring up containers and connection strings by hand — gives you:

  • Zero-config local development. Aspire runs flagd from the ghcr.io/open-feature/flagd container image with no manual container management required.
  • Consistent connection info across languages. Once you reference the flagd resource from a consuming app, Aspire injects connection properties as environment variables in a predictable format that works from C#, TypeScript, Python, Go, or any other language.
  • Built-in health checks. The hosting integration automatically registers a health check against the flagd /healthz endpoint so the dashboard and your orchestrator can tell when the server is ready.
  • Dashboard observability. The flagd resource shows up in the Aspire dashboard with logs and status alongside your other services.
  • Multi-language OpenFeature clients. Any OpenFeature-compatible SDK with a flagd provider — C#, Go, Python, or TypeScript — works with the injected connection information.

The flagd integration has two sides: a hosting integration that you use in your AppHost to model the flagd resource, and a connection story for consuming apps that reference it.

architecture-beta

  group apphost(server)[AppHost]
  group consumer(server)[Consuming app]

  service hosting(server)[Hosting integration] in apphost
  service flagd(server)[flagd server] in apphost

  service app(server)[App] in consumer

  hosting:R --> L:flagd
  flagd:R --> L:app

The hosting integration lives in your AppHost project and models the flagd server as a resource. Consuming apps reference it and use the connection information Aspire injects to evaluate feature flags via the OpenFeature SDK.

Getting there is a two-step process: model the flagd resource in your AppHost, then connect to it from each app that needs it.

  1. Add the flagd hosting integration to your AppHost, then declare a flagd resource and reference it from the apps that need feature flags. The flagd Hosting integration article walks through every capability — file-based flag sync, port customization, log levels, and health checks.

    Set up flagd in the AppHost

  2. When you reference a flagd resource from a consuming app, Aspire injects its connection information as environment variables. See Connect to flagd for the connection properties reference and per-language examples for C#, Go, Python, and TypeScript — using the OpenFeature SDK and flagd providers.

    Connect to flagd