Configuration
Configure Penelope’s behavior through agent initialization, environment variables, or programmatic configuration.
Agent Configuration
Default Model
Penelope uses Vertex AI with Gemini 2.0 Flash by default. Configure globally:
Environment Variables:
Programmatic:
Supported Providers
Penelope works with any Rhesis SDK model:
- vertex_ai - Google Vertex AI (Gemini models)
- anthropic - Anthropic (Claude models)
- openai - OpenAI (GPT models)
- openai_compatible - Any OpenAI-compatible API
Conversation Turns
A turn in Penelope is one complete user-assistant exchange: Penelope sends a message to the target and receives a response. Within a single turn, Penelope may also use internal analysis tools (e.g., analyze_response, extract_information), but these do not count as separate turns.
The max_turns parameter controls how many of these exchanges Penelope will complete before stopping. Default: 10.
Setting Max Turns
Environment Variable:
Programmatic (global default):
Per Agent (default for all tests run by this agent):
Per Test (overrides agent default for a specific test):
Early Stopping Behavior
Penelope uses a goal achievement metric to evaluate progress after each turn. To ensure the agent exercises the conversation fully, early stopping is only allowed after completing 80% of the configured max_turns:
- With
max_turns=10, the agent runs at least 8 turns before it can stop early - With
max_turns=20, the agent runs at least 16 turns
This prevents premature stopping when the goal appears achieved after only a few exchanges, which would miss important conversational dynamics.
You can override the default 80% threshold with an explicit min_turns parameter:
If min_turns exceeds max_turns, it is automatically capped to max_turns.
Choosing Max Turns: Start with 10 for simple tests. Use 15-20 for social engineering or multi-turn attack scenarios. Use 25-30 for comprehensive exploratory testing.
Tool Execution Limit
Separately from max_turns, Penelope enforces a tool execution limit to prevent infinite loops. This counts every tool call (both target interactions and internal analysis tools). It defaults to max_turns * 5 and can be overridden:
Timeout
Set execution timeout to prevent runaway tests:
Transparency & Verbosity
Control output detail level:
Test-Level Configuration
Override max_turns per test:
Log Level
Control logging verbosity:
Environment Variable:
Programmatic:
Complete Configuration Example
Next: Learn how to Extend Penelope with custom tools and architecture details, or explore Examples for practical use cases.