---
title: "Use a settings file for flags and Unleash · Agent Wranglers"
url: https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/feature-flags
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Use a settings file for flags and Unleash when flags need targeting

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- ID: STK-96
- Level: Recommended
- Chapter: [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure)
- Rule: Keep flags that are on or off for everyone in your settings, deployed like code. Run Unleash only when a flag must target some users, a share of users or one customer.
- Cost: Open source. The Unleash server is AGPL-3.0 and its SDKs are Apache-2.0. Unleash Enterprise and the hosted service are paid.
- How: Most flags switch a feature for everyone, and a settings value does that with no extra service. Change it as [Roll out settings and data files like code](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/staged-config-rollouts) says. For targeting and gradual rollouts, Unleash passes the five tests. Its Node.js SDK 1.0.0 came out on 9 January 2017, and its Python SDK 1.0.0 on 13 October 2018. Server 8.2.0 shipped on 8 September 2026, and Python SDK 6.9.1 on 15 October 2026. The SDKs had about 436,000 weekly npm and 490,000 weekly PyPI downloads in October 2026. The server's repository had about 13,900 stars, against 8,500 for GrowthBook and 6,600 for Flagsmith. The SDK decides each flag inside your process from a cached copy, so a server outage keeps the last known values. Default every flag to off, as [Separate deploying from releasing](https://agentwranglers.se/playbook/engineering/running-in-production/deploy-is-not-release) says. Choose something else when a hosted service must run the flags for you. LaunchDarkly is the most used paid one, with about 1.5 million weekly npm downloads.
- Check: Every flag defaults to off in code and has an owner and a removal date. With the Unleash server stopped in staging, every page still loads with the last known flag values.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### TypeScript example

```ts
import { initialize } from 'unleash-client';

const flags = initialize({
  url: 'https://flags.internal.example.com/api/',
  appName: 'shop',
  customHeaders: { Authorization: process.env.UNLEASH_TOKEN! },
});

export const showNewCheckout = (userId: string) => flags.isEnabled('new-checkout', { userId }, false);
```

### Python example

```python
import os
from UnleashClient import UnleashClient

flags = UnleashClient(
    url="https://flags.internal.example.com/api/",
    app_name="shop",
    custom_headers={"Authorization": os.environ["UNLEASH_TOKEN"]},
)
flags.initialize_client()

def show_new_checkout(user_id: str) -> bool:
    return flags.is_enabled("new-checkout", {"userId": user_id}, fallback_function=lambda *_: False)
```

## Related rules

- [Roll out settings and data files like code](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/staged-config-rollouts) in Engineering
- [Separate deploying from releasing](https://agentwranglers.se/playbook/engineering/running-in-production/deploy-is-not-release) in Engineering

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/feature-flags">Agent Wranglers software choices playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Use Trivy for the bill of materials and cosign to sign releases](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure/sbom-and-signing)
- [Delivery and infrastructure](https://agentwranglers.se/playbook/stack/delivery-and-infrastructure)
