Skip to main content
The Java SDK is ai.fireweave:fireweave-{sdk,openfeature,adapter-posthog,testing} at 0.1.0-SNAPSHOT. It evaluates flags, drives a release lifecycle, and records exposures and signals. OpenFeature and the wire protocol use flagKey.
Not on Maven Central. The parent POM says “DO NOT PUBLISH.” groupId ai.fireweave is a working assumption pending namespace verification. Install from a checkout with mvn install.
registerTarget is not in this SDK on master. There is no controlPoints / flags facade. Native helpers are boolean and string only. close() does not flush exposures.

Supported versions

From the parent POM: CI runs JDK 11 and 25. Document 11+ from the POM; do not treat CI “latest” as a support guarantee.

Install

Do not add a Maven Central coordinate as if the artifacts are published.

Initialize

Plain constructors. No DI framework. FireweaveClient implements AutoCloseable.
FireweaveRuntime.initialize() / shutdown() / close(). Shutdown waits at most shutdownTimeoutMs (default 10_000) on a daemon thread.

Configuration and authentication

Java does not call System.getenv. There is no auto-read of FW_API_URL or FW_PROJECT_API_KEY. Javadoc on FireweaveRemoteAdapter maps host() / projectApiKey() to those names for documentation only. Pass them on FireweaveConfig.
FireweaveConfig fields: projectApiKey, personalApiKey, host, allowedHosts, requireTargetingKey, limits, reservedAttributeKeys, globalContext, localEvaluation, onlyEvaluateLocally, requestTimeoutMs (3000), shutdownTimeoutMs (10000), defaultEvaluationOptions, telemetryAttributeAllowlist, releasesEnabled, exposuresEnabled, signalsEnabled.
Auth: Authorization: Bearer <key> from FireweaveConfig.projectApiKey(). Paths: /v1/flags/evaluate, /v1/capture only. DEFAULT_ALLOWED_HOSTS: five PostHog hosts + loopback. Opt-out: ALLOW_ANY_HOST = "*". https off-loopback; http on loopback only. See Configuration and auth.

Targets

Not in this SDK on master. The remote adapter has no /v1/targets/register path. A local feature branch with Java parity is not source of truth. Pass targetingKey and attributes on each evaluate / OpenFeature call. See Targeting and targets.

Evaluate (no controlPoints namespace)

There is no controlPoints or flags facade. Use FireweaveClient.evaluate or the two typed helpers. FlagType: BOOLEAN, STRING, INTEGER, FLOAT, OBJECT. Native helpers: getBooleanValue and getStringValue only. Integer, float, and object go through evaluate(...) or OpenFeature.
EvaluationOptions: sendExposure() (default false), includePayloadMetadata(). Evaluation never throws — failures are reason=ERROR with the default. See Control points.

Releases

Returns ExtensionResult, not thrown errors. rolloutId + stampIds required (stmp_ + 26 Crockford characters). See Releases.

Exposures

sendExposure defaults to false. Dedup is on (targetingKey, flagKey, variant, value).
client.close() / runtime.shutdown() flushes nothing implicitly. Call exposures().flush() yourself before close.
See Exposures.

Signals

See Signals and outcomes.

Capabilities

guardrails().check is a stub (UnsupportedCapability). See Capabilities.

Adapters

PostHogAdapter.create(config) returns UnsupportedCapability until a Java PostHog server SDK exists. Production PostHog use requires an injected PostHogClientApi. There is no local/dev adapter on Java master. See Adapters.

OpenFeature

ai.fireweave.openfeature.FireweaveProvider on dev.openfeature:sdk 1.15.1. Synchronous — no CompletionStage. Five resolvers: boolean, string, integer (Integer, 32-bit), double, object (Value). Values outside Integer range → TYPE_MISMATCH + default (never silent truncation). InitMode.AUTOMATIC | MANUAL. Tracking is not implemented. See OpenFeature.

Errors

ErrorKind enum (15 kinds) + FireweaveException + FireweaveError value type. Evaluation returns defaults; extensions return ExtensionResult. See Errors.

Testing

ai.fireweave.testing.InMemoryAdapter with FlagDefinition. The test-server stub does not implement /v1/targets/register. See Testing.

Shutdown

Javadoc on close(): “flushes nothing implicitly.” See Initialize, ready, shutdown.

Not in this SDK

  • registerTarget
  • controlPoints / flags namespace
  • Native getIntegerValue / getFloatValue / getObjectValue
  • System.getenv for FW_*
  • Local/dev adapter
  • Live PostHog from API keys alone
  • Implicit flush on close
  • Working guardrails
  • OpenFeature Tracking

Next

Quickstart

Offline evaluate in every language.

Compatibility

Type split, adapters, and conformance.
Last modified on August 18, 2026