AI Setup with Anthropic¶
Section: AI Assistant | Article 29
Audience: System Administrators
Last Updated: 2026-04-07
Overview¶
This article walks through configuring Anthropic (Claude) as the AI completion provider for RP-PAM. Anthropic provides high-quality language model completions through the Claude family of models.
Important: Anthropic does not currently offer a standalone embedding API. If you use Anthropic for completions, you must pair it with a second provider (Ollama or OpenAI) for embedding support. Without embeddings, risk scoring and anomaly detection will not function.
Prerequisites¶
| Requirement | Detail |
|---|---|
| RP-PAM licence | Enterprise or MSP tier |
| Anthropic account | An account at console.anthropic.com |
| API key | A valid Anthropic API key |
| Network access | The RP-PAM server must be able to reach api.anthropic.com on port 443 |
| Embedding provider | Ollama or OpenAI configured for embeddings (see note above) |
Step 1: Get an Anthropic API Key¶
- Sign in to console.anthropic.com.
- Navigate to API Keys in the settings.
- Click Create Key.
- Name it:
RP-PAM - Copy the key immediately.
The key looks like: sk-ant-api03-...
Step 2: Encrypt the API Key¶
Store the API key in RP-PAM's encrypted vault.
Windows PowerShell:
& "C:\Program Files\Ravenphyre\RP-PAM\tools\rppam-migrate.exe" vault-store `
--key "ai-anthropic-key" `
--value "sk-ant-api03-YOUR_ANTHROPIC_API_KEY"
Linux:
sudo /opt/rppam/tools/rppam-migrate vault-store \
--key "ai-anthropic-key" \
--value "sk-ant-api03-YOUR_ANTHROPIC_API_KEY"
Step 3: Configure rppam.config¶
Option A: Anthropic Only (Completions Without Embeddings)¶
If you do not need risk scoring or anomaly detection:
{
"ai": {
"enabled": true,
"provider": "anthropic",
"apiKeyVaultKey": "ai-anthropic-key",
"completionModel": "claude-sonnet-4-20250514",
"maxTokens": 4096,
"temperature": 0.3,
"riskScoring": {
"enabled": false
},
"anomalyDetection": {
"enabled": false
}
}
}
This configuration enables natural-language queries and access request parsing, but disables features that require embeddings.
Option B: Anthropic + Ollama (Full Features, Recommended)¶
Pair Anthropic completions with Ollama embeddings for full functionality with maximum privacy on the embedding side:
{
"ai": {
"enabled": true,
"provider": "anthropic",
"apiKeyVaultKey": "ai-anthropic-key",
"completionModel": "claude-sonnet-4-20250514",
"maxTokens": 4096,
"temperature": 0.3,
"embedding": {
"provider": "ollama",
"ollamaBaseUrl": "http://localhost:11434",
"embeddingModel": "nomic-embed-text",
"embeddingDimension": 768
},
"riskScoring": {
"enabled": true,
"threshold": 60
},
"anomalyDetection": {
"enabled": true,
"lookbackDays": 90
}
}
}
Option C: Anthropic + OpenAI (Full Features, Cloud)¶
Pair Anthropic completions with OpenAI embeddings:
{
"ai": {
"enabled": true,
"provider": "anthropic",
"apiKeyVaultKey": "ai-anthropic-key",
"completionModel": "claude-sonnet-4-20250514",
"maxTokens": 4096,
"temperature": 0.3,
"embedding": {
"provider": "openai",
"apiKeyVaultKey": "ai-openai-key",
"embeddingModel": "text-embedding-3-small",
"embeddingDimension": 1536
},
"riskScoring": {
"enabled": true,
"threshold": 60
},
"anomalyDetection": {
"enabled": true,
"lookbackDays": 90
}
}
}
Note: Option C requires storing a second API key for OpenAI (see Article 28 Steps 1-2).
Configuration Fields¶
| Field | Description | Default |
|---|---|---|
provider |
Set to "anthropic" |
(required) |
apiKeyVaultKey |
Vault key for the Anthropic API key | (required) |
completionModel |
Claude model for completions | claude-sonnet-4-20250514 |
maxTokens |
Maximum tokens in a completion response | 4096 |
temperature |
Response creativity (0.0-1.0) | 0.3 |
embedding.provider |
Separate provider for embeddings: "ollama" or "openai" |
(optional) |
embedding.embeddingModel |
Embedding model name | (depends on provider) |
embedding.embeddingDimension |
Vector dimension for the embedding model | (depends on model) |
Recommended Anthropic Models¶
| Model | Use Case | Notes |
|---|---|---|
claude-sonnet-4-20250514 |
General purpose (recommended) | Best balance of quality and cost |
claude-opus-4-20250514 |
Complex reasoning | Higher quality, higher cost |
claude-haiku-3-20250307 |
Fast, cost-effective | Good for high-volume, simpler queries |
Step 4: Restart RP-PAM¶
Windows PowerShell:
Linux:
Step 5: Verify AI Is Working¶
Check Module Health¶
Linux:
curl -s http://localhost:7101/api/v1/modules \
-H "Authorization: Bearer $ADMIN_JWT" | jq '.items[] | select(.moduleName == "ai")'
PowerShell:
$modules = Invoke-RestMethod -Uri "http://localhost:7101/api/v1/modules" `
-Headers @{ Authorization = "Bearer $adminJwt" }
$modules.items | Where-Object { $_.moduleName -eq "ai" } | ConvertTo-Json
Expected:
{
"moduleName": "ai",
"status": "healthy",
"provider": "anthropic",
"completionModel": "claude-sonnet-4-20250514",
"embeddingProvider": "ollama",
"embeddingModel": "nomic-embed-text"
}
Test a Query¶
Linux:
curl -s -X POST http://localhost:7101/api/v1/ai/query \
-H "Authorization: Bearer $ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{ "query": "Summarise access activity for today." }' | jq .
PowerShell:
$response = Invoke-RestMethod -Uri "http://localhost:7101/api/v1/ai/query" `
-Method Post `
-Headers @{ Authorization = "Bearer $adminJwt" } `
-ContentType "application/json" `
-Body '{ "query": "Summarise access activity for today." }'
$response | ConvertTo-Json
Troubleshooting¶
| Problem | Cause | Solution |
|---|---|---|
"status": "unhealthy" for AI module |
API key invalid or expired | Regenerate the key at console.anthropic.com; re-store with vault-store |
401 or authentication_error |
Wrong API key | Verify the vault key name matches apiKeyVaultKey |
429 rate_limit_error |
Rate limit exceeded | Reduce request frequency or contact Anthropic for higher limits |
| Risk scoring shows "not available" | No embedding provider configured | Add an embedding section with Ollama or OpenAI |
| Slow responses | Large model or network latency | Try claude-haiku-3-20250307 for faster responses |
overloaded_error |
Anthropic API temporarily overloaded | Retry after a few seconds; this is transient |
Next Steps¶
- AI Setup with Ollama -- Set up Ollama for self-hosted embeddings (pairs well with Anthropic)
- AI Setup with OpenAI -- Alternative provider with built-in embeddings
- AI Assistant Overview -- What the AI module can do
RP-PAM v1.0.0 -- Copyright 2026 Ravenphyre. All rights reserved.