Environment Variables
Your OpenAI API key. Obtain it from OpenAI Platform.
OpenAI API endpoint URL. Use the default for standard OpenAI API access.
Optional HTTP proxy URL for enhanced security and network isolation (e.g.,
http://your-proxy:8080).Configuration Example
Add the following to your.env file:
Supported Models
OpenAI provider offers cutting-edge capabilities across multiple model families:Reasoning Models (o-series)
Advanced models with step-by-step analytical thinking capabilities:- o4-mini - Cost-effective reasoning model for complex tasks
- o3-mini - Balanced reasoning performance and cost
- o3 - Flagship reasoning model for deep security analysis
- o1 - Previous generation reasoning model
GPT-4.1 Series
Latest flagship models optimized for complex security research:- gpt-4.1 - Latest GPT-4 model with enhanced capabilities
- gpt-4.1-mini - Cost-effective variant for high-volume tasks
- gpt-5-mini - Next-generation mini model
Model Selection by Agent Type
PentAGI automatically selects appropriate models based on task complexity:| Agent Type | Default Model | Temperature | Max Tokens | Use Case |
|---|---|---|---|---|
| Simple tasks | gpt-4.1-mini | 0.5 | 3,000 | Quick queries and basic analysis |
| Simple JSON | gpt-4.1-mini | 0.5 | 3,000 | Structured data extraction |
| Primary Agent | o3-mini / o4-mini | - | 4,000 | Core penetration testing |
| Assistant | o3-mini / o4-mini | - | 6,000 | Multi-step security workflows |
| Generator | o3-mini / o3 | - | 8,192 | Report and exploit generation |
| Refiner | gpt-4.1 | 0.7 | 6,000 | Result refinement and analysis |
| Adviser | o3-mini / o4-mini | - | 4,000 | Strategic recommendations |
| Reflector | o3-mini / o4-mini | - | 3,000 | Analysis review and critique |
| Searcher | gpt-4.1-mini | 0.7 | 4,000 | Information gathering |
| Enricher | gpt-4.1-mini | 0.7 | 4,000 | Data enrichment |
| Coder | gpt-4.1 | 0.2 | 6,000 | Exploit development |
| Installer | gpt-4.1 | 0.2 | 6,000 | Tool installation and setup |
| Pentester | o3-mini / o4-mini | - | 4,000 | Dedicated penetration testing |
Reasoning models (o-series) use
reasoning.effort parameter instead of temperature. The effort levels are: low, medium, and high.Features
- Advanced Reasoning: o-series models with step-by-step analytical thinking
- Latest GPT-4.1 Series: Flagship models optimized for complex security research
- Cost-Effective Options: From nano models for high-volume scanning to powerful reasoning models
- Versatile Performance: Fast, intelligent models for multi-step security analysis
- Proven Reliability: Industry-leading models with consistent performance
Pricing
Example pricing per million tokens (as configured in the provider):| Model | Input ($/M tokens) | Output ($/M tokens) |
|---|---|---|
| gpt-4.1-mini | $0.40 | $1.60 |
| gpt-4.1 | $2.00 | $8.00 |
| o3-mini / o4-mini | $1.10 | $4.40 |
Custom Provider Configuration
For advanced users, you can customize model selection per agent type using a YAML configuration file:Troubleshooting
Authentication Errors
If you see authentication errors:- Verify your API key is valid at OpenAI Platform
- Ensure the key has sufficient credits
- Check for any typos in the
.envfile
Rate Limits
OpenAI enforces rate limits based on your account tier. If you encounter rate limit errors:- Upgrade your OpenAI account tier for higher limits
- Implement retry logic in your workflows
- Consider using different models for different tasks to spread load
Model Availability
Some models may require specific API access:- o-series models require access to the OpenAI reasoning API
- GPT-5 models may require beta access