English
Ship Features Safely. Experiment Confidently.
The first Kotlin-native feature flag platform: type-safe, coroutine-first flags and experimentation; optional Smart Rollout and anomaly detection (Enterprise).
Quick Start β’ Documentation β’ Why Flagent β’ Features β’ SDKs β’ Use Cases β’ Pricing & editions β’ Enterprise β’ Roadmap β’ Blog
Flagent is a modern, production-ready feature flag and experimentation platform built with Kotlin/Ktor. The first Kotlin-native solution in the feature flags ecosystem, combining type-safety, coroutines, and clean architecture for high-performance feature management. Enterprise build adds multi-tenancy, SSO, RBAC, Smart Rollout and anomaly detection.
Problem -> Solution: Teams need to ship features safely, run A/B tests, and roll back instantly without redeploys. Flagent gives you feature flags, experiments, gradual rollouts, kill switches, and optional crash-by-flag analytics in one self-hosted or (planned) cloud platform β with Kotlin-native SDKs and a single UI.
Full landing (product overview, pricing, CTA): When running Flagent with the marketing landing enabled (ENV_SHOW_LANDING=true), open the app root (e.g. http://localhost:18000). See also Documentation and Pricing & editions.
Project status: Flagent is in active development; we ship updates regularly. Flagent Cloud (SaaS) is planned but not yet launched. We welcome sponsors and community support β see Roadmap.
- Industry-Standard Evaluation API - Easy migration from existing feature flag solutions
- Type-Safe SDKs - Compile-time validation and IDE autocomplete
- Coroutine-First - Non-blocking I/O and structured concurrency
- Ktor Ecosystem - Seamless integration with Ktor applications
- Clean Architecture - DDD principles and testable design
- Smart Rollout - Configurable automated gradual rollouts (metrics-based; Enterprise).
- Anomaly Detection - Alerts and optional rollback on degradation (Enterprise).
- Roadmap: Predictive targeting, A/B insights, ML-based automation.
- Extensive test coverage - 200+ test files
- High Performance - Low latency evaluation, load-tested (see docs/performance/benchmarks.md)
- Multi-Tenancy - Isolated environments for teams (Enterprise)
- Real-Time Updates - SSE in Kotlin Enhanced, Go Enhanced
Get Flagent running in under 5 minutes:
docker pull ghcr.io/maxluxs/flagent
docker run -d --name flagent -p 18000:18000 \
-e FLAGENT_DB_DBDRIVER="sqlite3" \
-e FLAGENT_DB_DBCONNECTIONSTR=":memory:" \
-e FLAGENT_ADMIN_EMAIL="admin@local" \
-e FLAGENT_ADMIN_PASSWORD="admin" \
-e FLAGENT_JWT_AUTH_SECRET="dev-secret-at-least-32-characters-long" \
ghcr.io/maxluxs/flagent
# Open Flagent UI
open http://localhost:18000Default credentials: admin@local / admin
docker run -d --name flagent -p 18000:18000 \
-v flagent-db:/data \
-e FLAGENT_DB_DBDRIVER="sqlite3" \
-e FLAGENT_DB_DBCONNECTIONSTR="/data/flagent.sqlite" \
-e FLAGENT_ADMIN_EMAIL="admin@local" \
-e FLAGENT_ADMIN_PASSWORD="admin" \
-e FLAGENT_JWT_AUTH_SECRET="dev-secret-at-least-32-characters-long" \
ghcr.io/maxluxs/flagent
# Open Flagent UI
open http://localhost:18000Data persists in the flagent-db volume across container restarts.
git clone https://github.com/MaxLuxs/Flagent.git
cd Flagent
docker compose up -d
# Open Flagent UI
open http://localhost:18000See docker-compose.yml for PostgreSQL setup.
| Dashboard | Flags list | Debug Console |
|---|---|---|
![]() |
![]() |
![]() |
| Experiments (A/B) | Create Flag | Pricing |
![]() |
![]() |
![]() |
Database Configuration (required):
FLAGENT_DB_DBDRIVER- Database driver:sqlite3,postgres,mysql(default:sqlite3)FLAGENT_DB_DBCONNECTIONSTR- Connection string:- SQLite file:
/data/flagent.sqliteor./flagent.sqlite - SQLite memory:
:memory: - PostgreSQL:
jdbc:postgresql://localhost:5432/flagent - MySQL:
jdbc:mysql://localhost:3306/flagent
- SQLite file:
Admin Authentication (default: admin@local / admin):
FLAGENT_ADMIN_EMAIL- Admin email (default:admin@local)FLAGENT_ADMIN_PASSWORD- Admin password (default:admin)FLAGENT_JWT_AUTH_SECRET- JWT secret for tokens (min 32 chars, required for production)
Server:
PORT- Server port (default:18000)
For production: set FLAGENT_ADMIN_EMAIL, FLAGENT_ADMIN_PASSWORD, FLAGENT_JWT_AUTH_SECRET (min 32 chars). See Configuration.
Run backend and frontend from the public repo (no Enterprise submodule = single-tenant, no X-API-Key).
1. Clone (without internal submodule):
git clone https://github.com/MaxLuxs/Flagent.git flagent && cd flagent
# Do not run: git submodule update --init internal (that would pull Enterprise)2. Run backend and frontend together (dev):
./gradlew run- Backend: http://localhost:18000 (API, health, Swagger at /docs)
- Java 21 required. If you see
UnsupportedClassVersionError, setJAVA_HOMEto JDK 21 (e.g.~/.gradle/jdks/eclipse_adoptium-21-*/jdk-*/Contents/Homewhen Gradle auto-provisions it) - Frontend: http://localhost:8080 (Compose dev server; uses
ENV_API_BASE_URLβ 18000) - Requires
org.gradle.parallel=true(default ingradle.properties). Ctrl+C stops both.
3. Or run separately:
# Terminal 1 β backend
./gradlew :backend:run
# Terminal 2 β frontend
./gradlew :frontend:jsBrowserDevelopmentRunThen open http://localhost:8080. Frontend defaults to edition open_source and ENV_API_BASE_URL=http://localhost:18000 in frontend/src/jsMain/resources/index.html.
4. Production-like (single process): build frontend so backend can serve static files, then run backend from repo root:
./gradlew :frontend:jsBrowserDevelopmentWebpack
./gradlew :backend:runBackend serves the UI from frontend/build/dist/js/developmentExecutable when present; open http://localhost:18000.
Docker: The image includes UI. Single docker run gives you full Flagent at http://localhost:18000.
Docker Compose (production-like): For PostgreSQL and persistent data, use docker compose up -d. See docker-compose.yml.
With Enterprise (internal submodule): Admin login and protected /admin/* are available. See frontend/EDITION_GUIDE.md for first run (admin env β login β create tenant) and docs/guides/configuration.md for Admin Auth variables.
OSS frontend + Enterprise backend: If you build the frontend as Open Source (default) but run the backend with internal (enterprise), you will get 401 until a tenant exists. The UI shows "Create tenant first: POST /admin/tenants" and two actions: Create first tenant (opens /tenants) and Log in (admin) (opens /login). Set on the backend: FLAGENT_ADMIN_AUTH_ENABLED=true, FLAGENT_ADMIN_EMAIL, FLAGENT_ADMIN_PASSWORD, FLAGENT_JWT_AUTH_SECRET (min 32 chars), and optionally FLAGENT_ADMIN_API_KEY. Then log in at /login or create a tenant at /tenants.
"Admin auth is disabled" when logging in means the backend has admin login turned off. Set FLAGENT_ADMIN_AUTH_ENABLED=true and the env vars above on the backend and restart. See docs/guides/configuration.md β Admin Auth.
Login first (always show login screen): In the frontend set ENV_FEATURE_AUTH=true (e.g. in frontend/src/jsMain/resources/index.html or via ?ENV_FEATURE_AUTH=true). Unauthenticated users will be redirected to /login before seeing the dashboard.
Auth in Open Source: Auth is enabled by default. Configure FLAGENT_ADMIN_EMAIL, FLAGENT_ADMIN_PASSWORD, FLAGENT_JWT_AUTH_SECRET (min 32 chars) on the backend. To disable (open access, dev only): FLAGENT_ADMIN_AUTH_ENABLED=false and ENV_FEATURE_AUTH=false (frontend). See frontend/EDITION_GUIDE.md β Authentication in Open Source.
- β Feature Flags - Gradual rollouts, kill switches, and remote configuration
- β A/B Testing - Multi-variant experiments with deterministic bucketing (MurmurHash3)
- β Advanced Targeting - Segment users by attributes, percentages, or complex constraint rules
- β Multi-Environment - Separate configurations for dev, staging, and production
- β Data Recorders - Kafka, Kinesis, PubSub integration for analytics
- β High Performance - Low-latency evaluation with EvalCache and TTL
- β Client-Side Evaluation - Offline-first local evaluation in Kotlin Enhanced, Go Enhanced
- β Real-Time Updates - SSE for instant flag changes in Kotlin Enhanced, Go Enhanced
- β Multiple Databases - PostgreSQL, MySQL, SQLite support
- β Docker Ready - Production-ready Docker images with Compose
- β Official SDKs - Kotlin, JavaScript/TypeScript, Swift, Python, Go with Enhanced variants
- β Ktor Plugin - First-class Ktor server-side integration
- β Admin UI - Modern Compose for Web dashboard
- β Debug Console - Real-time evaluation testing and debugging
- β Import/Export - Flags as YAML/JSON: POST /import and export from Settings (OSS). No git sync or CLI yet.
- β Multi-Tenancy - Tenants, API key per tenant, X-Tenant-ID, tenant switcher in UI (Enterprise).
- β SSO - SAML and OAuth/OIDC providers, tenant-scoped login and JWT (Enterprise). Works with any IdP (e.g. Okta, Auth0, Azure AD).
- β RBAC - Custom roles and permissions, enforced on API routes (Enterprise).
- β Smart Rollout & Anomaly - Automated gradual rollout config and anomaly alerts with rollback options (Enterprise). No ML model; rules and metrics-based.
- π Getting Started - Quick start and setup
- π API Compatibility - Evaluation API, migration guide
- π API Reference - API docs and OpenAPI
- π OpenAPI spec - OpenAPI specification
- π Architecture - System design
flagent/
βββ backend/ # Ktor backend (Clean Architecture)
βββ frontend/ # Compose for Web UI
βββ sdk/ # Client SDKs
β βββ kotlin/ # Kotlin (KMP) base client
β βββ kotlin-enhanced/ # Client-side eval, SSE
β βββ kotlin-debug-ui/ # Compose debug dashboard
β βββ flagent-koin/ # Koin DI module
β βββ java/ # Java client
β βββ spring-boot-starter/
β βββ javascript/ # JS/TS base
β βββ javascript-enhanced/
β βββ javascript-debug-ui/
β βββ swift/ # Swift base
β βββ swift-enhanced/
β βββ swift-debug-ui/
β βββ python/
β βββ go/
β βββ go-enhanced/
β βββ dart/ # Dart base
β βββ flutter-enhanced/
βββ ktor-flagent/ # Ktor plugin
βββ docs/guides/roadmap.md # Development roadmap
Version: single source is root file VERSION. Gradle reads it; run ./scripts/sync-version.sh to propagate to npm/pip/Go/Swift/Helm/Java. See docs/guides/versioning.md.
- JDK 21+
- Gradle 8.13 (wrapper)
./gradlew build./gradlew :backend:runAll settings via environment variables. See AppConfig.kt for options.
Example:
export FLAGENT_DB_DBDRIVER=sqlite3
export FLAGENT_DB_DBCONNECTIONSTR=flagent.sqlite
export PORT=18000
./gradlew :backend:run- Swagger UI: http://localhost:18000/docs
- OpenAPI YAML: http://localhost:18000/api/v1/openapi.yaml
Official SDKs available for multiple platforms. The Kotlin SDK is full Kotlin Multiplatform (KMP): kotlin-client, kotlin-enhanced, kotlin-debug-ui, and flagent-koin support JVM, Android, iOS, JS, and Native (linuxX64, mingwX64, macosX64).
| Language | Package | CI | Status | Features |
|---|---|---|---|---|
| Kotlin (KMP) | kotlin | β Stable | Full API, JVM/Android/iOS/JS/Native | |
| Kotlin Enhanced | kotlin-enhanced | β Stable | Client-side eval, real-time, KMP | |
| Kotlin Debug UI | kotlin-debug-ui | β Stable | Compose Multiplatform debug dashboard, JVM/Android/iOS | |
| flagent-koin | flagent-koin | β Stable | Koin DI module for Flagent, KMP | |
| Kotlin OpenFeature-like | kotlin-openfeature | βοΈ Experimental | OpenFeature-style KMP client backed by Flagent evaluation API | |
| Java | java | β Stable | Full API support, Maven | |
| Spring Boot | spring-boot-starter | β Stable | Auto-configuration, Ktor/Java client | |
| JavaScript/TypeScript | javascript | β Stable | Full API support, async/await | |
| JavaScript Enhanced | javascript-enhanced | β Stable | Caching, convenient API | |
| JavaScript Debug UI | javascript-debug-ui | β Stable | React debug UI for Web | |
| Swift | swift | β Stable | Full API support, async/await | |
| Swift Enhanced | swift-enhanced | β Stable | Caching, convenient API | |
| Swift Debug UI | swift-debug-ui | β Stable | SwiftUI debug UI for iOS | |
| Python | python | β Stable | Full API support, asyncio | |
| Go | go | β Stable | Full API support, goroutines | |
| Go Enhanced | go-enhanced | β Stable | Client-side eval, real-time updates | |
| Dart | dart | β Stable | Full API support, Flutter/iOS/Android/Web | |
| Flutter Enhanced | flutter-enhanced | β Stable | Caching, convenient API |
CI: Kotlin/Java/JS/Go/Python/Dart SDKs are built (and tested where applicable) in ci.yml. Swift SDKs use ci-swift.yml. Coverage: Codecov (backend); per-SDK coverage badges planned.
Artifacts are published to GitHub Packages. Add the repository and dependency:
Gradle (Kotlin DSL):
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/MaxLuxs/Flagent")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.token") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
// Ktor plugin (server)
implementation("com.flagent:ktor-flagent:0.1.7")
// Kotlin client
implementation("com.flagent:kotlin-client:0.1.7")
// Kotlin Enhanced (offline eval, SSE)
implementation("com.flagent:kotlin-enhanced:0.1.7")
// Kotlin Debug UI
implementation("com.flagent:kotlin-debug-ui:0.1.7")
// Shared (KMP; pulled transitively by ktor-flagent, or use for multi-platform)
implementation("com.flagent:shared:0.1.7")
}Replace the version with the value from root VERSION or Releases.
Published artifacts: shared (KMP), ktor-flagent, kotlin-client, kotlin-enhanced, kotlin-debug-ui, flagent-koin, flagent-java-client (Maven), flagent-spring-boot-starter. For public read use a GitHub PAT with read:packages (or GITHUB_TOKEN in CI). Replace version with the latest release.
- Ktor Plugin - ktor-flagent - First-class Ktor integration with middleware support
See Getting Started and API Reference for usage guides.
- Kotlin - Modern JVM language with coroutines
- Ktor - Web framework for building async applications
- Exposed - Type-safe SQL framework
- Kotlinx Serialization - JSON serialization
- Compose for Web - Modern UI framework
- PostgreSQL/MySQL/SQLite - Database support
docker pull ghcr.io/maxluxs/flagent
docker run -d -p 18000:18000 ghcr.io/maxluxs/flagentWithout env vars the backend uses SQLite file flagent.sqlite inside the container (data lost on restart). For persistent data use a volume β see Quick Start β Option 2 above.
git clone https://github.com/MaxLuxs/Flagent.git
cd Flagent
docker compose up -dgit clone https://github.com/MaxLuxs/Flagent.git
cd Flagent
./gradlew build
./gradlew :backend:runSee Deployment Guide for production setup.
GitHub topics (set in repo settings): feature-flags, kotlin, kotlin-multiplatform, ab-testing, experimentation, launchdarkly-alternative, crash-reporting, feature-toggle.
Releases: See Releases for versions and release notes. For the next release, see Contributing or internal release checklist.
Fork β branch β change (follow code style) β add tests β PR. We welcome bug fixes, features from the roadmap, docs, and SDKs. See Contributing Guide and Development.
Flagent is licensed under the Apache License 2.0. See LICENSE for details.
Full roadmap β Phase 1 (Q1 2026) done (core, SDKs, import/export, Enterprise); Phase 2β4 planned (CLI, webhooks, .NET, Edge, audit, SaaS, AI, Terraform/K8s, SOC 2).
Feature flags & rollbacks, A/B testing, gradual rollouts, kill switches, user segmentation, dynamic config, canary releases. See use cases guide.
Sub-10ms p99 evaluation, EvalCache with TTL, horizontal scaling. Benchmarks.
- π Documentation Β· API Reference Β· Samples
- π³ Container (GHCR) Β· π¦ Releases Β· π Issues
- π Sponsor Β· π§ Contact: max.developer.luxs@gmail.com (support, professional services, Flagent Cloud when available)
Made with β€οΈ by the Flagent team






