Feature flags for AI agents
Give a coding agent access to the flags it needs. Choose an account, an app, or one environment, set its permissions and expiry, and revoke access when the job is done.
Set up a cloud agent →From setup to a running flag
Create the app
An authorized setup agent can sign up or log in with email and password through the CLI, without a browser. Use an owner-controlled email and pass the password through stdin. The original account login creates the app and saves its one-time keys to a private file.
Headless signup and login →Give the worker scoped access
Create a separate token for each worker. Choose read, manage, or admin permission within its account, app, or environment scope. Hand it over through the cloud provider's secret store as SUPERFLAG_TOKEN. The worker does not need the account password or original login token.
Set up a cloud agent →Create flags and generate types
A worker with manage permission can create flags, targeting rules, and percentage rollouts in its assigned scope. The CLI exposes a machine-readable command contract and JSON results. Generate TypeScript flag names and value types from config, and check for drift in CI.
CLI workflows and code generation →Use the flag in your app
Node, React, and React Native SDKs evaluate flags from cached configuration. Give server code an sdk_ key and client apps a pub_ key for client-visible flags. These evaluation keys are separate from the worker's management token. Run the app and verify both the enabled and disabled paths.
Integrate your first flag →
Give one worker seven days of access
superflag tokens create \
--name cloud-my-app-dev \
--app my-app --env dev \
--permission manage --expires-in 7 \
--write-secrets /private/worker.json --jsonRun this on the trusted provisioner after creating the app. Use a new file in a private directory. The file receives the token; stdout contains metadata. Store only its token field in the worker's runtime secret. Verify the scope with whoami --json from the worker.
Can a scoped worker create more credentials?
No. Scoped tokens cannot create apps, SDK keys, or other tokens, even with admin permission. The trusted provisioner performs that setup. A worker cannot expand its own access.
Can agents use MCP?
The hosted MCP endpoint at https://superflag.sh/api/mcp is read-only. Local stdio MCP also supports proposals and an approval-gated execution flow. Approval uses separate authority, and a producer cannot approve its own proposal. Direct flag writes use the CLI or HTTP API.