---
title: Feature flags
description: Turn a Beeuni surface on for one project, and read what every flag gates.
---

A feature flag turns one Beeuni surface on for one project. Any surface can
ship behind a flag — experimental, beta, or fully stable. "Experimental" is a
stability badge on a flag, not the name of the system.

Flags are per project. Turning a flag on in one project changes nothing in
another project, and nothing for other accounts.

## Turn a flag on

1. Open **Settings → Feature flags**. The tab lists every flag the platform
   supports.
2. Read the row: the flag name, its stability badge, one sentence of
   description, and its origin — `Default on`, `Default off`, or
   `Overridden for this project`.
3. Use the switch. The change applies to the current project immediately.

You need the project's `project.settings.write` permission. The route answers
`403` for any other caller.

### From the CLI

The same switches are available to scripts and agents through `beeuni projects features`:

```bash
beeuni projects features                # every flag: key, state, origin
beeuni projects features enable reminders
beeuni projects features disable reminders
beeuni projects features reset reminders  # drop the override; follow the platform default
beeuni projects features --json          # the full catalog as JSON
```

Add `--project <id>` to act on a project other than the linked/default one. A
flag the platform marks unavailable stays off whatever the project override
says; the CLI prints that as `n/a` / `unavailable`.

:::info[Flag state is not in your repo]
Per-project flag state lives in the database, on the project row. It is never
read from `beeuni.yaml`. A flag you turn on does not travel with a repository
clone or a fork.
:::

## Stability badges

| Badge | What it means |
|---|---|
| Experimental | The surface and its contract can still change. |
| Beta | The surface works and the shape is settling. |
| Stable | The contract holds. The flag stays an opt-in. |

## How a flag is enforced

Every flag declares one enforcement mode.

| Mode | What the server does when the flag is off |
|---|---|
| `routes` | The HTTP surface rejects the request with `403`. |
| `behavioral` | The behavior does not occur — no connector materializes, no env injects, no agent registers. |
| `ui-only` | The server deliberately does not enforce. The flag hides client surface only. |

A `routes` rejection is identical everywhere:

```json
{
  "error": "Reminders is not enabled for this project. Enable it in Settings → Feature flags.",
  "code": "feature_disabled",
  "feature": "reminders"
}
```

Branch on `code`, never on the message text. The SDK exports
`isFeatureDisabledError(error)` and `featureDisabledKey(error)` for exactly
this.

<a id="every-flag"></a>

## Common flags

| Key | Name | Stability | Default |
|---|---|---|---|
| `marketplace` | Marketplace | Beta | On |
| `agentmail_email` | AgentMail Email | Experimental | Off |
| `meta_agent` | Meta Agent | Experimental | Off |
| `monitors` | Monitors | Experimental | Off |
| `reminders` | Reminders | Beta | Off |
| `warm_sessions` | Warm Sessions | Beta | Off |
| `secrets_egress` | Network-Enforced Secrets | Experimental | On |

### What each flag gates

- **`marketplace`** — browse and install skills from community and vendor
  registries.
- **`agentmail_email`** — assign AgentMail inbox connections so inbound email
  starts and continues sessions.
- **`meta_agent`** — add a platform-owned coordinator agent that spawns and
  manages specialized sessions.
- **`monitors`** — run 24/7 watchers from your repo that fire trigger events
  into sessions. See [Triggers](/docs/connect/triggers).
- **`reminders`** — scheduled check-ins that re-prompt one session, once or
  on repeat. Off, the reminder routes answer `feature_disabled` and existing
  reminders do not fire. See [Reminders](/docs/connect/reminders).
- **`warm_sessions`** — keep one sandbox booted while a project is open, so a
  new session starts without a cold boot.
- **`secrets_egress`** — offer network enforcement for a secret: the sandbox
  holds a handle, and Beeuni substitutes the real value only on requests to
  approved hosts. See [Secrets](/docs/project/secrets).

### Graduated flags

- **Connectors** — `connectors_v2` and `connectors_api_discover` are standard features. Every project uses the unified catalog; neither has a switch.

- **pi / LLM Gateway** — New sessions run pi. Existing OpenCode sessions remain supported. pi uses the Beeuni LLM gateway. Both are standard behavior with no per-project switch.

A graduated feature is on for every project and has no switch.

- **Agents as principals** is standard behavior with no switch. An agent
  session acts as the agent itself — its Beeuni permissions within its ceiling
  role, whoever runs it. See [Agent permissions](/docs/project/permissions).
- **Review Center** graduated out of the flag system. The Review page, the
  sidebar Review row, and the command-palette row show for every project; the
  `project.review.read` and `project.review.act` permissions still apply.
  `review_center` is no longer a flag key: `PATCH /v1/projects/:id/features`
  answers `400` `Unknown feature flag`, and `beeuni projects features enable
  review_center` prints that error and exits `1`. A stored override from before
  graduation has no effect.
- **Computers** graduated out of the flag system. Every member can connect
  their own computer from the project sidebar; the platform's
  `TUNNEL_ENABLED` setting is the only gate. `agent_tunnel` is no longer a flag
  key: `PATCH /v1/projects/:id/features` answers `400` `Unknown feature flag`.
  See [Computers](/docs/connect/computers).
- **Microsoft Teams** graduated out of the flag system. Every project can
  connect Teams from **Connectors → Channels**; a tenant admin still consents
  once, or the project brings its own bot. `teams` is no longer a flag key:
  `PATCH /v1/projects/:id/features` answers `400` `Unknown feature flag`. A
  stored override from before graduation has no effect. See
  [Microsoft Teams](/docs/connect/teams).

## Side effects of a toggle

Some flags converge platform state after the write commits.

| Flag | Effect after the toggle |
|---|---|
| `agentmail_email` | Beeuni re-runs channel-connector materialization, so the connector appears or disappears with the flag. |

Effects are convergence work, not part of the toggle's success. The API
response does not wait for them. Each effect is retried once, and the
reconcilers behind it are idempotent and re-run on their periodic sweeps.

## Read and set a flag from code

Read the effective per-project state through the project detail, or through the
React hook:

```tsx
import { useFeatureFlag } from '@beeuni/sdk/react';

function RemindersNavItem({ projectId }: { projectId: string }) {
  const reminders = useFeatureFlag(projectId, 'reminders');
  if (!reminders.enabled) return null;
  return <Link href={`/projects/${projectId}/reminders`}>Reminders</Link>;
}
```

`enabled` is `true` only when the server said exactly `true`. A missing project
id, an in-flight query, and an error all resolve to `false`. Gate fail-closed.

Set the project override with the client:

```ts
const p = beeuni.project(projectId);

await p.updateFeatureFlag('reminders', true);   // turn it on for this project
await p.updateFeatureFlag('reminders', null);   // clear the override, inherit the default
```

`updateFeatureFlag` calls `PATCH /v1/projects/:id/features`. `feature` is one
of `FEATURE_FLAG_KEYS`, exported from `@beeuni/sdk` and typed as
`FeatureFlagKey`. See SDK reference.

Handle a disabled feature by code, not by message:

```ts
import { featureDisabledKey, isFeatureDisabledError } from '@beeuni/sdk';

try {
  await beeuni.session(projectId, sessionId).reminders.list();
} catch (error) {
  if (isFeatureDisabledError(error)) {
    console.log(`${featureDisabledKey(error)} is off for this project`);
  }
}
```
