Skip to content
GitHubDiscord

Giskard Scan

The Giskard scan writes the tests for you. Describe your agent in a sentence, and it builds scenarios tailored to that description, runs them against your agent, and reports which ones broke it.

Most of those scenarios are red teaming: attacking your own agent on purpose to find out how it fails before a user or an attacker does. For a bank’s customer-support agent, that means asking it for investment advice it should refuse, hiding an instruction inside a pasted statement to see if it obeys, or talking it out of its own rules over several turns.

Two scans ship in the library. vulnerability_scan red teams your agent with hostile scenarios. quality_scan checks its answers against a knowledge base of your own documents, to catch answers it invented.

A scan needs an LLM provider and an API key. Review the failing conversations: the judge can be wrong, and a clean run is not an exhaustive security assessment.

Terminal window
pip install "giskard[scan,openai]"

For a concise end-to-end example against your own agent, see Scan Vulnerabilities. For a guided introduction, work through these steps in order.

  1. Install & Configure (~5 min): install the scan extra and register an LLM provider.
  2. Your First Scan (~15 min): wrap a toy agent, run vulnerability_scan, and read the report.
  3. How the Scan Works (~10 min): learn how generators, suites, and judges fit together.
  4. Run the Scan in CI (~20 min): save a generated suite, replay it on pull requests, and export JUnit XML.
  5. Tune a Scan Run (~10 min): control the scenario budget, seed, concurrency, and report grouping.
  6. Run a Quality Scan (~15 min): use quality_scan against your own documents.

The scan generates tests for you from a description. Giskard Checks is the library you use to write tests yourself. They share the same runtime: a scan returns an ordinary Suite, so anything you learn about running, filtering, or asserting on suites in Checks applies to scan results too.

Use the scan to discover unknown vulnerabilities. Use Checks to lock in the behavior you already care about. Most teams run both.

The Giskard Hub runs 50+ custom-designed probes across 11 vulnerability categories, grades your agent’s security, and keeps testing it after deployment with continuous red teaming. See the Open Source vs Hub comparison.

Install the package with Install & Configure, then run Your First Scan. New to this vocabulary? The glossary defines prompt injection, hallucination, and the other failure types a scan reports.