Switch Trust Scan
Scan your Python agent code for issues before it ships. It follows data flows, so it flags real issues rather than every pattern match.
Switch Trust Eval
Your running agent faces adversarial tests such as prompt injection, and an LLM judge scores its reliability from 0.0 to 1.0.
Try it now
Install Switch Trust CLI and configure your LLM provider. The package isswitch-trust-cli and the command is switch-trust.
Requirements:
- macOS or Linux. Windows is not supported
- Python 3.11 to 3.13
- OpenGrep (required for
switch-trust scan) - A running agent accessible over HTTP (required for
switch-trust eval)
1
Install
Using a virtual environment is recommended to avoid dependency conflicts:Install Switch Trust CLI:
Installing the full extra
Installing the full extra
The standard install is deliberately lean: it skips the machine-learning backends, which keeps the download roughly 2 GB smaller and avoids pulling CUDA on Linux.The built-in OWASP LLM evaluations, the PII and secret detectors, and Quote it. In zsh, the default shell on macOS, an unquoted
switch-trust scan all run on the standard install. So does listing evaluations.Add the full extra when you want the Garak evaluations, the toxicity detector, or models pulled from HuggingFace and run locally:[full] is a glob pattern and the command fails with no matches found.If you run something that needs the extra without it, the CLI stops with an error naming the extra rather than failing further in.2
Configure your LLM provider
switch-trust-cli uses AI to analyze agent code and score reliability. Run the interactive setup:switch-trust init runs automatically the first time you use Switch Trust CLI in a non-CI environment. You can re-run it any time to reconfigure.Where to get API keys
Where to get API keys
- Google Gemini: aistudio.google.com/apikey (free tier available)
- OpenAI: platform.openai.com/api-keys
- Anthropic: console.anthropic.com/settings/keys
- LiteLLM: Supports 100+ providers. See docs.litellm.ai
More
Scan your agent code
Find issues in your Python agent code in less than 5 minutes.
Evaluate a running agent
Attack your agent with adversarial tests and get a reliability score.
Run it in CI/CD
Add Switch Trust CLI to your continuous integration pipeline.
Follow a guide
End-to-end workflows and examples.
Browse built-in evaluations
The tests Switch Trust Eval runs out of the box.
Look up a command
The full command reference.
Fix a common issue
Fast fixes for installation, scan, and eval.
Read the FAQ
Common questions answered.
See what's new
Release notes for every version.
Read the source
Source code, example agents, and issue tracking on GitHub.

