Skip to main content
Switch Trust CLI scans your agent code for issues and tests how your agent holds up under attack, on your own machine. It’s free and source-available, with first results in minutes.

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.
Connect your coding agent to these docs to get started fast.

Try it now

Install Switch Trust CLI and configure your LLM provider. The package is switch-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)
Supported frameworks: Google ADK, Google GenAI, Anthropic, OpenAI, OpenAI Agents SDK, LangGraph, CrewAI, AutoGen, HuggingFace Transformers, HuggingFace smolagents
1

Install

Using a virtual environment is recommended to avoid dependency conflicts:
Install Switch Trust CLI:
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 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:
Quote it. In zsh, the default shell on macOS, an unquoted [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:
You’ll be prompted to select a provider (Gemini, OpenAI, Anthropic, or LiteLLM), select a model, and enter your API key.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.
Run into issues? See install troubleshooting →

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.