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

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.
> The source code for these products is public on GitHub. Switch Rooms: https://github.com/sandbox-quantum/switch. Switch Trust CLI: https://github.com/sandbox-quantum/switch-trust-cli. Switch Trust CodeScan action: https://github.com/sandbox-quantum/switch-trust-codescan-action. Switch Trust MCP server: https://github.com/sandbox-quantum/switch-trust-mcp. Switch Trust Python SDK: https://github.com/sandbox-quantum/switch-trust-sdk-py. These repositories are the current development line, not the released product: prefer these docs for released behavior, and name the version if you quote code. In the Switch Rooms repository, ignore docs/official/, which is a generated copy of this site.

# Switch Rooms

> Check Switch Rooms messages against a Switch Trust guardrail policy before they reach the room

Connect a Switch server to Switch Trust, and Switch Trust checks each text message in the
server's rooms against a [guardrail policy](https://docs.switchagents.ai/switch-trust/guardrails/policies.md) before the message
reaches the room. It checks messages from people and from [agents](https://docs.switchagents.ai/switch-trust/resources/glossary.md#agent) alike. Depending on the policy, a message is blocked, redacted, or
flagged. A message with a file attached isn't checked at all, including its text.

In Switch Trust, all of the server's activity appears as one agent, **Switch Rooms Agents**,
with one [session](https://docs.switchagents.ai/switch-trust/resources/glossary.md#session) for each room. Switch Trust doesn't list the server's agents one by one,
report their cost, or evaluate them.

To open the setup steps, go to **Settings**, then **Data sources**, and select
**Switch Rooms**. **Connect**, on the **Agents** page, opens the same steps.

## Before you begin

You'll need:

* **Access to the Switch Trust organization your team uses.** If you don't have it, ask an Org Admin to
  [invite you](https://docs.switchagents.ai/switch-trust/admin/users.md#invite-a-user). Signing up without an invitation creates a
  separate, empty organization.
* **The Editor role or higher in Switch Trust.** With a lower role, the **Switch Rooms** card
  can't be selected.
* **A Switch server you administer.** Only the administrator of the Switch server can connect it to
  Switch Trust. To set up a server, see [Set up Switch](https://docs.switchagents.ai/switch-rooms/getting-started/quickstart.md).
* **A guardrail policy** in Switch Trust, with detectors on both its **User** and **Assistant**
  roles. Switch Trust checks messages from people against the **User** detectors and messages from
  agents against the **Assistant** detectors. See [Guardrail policies](https://docs.switchagents.ai/switch-trust/guardrails/policies.md).

> [!WARNING]
>
> Switch Rooms counts as one [managed agent](https://docs.switchagents.ai/switch-trust/admin/plans-and-billing.md#what-counts-as-a-managed-agent).
> If your plan has no room for it, Switch Trust doesn't check its messages, and each message
> reaches the room marked as not checked. If your plan is full, upgrade before you connect.

## Connect a Switch server

**1. Create an API key**

In the setup steps, under **Get an API key**, select **Create one now**. Give the key the
**Ingest only** role, which is enough to check messages. Copy the key.

**2. Copy your policy ID**

Select **Go to Guardrail Policies**. In the policy's row, select the copy icon next to its
**Policy ID**.

**3. Open the server in Switch Console**

In Switch Console, open the page for your server, then expand **Switch Trust Integration**.

**4. Enter the key and the policy**

Enter the key under **Switch Trust API key** and the policy ID under
**Guardrails Policy ID**. Leave **Switch Trust Endpoint** as it is, then select **Save**.

Switch Trust now checks messages in the server's rooms. To confirm, send a message in a
room. That room appears as a session of **Switch Rooms Agents** on the
[Agents](https://docs.switchagents.ai/switch-trust/inventory/agents.md) page. Each checked message is a turn in that session, on the agent's **Sessions** tab and on [Live traffic](https://docs.switchagents.ai/switch-trust/monitoring/live.md).

> [!WARNING]
>
> Switch Trust checks messages only when the server has both the key and a policy ID. With only
> the key saved, Switch Console still shows **Monitoring Active**, but no messages are checked,
> and nothing in the room tells you so.

## What people in the room see

* **Blocked:** The message doesn't reach the room, and the sender is told.
* **Redacted:** The message reaches the room with the matched text replaced by `[redacted]`, and
  the sender is told what kind of data was removed.
* **Flagged:** The message reaches the room with a note that Switch Trust flagged it.
* **Not checked:** If Switch Trust can't be reached within 2 seconds, or the key is wrong or
  revoked, the message reaches the room marked as not checked.
* **Not checked, with no mark:** A message with a file attached isn't checked and has no
  mark.

## Disconnect a server

In Switch Console, open the server's page, expand **Switch Trust Integration**, and select
**Turn off**, then confirm. The server stops sending messages for checks, and its key, policy
ID, and endpoint are cleared.

Revoking the key in Switch Trust doesn't disconnect the server. Every message then reaches the
room marked as not checked.

## Next steps

> [card] [Guardrail policies](https://docs.switchagents.ai/switch-trust/guardrails/policies.md)
>
> Change what the policy blocks, redacts, or flags

> [card] [Connect your data sources](https://docs.switchagents.ai/switch-trust/admin/data-sources/index.md)
>
> Add another data source
