> ## 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.

# Installation

> Install and verify the Switch Trust Python SDK

Install the Switch Trust Python SDK to route your LLM traffic through the guardrails proxy. The SDK wraps your existing LLM client with a single function call — no code changes needed beyond the initial setup.

> [card] [Switch Trust CLI on GitHub](https://github.com/sandbox-quantum/flintai-cli)
>
> Source code, example agents, and issue tracking

## Requirements

* **Python 3.10 or later** (3.10, 3.11, 3.12, 3.13)
* **pip** package manager

## Install the SDK

```bash theme={null}
pip install switch-trust-sdk-py
```

This installs the core SDK with no provider dependencies. To include your LLM provider's library automatically, install with an extra:

```bash theme={null}
pip install "switch-trust-sdk-py[openai]"     # OpenAI
pip install "switch-trust-sdk-py[anthropic]"  # Anthropic
pip install "switch-trust-sdk-py[genai]"      # Google GenAI
pip install "switch-trust-sdk-py[adk]"        # Google ADK (includes Google GenAI)
pip install "switch-trust-sdk-py[langchain]"  # LangChain (OpenAI, Anthropic, Google GenAI)
pip install "switch-trust-sdk-py[all]"        # All providers and tools
```

> [accordion] Provider extras and version ranges
>
> | Extra | Packages installed |
> | - | - |
> | `[openai]` | `openai >=2.40.0, <3` |
> | `[anthropic]` | `anthropic >=0.105.2, <1` |
> | `[genai]` | `google-genai >=2.7, <3` |
> | `[adk]` | `google-adk >=2.1, <3` and `google-genai >=2.7, <3` |
> | `[langchain]` | `langchain-openai >=1.2, <2`, `langchain-anthropic >=1.4, <2`, `langchain-google-genai >=4.2, <5` |
> | `[dotenv]` | `python-dotenv >=1.2.2, <2` (for `.env` file support) |
> | `[all]` | All of the above |

## Verify your installation

```bash theme={null}
python -c "import switch_trust; print(switch_trust.__version__)"
```

You should see the installed version number (such as `1.0.1`).

> [accordion] Troubleshooting
>
> **`error: externally-managed-environment`**
>
> On macOS and some Linux distributions, system Python is protected by [PEP 668](https://peps.python.org/pep-0668/). Use a virtual environment:
>
> ```bash theme={null}
> python -m venv .venv
> source .venv/bin/activate
> pip install switch-trust-sdk-py
> ```
>
> **Version conflicts with provider SDKs**
>
> If you already have an LLM provider SDK installed at a different version, pip may report a conflict. The SDK requires specific version ranges for compatibility — check the extras table above and upgrade your provider SDK if needed:
>
> ```bash theme={null}
> pip install --upgrade openai  # or anthropic, google-genai, etc.
> ```
>
> **`ModuleNotFoundError: No module named 'flintai'`**
>
> Ensure you're using the same Python environment where you installed the SDK. If using a virtual environment, activate it first.

## Next steps

> [card] [Configuration](https://docs.switchagents.ai/switch-trust/sdk/python/configuration.md)
>
> Set up gateway URL, API keys, and environment variables

> [card] [Monitor agents at runtime](https://docs.switchagents.ai/switch-trust/getting-started/runtime.md)
>
> Get your first traces in less than 10 minutes
