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

# Scan your agent

> Prove your agents are production ready in less than 10 minutes

Find misconfigurations, risky tool access, missing guardrails, and other issues in your Python agent code. An LLM does the analysis and triages false positives, so you see real problems, not noise.

<Card title="Flint AI on GitHub" icon="github" href="https://github.com/sandbox-quantum/flintai-cli">
  Source code, example agents, and issue tracking
</Card>

<Tip>
  Install our MCP server in Claude Code or your AI code assistant, then ask: **"Help me set up Flint AI Scan"** to get live guidance, troubleshoot issues, and work through these steps together. [Learn how →](/switch-trust-cli/resources/use-these-docs)
</Tip>

## Scan your Python agent code

<Steps>
  <Step title="Verify requirements">
    Check that Flint AI CLI and OpenGrep are installed:

    ```bash theme={null}
    flintai --version
    opengrep --version
    ```

    <Accordion title="Install OpenGrep">
      ```bash theme={null}
      # Linux / macOS
      curl -fsSL https://raw.githubusercontent.com/opengrep/opengrep/main/install.sh | bash

      # Windows PowerShell
      irm https://raw.githubusercontent.com/opengrep/opengrep/main/install.ps1 | iex
      ```

      See [OpenGrep installation](https://github.com/opengrep/opengrep#installation) for more options.
    </Accordion>

    <Accordion title="Install Flint AI CLI">
      Using a virtual environment is recommended to avoid dependency conflicts:

      ```bash theme={null}
      python3 -m venv .venv
      source .venv/bin/activate
      ```

      Install Flint AI CLI:

      ```bash theme={null}
      pip install flintai-cli
      flintai init
      ```

      [Full installation guide →](/switch-trust-cli#try-it-now)
    </Accordion>

    <Note>
      **Bring your own LLM key.** Flint AI Scan uses AI reasoning to validate findings, so it needs an API key for your own LLM provider (Gemini, OpenAI, Anthropic, or LiteLLM). This is your provider key for the local CLI, not a Flint AI Platform API token. `flintai init` prompts for it and stores it locally in `~/.flintai/.env`.
    </Note>

    <Accordion title="Where to get an LLM provider key">
      * **Google Gemini**: [aistudio.google.com/apikey](https://aistudio.google.com/apikey) (free tier available)
      * **OpenAI**: [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
      * **Anthropic**: [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)
    </Accordion>
  </Step>

  <Step title="Scan your agent">
    Point to your agent directory and launch the scan:

    ```bash theme={null}
    flintai scan /path/to/your_agent
    ```

    <Accordion title="Try it with a shipped example agent">
      No agent of your own yet? Clone [flintai-cli](https://github.com/sandbox-quantum/flintai-cli) and scan a bundled example from the repo root:

      ```bash theme={null}
      flintai scan examples/bookstore_agent/
      ```

      The repo ships two examples: `bookstore_agent` (OpenAI Agents SDK) and `weather_agent` (Google ADK).
    </Accordion>

    <Note>
      Flint AI Scan only analyzes Python files with supported framework imports. [See supported frameworks →](/switch-trust-cli/resources/faq#supported-frameworks)
    </Note>

    Results are saved to `scan_<timestamp>.json`, or `scan_<timestamp>.sarif` if you pass `--format sarif`. See [Scan results](/switch-trust-cli/scan/scan-results) for details on understanding findings and severity scores.
  </Step>
</Steps>

<Tip>
  **Integrate with CI/CD.** Save scan results as build artifacts to prove validation before deployment. [See CI/CD integration guide →](/switch-trust-cli/guides/ci-cd-integration)
</Tip>

### Clean scan

<img src="https://mintcdn.com/sandboxaq/XrwcI7QTN79Ds202/images/flintai-scan-clean.png?fit=max&auto=format&n=XrwcI7QTN79Ds202&q=85&s=55954b294ac554b9a4ceeaaf4b0f9dab" alt="Clean scan output" width="2434" height="1576" data-path="images/flintai-scan-clean.png" />

The scan detected an OpenAI Agents SDK agent, analyzed 1 Python file, and found no security issues. Tools ran in sequence: static analyzers (bandit, opengrep, detect-secrets, pip-audit) followed by AI reasoning to validate results.

### Scan with findings

<img src="https://mintcdn.com/sandboxaq/XrwcI7QTN79Ds202/images/flintai-scan-findings.png?fit=max&auto=format&n=XrwcI7QTN79Ds202&q=85&s=e40521f89bd52d474b97844ade587542" alt="Scan with findings output" width="2440" height="1656" data-path="images/flintai-scan-findings.png" />

The scan detected an OpenAI Agents SDK agent and found 2 security issues:

* **High severity (CVSS 9.0)**: Missing authentication on agent endpoint
* **Medium severity (CVSS 6.9)**: Unbounded agent execution loop

After static analysis, the AI reasoning layer identified these issues, and triage confirmed them as real findings.

## Next steps

<CardGroup cols={3}>
  <Card title="Issues found?" icon="wrench" href="/switch-trust-cli/scan/scan-results">
    Understand severity scores and what needs fixing before deployment
  </Card>

  <Card title="How scanning works" icon="diagram-project" href="/switch-trust-cli/scan/how-scanning-works">
    Learn how AI reasoning finds real issues and filters noise
  </Card>

  <Card title="Eval agent behavior" icon="flask" href="/switch-trust-cli/eval/getting-started">
    Get a 0.0-1.0 reliability score for runtime behavior
  </Card>
</CardGroup>
