Registry / llm-agents / garak
library0.15.1pypypi✓ verified 86d ago

Garak is a framework for probing large language models (LLMs) for security vulnerabilities. It automates the process of generating adversarial inputs and evaluating model outputs for issues like jailbreak, hallucination, data leakage, toxicity, and more. Current version is 0.14.1, requiring Python >=3.10. Active development with monthly releases.

pip install garak
INSTALL
IMPORT
SIG · GARAK
G
garak
llm-agentspythonv0.15.1
Install
104.7s avg
Import
260ms
Disk
5734MB
Pass rate
2/ 10
Env Coverage2 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.15.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ timeout
py 3.11
✕ build_error
✕ timeout
py 3.12
✕ build_error
✓ 111.7s
py 3.13
✕ build_error
✓ 97.7s
py 3.9
✕ build_error
✕ timeout
5734MB installed
● package 5734MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

garak
import garak
Garak exposes a CLI; programmatic usage uses submodules like garak.probes, garak.generators, etc.

Basic import test. Garak is primarily used via CLI; this verifies the installation.

import garak from garak.probes.base import Probe # Quick scan with default config # Run from command line: garak --model_type openai --model_name gpt-3.5-turbo print("Garak imported successfully - run CLI for full functionality")
garak --version
Debug
Known issues
breakingIn v0.14.0, CLI option `--generate_autodan` was removed. Scripts using this flag will break.
fix
Remove `--generate_autodan` from command lines. Use other probe options instead.
affects: >=0.14.0
breakingIn v0.12.0, the `failure` concept was renamed to `attack success`. Output reports and APIs using 'failure' need updating.
fix
Replace references to 'failure' with 'attack_success' in custom reporting or parsing scripts.
affects: >=0.12.0
deprecatedJSON config support (v0.14.0) is experimental; YAML config remains default and recommended for stability.
fix
Continue using YAML config files unless you specifically need JSON. Monitor future releases.
affects: >=0.14.0
gotchaGarak requires a model to be accessible via API or local. Running without a valid model will throw an error.
fix
Set environment variables like OPENAI_API_KEY or use local generators (e.g., `--model_type test` for testing).
affects: all
gotchaProbe performance can be slow on large models; set `--max_workers` to control parallelism.
fix
Use `--max_workers 1` to reduce load or increase for faster scanning on capable hardware.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'garak'
Garak not installed or installed in a different environment.
fix
Run `pip install garak` in the correct Python environment (Python >=3.10).
garak: error: the following arguments are required: --model_type
CLI invoked without specifying the model type.
fix
Provide `--model_type` (e.g., openai, huggingface, test) and optionally `--model_name`.
openai.error.AuthenticationError: No API key found
OpenAI API key not set when using OpenAI generator.
fix
Set environment variable OPENAI_API_KEY before running garak, or use a different model type.
yaml.scanner.ScannerError: mapping values are not allowed here
Malformed YAML config file (e.g., missing colon or space).
fix
Check the YAML file syntax. Use `--config` with a valid .yml file or remove config flag to use defaults.
KeyError: 'failure' in report parsing
Script expects 'failure' key but garak v0.12+ uses 'attack_success'.
fix
Update parsing code to target 'attack_success' instead of 'failure'.
Upgrade
Version history
0.15.1latest on PyPI · released Jun 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
44
OpenAI (training)
1
Resources
garak — pip install garak · libregistry