> ## Documentation Index
> Fetch the complete documentation index at: https://www.edgee.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Squads

> Apply shared AI Gateway settings and spending limits to subsets of your engineering team.

<Note>
  Squads are a **hosted-only** feature available on AI Gateway paid plans. ☁️
</Note>

Squads let you divide your organization into sub-groups and apply a distinct set of AI Gateway settings to each group: compression configuration, model routing, [BYOK](/features/byok) provider keys, and a spending limit. Every member of a squad inherits the squad's settings, while remaining subject to any organization-level overrides.

## How settings resolve

Settings follow a three-tier hierarchy:

1. **Organization** — enforced globally; overrides everything below it when set.
2. **Squad** — applies to all members of the squad; overrides individual key defaults.
3. **API key** — per-key overrides, within whatever the squad and org allow.

If a field is unset at the squad level, the organization default applies. If it's unset at the key level, the squad value applies.

## Creating a squad

Go to **Team → Squads** in the console sidebar. Click **Create Squad**.

<Steps>
  <Step title="Name and describe the squad">
    Enter a name (required, max 100 characters, unique within the organization) and an optional description (max 500 characters). Pick a name that reflects the team's function — `backend`, `mobile`, `infra`, and so on.
  </Step>

  <Step title="Select members">
    Choose from the list of organization members. Only members who hold an AI Gateway seat are eligible. A member can belong to **at most one squad** — members already assigned to another squad appear greyed out in the selector.
  </Step>

  <Step title="Create">
    Click **Create**. The squad appears as a card in the Squads grid. Settings default to the organization values; adjust them in the squad detail sheet.
  </Step>
</Steps>

## Squad settings

Open a squad card to see two tabs: **Members** and **Settings**.

### Members tab

Add or remove members at any time. Removing a member from a squad does not revoke their AI Gateway seat — it returns them to org-level defaults.

### Settings tab

#### Compression

Each compression strategy can be toggled independently per squad:

| Strategy               | What it does                                                               | Default           |
| ---------------------- | -------------------------------------------------------------------------- | ----------------- |
| Tool Result Trimming   | Strips boilerplate from CLI and tool outputs before they reach the model   | Inherits from org |
| Tool Surface Reduction | Narrows the tools list sent to the model to task-relevant entries ⚠️ alpha | Inherits from org |
| Output Brevity         | Reduces model response verbosity without dropping technical content        | Inherits from org |

When the organization enforces a setting (e.g. `tool_result_trimming = true` org-wide), the squad-level toggle is locked and shows the org value.

See [Token Compression](/features/token-compression) for a full description of each strategy.

#### Model routing

Configure **fallbacks** (alternate models when the primary is unavailable) and **reroutes** (redirect all traffic to a different model) for squad members. These override the organization routing defaults for the squad.

See [Retry & Fallback](/features/retry-and-fallback) for routing details.

#### BYOK

Assign one or more [provider keys](/features/byok) to the squad. Requests from squad members are billed to those keys. Enable **BYOK only** to prevent squad members from using Edgee credits entirely — all requests must go through a registered provider key.

#### Spending limit

Set a cap on how much the squad can spend. Configure:

* **Max spend**: a dollar amount (0 = unlimited).
* **Period**: `daily`, `monthly`, or `all time`.

When the limit is reached, requests from squad members are blocked until the period resets. The squad card in the Squads grid shows a progress bar so you can see how close a squad is to its limit at a glance.

<Tip>
  Spending limits at the squad level are additive to any key-level limits. A request is blocked if either the key limit or the squad limit is exhausted.
</Tip>

## Squads grid

The Squads tab shows one card per squad with:

* Member count
* Tokens, requests, cost, and savings for the selected period
* Spending limit progress bar (if a limit is set)

The time range selector at the top of the page applies to all squad cards simultaneously.

## Permissions

| Action                            | Required role           |
| --------------------------------- | ----------------------- |
| View squads and settings          | Any organization member |
| Create, update, or delete a squad | Admin                   |
| Add or remove members             | Admin                   |
| Update squad settings             | Admin                   |

## Next steps

<CardGroup cols={2}>
  <Card title="Token Compression" icon="archive" href="/features/token-compression">
    Learn about the three compression strategies and how they reduce token costs.
  </Card>

  <Card title="Alerts & Budgets" icon="bell" href="/features/alerts">
    Set alerts at the squad level to get notified before spending limits are reached.
  </Card>

  <Card title="BYOK" icon="key-round" href="/features/byok">
    Register provider keys to route squad traffic through your own billing accounts.
  </Card>

  <Card title="Retry & Fallback" icon="shuffle" href="/features/retry-and-fallback">
    Configure per-squad model routing and automatic failover.
  </Card>
</CardGroup>
