new-checkout and user_42.
OpenFeature and the wire still say flagKey. The product name is control point. Evaluation never throws — a failure returns your default.
Prerequisites
- Node / Bun / Deno: Node.js ≥ 20.20, or Bun ≥ 1.2, or Deno ≥ 2.0. Optional peer
@openfeature/server-sdkonly if you use the provider. - Python: Python ≥ 3.10 and a virtualenv.
- Go: Go 1.25. The module is unpublished — clone FireWeave-HQ/fireweave-sdk and use a
replacedirective. - Java: JDK 11+ and Maven. Clone the SDK repo; artifacts install to your local
~/.m2as0.1.0-SNAPSHOT. - Browser: A frontend toolchain.
@fireweaveai/web-sdk@2.1.0is on npm. The package reads no environment variables.
project-api-key_…) and a fw-server base URL — see Configuration.
1
Install
Use the published registry where it exists. Checkout is optional except for Go and Java.
- Node
- Python
- Go
- Java
- Browser
npm Add
latest is 2.1.0 (verified 2026-08-17). Pin it. 2.0.0 is still published and still ships PostHog / ./posthog.@openfeature/server-sdk only if you use the provider. Deno can import { … } from 'npm:@fireweaveai/sdk' with no install step; that follows npm latest (2.1.0 today). Pin @2.1.0 in an import map if you need to stay off 2.0.0.APIs on this page are from SDK
master. The npm 2.1.0 tarball gitHead is fd19cad, not audit commit dfeb478 — NEEDS VERIFICATION that every snippet matches that tarball exactly. Checkout if you need a specific tree.2
Configure
Construct an adapter and a runtime. In-memory fixtures use
type, enabled, value, and variant.- Node
- Python
- Go
- Java
- Browser
3
Initialize
Wait until the runtime is usable before treating values as live. After shutdown, evaluations return defaults with
AlreadyClosed.- Node
- Python
- Go
- Java
- Browser
4
Register a target
Node, Python, and Web can register durable properties (
kind, properties). The call never throws (Node returns { ok, error? }). Go and Java have no registerTarget on master — skip this step and pass targetingKey on evaluate.- Node
- Python
- Browser
5
Evaluate a control point
Pass a stable Detailed Decision:
targetingKey. Do not invent an SDK helper named fw.isOn — that API does not exist.- Node
- Python
- Go
- Java
- Browser
fireweave.controlPoints.evaluate('new-checkout', 'boolean', false, { targetingKey: 'user_42' }). client.flags is the same object as client.controlPoints (deprecated alias; not removed in 2.x).Evaluate-path exposures are off unless you pass
sendExposure: true (or the language equivalent). Default is false in every language.6
Record an outcome
Optional for a first run; this completes the release-safety loop.
recordOutcome is a signal (kind outcome), not releases.complete.- Node
- Python
- Go
- Java
- Browser
7
Shut down
One runtime, one shutdown. Node, Python, and Web flush exposures inside
shutdown. Java does not.- Node
- Python
- Go
- Java
- Browser
Production (remote adapter)
Swap the in-memory adapter forFireweaveRemoteAdapter (Web: FireweaveRemoteWebAdapter). Auth is Authorization: Bearer <key>. Use a FireWeave project key (project-api-key_…), not a PostHog phc_ / phs_ / phx_ key.
- Node
- Python
- Go
- Java
- Browser
Reads
FW_API_URL and FW_PROJECT_API_KEY when omitted.https is required off-loopback; http is loopback-only.FW_API_URL / apiUrl / Java host from your project.
OpenFeature
You can evaluate through OpenFeature instead of (or in addition to)FireweaveClient. Extensions stay on the FireWeave client. Providers exist in all five packages. Tracking (OF spec §6) is not implemented.
Node example (wait for READY; lazyReady defaults true on FireweaveProvider):
Next steps
- Language surfaces: Node, Python, Go, Java, Browser, Compatibility
- Concepts: Control points, Targeting, Exposures, Signals, Adapters
- Production: Configuration, Lifecycle, Errors
- Tests without a network: Testing
- If a getter always returns the default: Troubleshooting