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 when used standalone via the SDK. 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
Platform vs Standalone Usage: When Penelope runs as part of platform test execution (from the Test Sets page or via the SDK TestSet.execute() method), it uses the user’s configured default execution model from Model settings, or the DEFAULT_EXECUTION_MODEL environment variable as a fallback. Per-run overrides configured in the execution drawer take precedence over all defaults. The PENELOPE_DEFAULT_MODEL and PenelopeConfig settings described above apply only to standalone SDK usage.
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: