PyRIT setup involves three main components to get you started with security testing:
- Configuration - Initialize PyRIT with environment variables, database, and defaults
- Resiliency - Understand retry mechanisms and error handling
- Customization - Learn about default values and custom initializers
For the fastest setup, use TargetInitializer and ScorerInitializer, which require only basic OpenAI environment variables:
from pyrit.setup import initialize_pyrit_async
from pyrit.setup.initializers import ScorerInitializer, TargetInitializer
await initialize_pyrit_async(memory_db_type="InMemory", initializers=[TargetInitializer(), ScorerInitializer()])This configuration allows you to run most PyRIT notebooks immediately.
PyRIT offers flexible configuration through:
- Environment variables for API keys and endpoints
- Database options including InMemory, SQLite, and Azure SQL
- Custom initializers for project-specific defaults
See the detailed sections below for comprehensive setup guidance.