Skip to main content
PentAGI integrates with Anthropic’s Claude models, known for their exceptional safety, reasoning capabilities, and sophisticated understanding of complex security contexts.

Environment Variables

ANTHROPIC_API_KEY
string
required
Your Anthropic API key. Obtain it from Anthropic Console.
ANTHROPIC_SERVER_URL
string
default:"https://api.anthropic.com/v1"
Anthropic API endpoint URL. Use the default for standard Anthropic API access.
PROXY_URL
string
Optional HTTP proxy URL for secure environments and network isolation (e.g., http://your-proxy:8080).

Configuration Example

Add the following to your .env file:
# Basic Anthropic setup
ANTHROPIC_API_KEY=sk-ant-...
ANTHROPIC_SERVER_URL=https://api.anthropic.com/v1

# Using with proxy for secure environments
ANTHROPIC_API_KEY=sk-ant-...
PROXY_URL=http://your-proxy:8080

Supported Models

Anthropic provider delivers superior capabilities across multiple Claude model families:

Claude 4 Series

Latest flagship models with exceptional reasoning:
  • claude-4-sonnet - Advanced reasoning for sophisticated penetration testing
  • claude-4-opus - Most capable Claude model for complex security research

Claude 3.7 Series

Extended thinking capabilities:
  • claude-3.7-sonnet - Step-by-step thinking for methodical security research

Claude 3.5 Series

High-performance models:
  • claude-3-5-sonnet - Balanced performance for comprehensive security analysis
  • claude-3-5-haiku - Blazing-fast model for real-time vulnerability scanning

Claude 3 Series

Proven models for various use cases:
  • claude-3-opus - Powerful model for deep security analysis
  • claude-3-sonnet - Versatile model for threat hunting
  • claude-3-haiku - Fast model for high-volume scanning

Features

  • Advanced Reasoning: Claude 4 series with exceptional reasoning capabilities
  • Extended Thinking: Claude 3.7 with step-by-step analytical thinking
  • High-Speed Performance: Haiku models for blazing-fast vulnerability scans
  • Comprehensive Analysis: Sonnet models for complex security analysis
  • Safety-First Design: Built-in safety mechanisms for responsible security testing
  • Large Context Windows: Up to 200K tokens for analyzing extensive codebases

Model Selection by Agent Type

PentAGI leverages Claude’s advanced understanding of security contexts:
Agent TypeRecommended ModelContext WindowUse Case
Primary Agentclaude-4-sonnet200K tokensCore penetration testing workflows
Assistantclaude-3.7-sonnet200K tokensMulti-step security analysis
Generatorclaude-4-sonnet200K tokensExploit and report generation
Searcherclaude-3-5-haiku200K tokensFast information gathering
Coderclaude-4-opus200K tokensComplex exploit development
Pentesterclaude-3-5-sonnet200K tokensDedicated penetration testing
Claude models are particularly effective for:
  • Complex security analysis requiring deep reasoning
  • Analyzing large codebases and documentation
  • Generating detailed penetration testing reports
  • Ethical security testing with built-in safety guardrails

Pricing

Anthropic uses token-based pricing. Check Anthropic Pricing for current rates. Example pricing tiers:
ModelPerformanceRelative Cost
Claude 3 HaikuFastestLowest
Claude 3.5 HaikuVery FastLow
Claude 3 SonnetBalancedMedium
Claude 3.5 SonnetHighMedium-High
Claude 3.7 SonnetExtended ThinkingMedium-High
Claude 4 SonnetAdvancedHigh
Claude 3/4 OpusMost CapableHighest
Claude models have different rate limits based on your API tier. Monitor your usage in the Anthropic Console to avoid interruptions.

AWS Bedrock Alternative

You can also access Claude models through AWS Bedrock for enterprise deployments:
  • Enhanced security with AWS IAM integration
  • VPC endpoint support for private networking
  • Enterprise compliance certifications
  • Pay-as-you-go or provisioned throughput options
See AWS Bedrock documentation for configuration details.

Advanced Configuration

Claude models support various parameters for fine-tuning:
assistant:
  model: "claude-4-sonnet"
  temperature: 0.7
  top_p: 0.9
  max_tokens: 8192
  # Claude-specific parameters
  stop_sequences: ["\n\nHuman:", "\n\nAssistant:"]

Parameters

temperature
float
default:"0.7"
Controls randomness (0.0-1.0). Lower values make output more focused and deterministic.
top_p
float
default:"0.9"
Nucleus sampling parameter (0.0-1.0). Controls diversity of output.
max_tokens
integer
Maximum number of tokens to generate. Claude models support up to 4096 output tokens.
stop_sequences
array
Custom sequences where the model should stop generating.

Troubleshooting

Authentication Errors

If you see authentication errors:
  1. Verify your API key at Anthropic Console
  2. Ensure your account has active credits or a valid payment method
  3. Check for typos in the .env file

Rate Limits

Anthropic enforces different rate limits based on your usage tier:
  • Free tier: Limited requests per minute
  • Build tier: Increased limits for development
  • Scale tier: Production-ready rate limits
Check your tier and limits in the Anthropic Console.

Context Length Errors

If you exceed the context window:
  • Enable PentAGI’s automatic context summarization
  • Split large analyses into smaller chunks
  • Use models with larger context windows (all Claude models support 200K tokens)

Model Availability

Some Claude models may require:
  • API access approval for newer models (like Claude 4)
  • Specific API version headers
  • Beta program enrollment
Check the Anthropic documentation for current model availability.

Build docs developers (and LLMs) love