Skip to content
Max edited this page Mar 3, 2026 · 1 revision

Flagent – Product Vision & PRD (v0.1)

1. Product Summary

Flagent is a Kotlin-native, self-hosted feature flag and experimentation platform with OpenFeature-compatible SDKs, built-in analytics, and developer-first tooling (CLI, Gradle, AI assistants via MCP).

It targets Kotlin/Java/Spring/Ktor teams and polyglot stacks that need:

  • On‑prem / self‑hosted feature flags & experiments (compliance, cost, control).
  • Great developer experience in the Kotlin/KMP ecosystem.
  • Analytics and insights without being locked into a single SaaS vendor.

See also:

  • Public docs: docs/README.md (GitHub Pages index).
  • Roadmap: docs/guides/roadmap.md.
  • Editions: docs/guides/pricing-and-editions.md.
  • API compatibility & OpenFeature: docs/guides/compatibility.md.
  • MCP / AI assistants: docs/guides/mcp.md.

2. Problem & Motivation

Teams today:

  • Need to ship features safely with gradual rollouts and instant rollbacks.
  • Need to run experiments (A/B, multi-variant) and understand their impact (errors, latency, business metrics).
  • Want to avoid maintaining home-grown flag frameworks full of tech debt and missing analytics.

Existing options:

  • SaaS platforms (LaunchDarkly, Harness, etc.):

    • ✅ Powerful, mature.
    • ❌ Often cloud-only; on‑prem not an option for regulated orgs.
    • ❌ Expensive for small/mid teams.
    • ❌ Not Kotlin-native; Kotlin/KMP is “just another SDK”.
  • Open-source/self-hosted (Unleash, Flagsmith, GrowthBook, FlagPilot):

    • ✅ Solid feature flags + experiments + analytics.
    • ✅ Self-hosted / on-prem.
    • ❌ Not Kotlin-native; Ktor/KMP is not first-class.
    • ❌ DX tooling (Gradle, Kotlin codegen, AI assistants) is limited.
  • Internal custom flag systems:

    • ✅ Tailored to specific stack.
    • ❌ Hard to evolve (experiments, analytics, smart rollouts).
    • ❌ No standard APIs (e.g. OpenFeature), no cross-language story.

Flagent exists to:

  • Provide a Kotlin/KMP-native engine and SDKs with first-class support for Ktor/Spring and mobile (Kotlin, Swift, Flutter).
  • Offer self-hosted OSS core and enterprise capabilities (multi-tenancy, SSO, RBAC, smart rollout, anomaly detection).
  • Integrate with OpenFeature so teams can stay vendor-agnostic.
  • Deliver developer-first DX with Gradle plugin, CLI, and MCP-based AI assistants.
  • Expose analytics (evaluation counts, crash-by-flag, experiment stats) without forcing a single analytics vendor.

3. Target Users (ICP)

3.1. Engineering Manager / Tech Lead (5–20 devs)

  • Stack: Kotlin/Java (Spring, Ktor), possibly Node/Go/Python on side.
  • Pain:
    • Home-grown feature flag code scattered across services.
    • No single place to see all flags/experiments and their impact.
    • Risky deploys; hard to do gradual rollouts and localized rollbacks.

3.2. Platform Engineer / SRE

  • Owns release safety and platform health.
  • Pain:
    • No mapping “flag → errors/latency/crash rate”.
    • No strong audit/RBAC story.
    • SaaS-only feature flag vendors are not acceptable (compliance, data residency).
    • Hard to integrate flags with existing observability stack.

4. Value Proposition

One-line pitch:

Flagent is a Kotlin-native, self-hosted feature flag and experimentation platform with OpenFeature-compatible SDKs, built-in analytics, and developer-first tooling.

Core value pillars:

  1. Self-hosted / Enterprise

    • OSS core, Docker/Helm, PostgreSQL/MySQL/SQLite.
    • Enterprise module (internal submodule) for multi-tenancy, SSO, RBAC, smart rollout, anomaly detection.
    • Editions are documented in docs/guides/pricing-and-editions.md.
  2. Kotlin-native + Polyglot SDKs

    • Kotlin KMP SDKs (sdk/kotlin, sdk/kotlin-enhanced, sdk/kotlin-debug-ui, sdk/flagent-koin).
    • Java, JS/TS, Swift, Python, Go, Dart/Flutter SDKs.
    • Kotlin/Compose debug UIs for local inspection.
  3. OpenFeature compatibility

    • API-level compatibility in docs/guides/compatibility.md.
    • sdk/kotlin-openfeature module that exposes an OpenFeature-like API.
  4. Analytics & Crash-by-Flag

    • Evaluation counts and metrics overview (evaluation_events, CoreMetricsService, /api/v1/metrics/overview).
    • Crash ingestion and listing (OSS), crash-by-flag in Enterprise.
    • Data recorders (Kafka, Kinesis, PubSub) for external analytics/DWH.
  5. Developer-first DX

    • Gradle plugin for build-time verification (docs/guides/build-time-verification.md).
    • MCP integration for AI assistants (docs/guides/mcp.md).
    • Planned CLI binary for automation (Phase 2 roadmap).

5. Scope for MVP 1.0

MVP = “good enough to onboard 1–3 real teams and run paid pilots”.

5.1. Engine & Flags/Experiments (already implemented)

  • Typed flags & experiments, segments, constraints, distributions, multi-environment.
  • Deterministic bucketing (MurmurHash3).
  • Client-side evaluation + SSE for Kotlin Enhanced / Go Enhanced.
  • Import/export (YAML/JSON), outgoing & incoming webhooks.
  • Reference: docs/guides/getting-started.md, docs/api/endpoints.md, docs/examples/sdk-integration.md.

5.2. OpenFeature-Compatible SDKs

  • Stabilize and document sdk/kotlin-openfeature:
    • Clear examples for Ktor/Spring (Java/Kotlin).
    • Guide: “Using Flagent as an OpenFeature backend” (linking to docs/guides/compatibility.md).
  • Goal: “If you speak OpenFeature, you can use Flagent as a provider without rewriting application code.”

5.3. Analytics & Experiment Insights (OSS + Enterprise)

  • Project-level overview:
    • Total evaluation counts, top active flags, active experiments.
  • Per-flag/per-experiment views:
    • Requests/users per variant.
    • Guard metrics (errors/crash rate via existing crash pipelines).
  • Cookbook (in docs) for integrating data recorders with DWH / GrowthBook-like analytics.

5.4. Developer Tooling (DX)

  • Gradle plugin:
    • Stable strict mode: generate flag keys; fail build on unknown keys where enabled.
    • Docs: docs/guides/build-time-verification.md.
  • CLI (Phase 2):
    • Commands: flagent init, flagent flags list, flagent flag create/delete, flagent cleanup suggest.
  • AI / IDE via MCP:
    • Actions: list flags guarding given code/endpoint; generate rollout plan; suggest dead flags & cleanup patches.
    • Docs: docs/guides/mcp.md.

5.5. Packaging & Editions

As per docs/guides/pricing-and-editions.md:

  • Open Source (Self-hosted):
    • Single tenant.
    • Core flags/experiments.
    • Basic analytics (evaluation counts, events, crash ingestion/list).
  • Flagent Cloud (SaaS, planned):
    • Managed hosting, multi-tenant.
    • Higher limits, SLA, priority support.
  • Enterprise:
    • Multi-tenancy, SSO, RBAC, audit logs.
    • Crash-by-flag, anomaly detection, smart rollout.
    • Dedicated support & SLA.

6. Roadmap Alignment

  • Phase 1 (Foundation) – Done
    Matches current implementation (see docs/guides/roadmap.md for details).

  • Phase 2 (Community & GitOps) – aligns with MVP DX goals:

    • CLI binary (wrap/improve existing scripts/flagent-cli.sh).
    • Better debug UIs where missing.
    • Publish benchmark baselines.
  • Phase 3 (Enterprise & SaaS) – aligns with analytics & Cloud:

    • Audit logs, compliance docs, advanced analytics, Flagent Cloud (managed).
  • Phase 4 (Scale & Market) – long-term stretch:

    • AI anomaly detection, predictive targeting, Terraform/Pulumi, K8s operator, SOC 2, enterprise SLA.

This PRD does not replace docs/guides/roadmap.md, but describes how MVP 1.0 fits into Phases 1–3.


7. Initial Execution Plan (3–6 Months)

  1. Clarify story & ICP (1–2 weeks)

    • Refine this PRD and keep it as “Product Vision & PRD” in Wiki.
    • Use it as a single reference when writing docs and talking to teams.
  2. Polish features for trust (2–6 weeks)

    • Tighten docs for:
      • Kotlin/Spring/Ktor onboarding (docs/guides/getting-started.md + examples).
      • OpenFeature backend usage (docs/guides/compatibility.md).
    • Ensure Gradle plugin & MCP docs are easy to follow.
    • (Optionally) publish a simple “Analytics overview” page if not present yet.
  3. Validate market (1–3 months)

    • 5–10 conversations with EM/Tech Leads / Platform Engineers.
    • 1–2 pilots (even free/cheap) using self-hosted Flagent.
  4. Monetize (3–6 months)

    • Convert pilots to paid support/Enterprise where it makes sense.
    • If no traction at all: reconsider ICP/positioning or treat Flagent as a portfolio asset.