You're viewing the docs for Flags 0.x. The latest is 1.x (rc). Go to the 1.x (rc) docs
OpenFeature
Use @adonis-agora/flags through the OpenFeature server SDK.
If your code talks to the OpenFeature SDK, use the provider. It is the same engine: same buckets, same exposures, same results.
npm i @openfeature/server-sdkimport { OpenFeature } from '@openfeature/server-sdk'
import { AgoraFlagsProvider } from '@adonis-agora/flags/openfeature'
await OpenFeature.setProviderAndWait(new AgoraFlagsProvider())const client = OpenFeature.getClient()
await client.getBooleanValue('new_player', false, { targetingKey: user.id, plan: user.plan })
client.track('purchase', { targetingKey: user.id }, { value: order.total })targetingKey is the subject id; subjectType sets the subject type; every other attribute is a targeting attribute.
For other languages and the browser, see OFREP on the central server.