You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ai-providers/anthropic.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,27 @@ You can also pass the API key directly as a command-line parameter:
21
21
holmes ask "what pods are failing?" --model="anthropic/<your-claude-model>" --api-key="your-api-key"
22
22
```
23
23
24
+
## Prompt Caching
25
+
26
+
HolmesGPT adds Anthropic's prompt caching feature, which can significantly reduce costs and latency for repeated API calls with similar prompts.
27
+
28
+
HolmesGPT automatically adds cache control to the last message in each API call. This caches everything from the beginning of the conversation up to that point, making subsequent calls with the same prefix much faster and cheaper.
29
+
30
+
### How It Works
31
+
32
+
- Anthropic uses prefix-based caching - it caches the exact sequence of messages up to the cache control point
33
+
- The cache has a 5-minute lifetime by default
34
+
- Cached content must be at least 1024 tokens to be effective
35
+
- You're charged for cache writes on the first call, but subsequent cache hits are much cheaper
36
+
37
+
### Benefits in HolmesGPT
38
+
39
+
Prompt caching is particularly effective for HolmesGPT because:
40
+
41
+
- System prompts with tool definitions are large and static - perfect for caching
42
+
- Tool investigation loops reuse the same context multiple times
43
+
- Multi-step investigations benefit from cached conversation history
44
+
24
45
## Additional Resources
25
46
26
47
HolmesGPT uses the LiteLLM API to support Anthropic provider. Refer to [LiteLLM Anthropic docs](https://litellm.vercel.app/docs/providers/anthropic){:target="_blank"} for more details.
The bash toolset provides secure execution of common command-line tools used for troubleshooting and system analysis. It replaces multiple YAML-based toolsets with a single, comprehensive toolset that includes safety validation and command parsing.
4
+
5
+
**⚠️ Security Note**: This toolset executes commands on the system where Holmes is running. Only validated, safe commands are allowed, and the toolset is disabled by default for security reasons.
6
+
7
+
## Supported Commands
8
+
9
+
The bash toolset supports the following categories of commands:
10
+
11
+
### Cloud Providers
12
+
13
+
**AWS CLI (`aws`)**
14
+
15
+
- Supports various AWS services and operations
16
+
- Commands are validated for safety before execution
17
+
18
+
**Azure CLI (`az`)**
19
+
20
+
- Supports Azure operations including AKS management
21
+
- Network and account operations
22
+
23
+
### Kubernetes Tools
24
+
25
+
**kubectl**
26
+
27
+
- Standard Kubernetes operations: get, describe, logs, events
28
+
- Resource management and cluster inspection
29
+
- Live metrics via `kubectl top`
30
+
31
+
**Helm**
32
+
33
+
- Helm chart operations
34
+
- Repository management
35
+
- Release inspection
36
+
37
+
**ArgoCD**
38
+
39
+
- Application management
40
+
- Deployment status checking
41
+
42
+
### Container Tools
43
+
44
+
**Docker**
45
+
46
+
- Container inspection and management
47
+
- Image operations
48
+
- Basic Docker commands
49
+
50
+
### Text Processing Utilities
51
+
52
+
**Data Processing**
53
+
54
+
-`grep` - Text searching and pattern matching
55
+
-`jq` - JSON processing and querying
56
+
-`sed` - Stream editing and text transformation
57
+
-`awk` - Pattern scanning and text processing
58
+
59
+
**File Utilities**
60
+
61
+
-`cut` - Column extraction
62
+
-`sort` - Data sorting
63
+
-`uniq` - Duplicate removal
64
+
-`head` - Show first lines
65
+
-`tail` - Show last lines
66
+
-`wc` - Word, line, and character counting
67
+
68
+
**Text Transformation**
69
+
70
+
-`tr` - Character translation and deletion
71
+
-`base64` - Base64 encoding/decoding
72
+
73
+
### Special Tools
74
+
75
+
**kubectl_run_image**
76
+
77
+
Creates temporary debug pods in Kubernetes clusters for diagnostic commands:
78
+
79
+
- Runs commands in specified container images
80
+
- Automatically cleans up temporary pods
81
+
- Supports custom namespaces and timeouts
82
+
- Useful for network debugging, DNS resolution, and environment inspection
83
+
84
+
## Command Validation
85
+
86
+
All commands undergo security validation before execution:
87
+
88
+
- Only whitelisted commands and options are allowed
89
+
- Dangerous operations are blocked (file writes, system calls, etc.)
90
+
- Commands are parsed and validated for safety
91
+
- Pipe operations between supported commands are allowed
By default, the Coralogix toolset expects logs to use standard Kubernetes field names. If your Coralogix deployment uses different field names for Kubernetes metadata, you can customize the label mappings.
35
+
36
+
This is useful when:
37
+
38
+
- Your log ingestion pipeline uses custom field names
39
+
- You have a non-standard Coralogix setup with different metadata fields
40
+
- Your Kubernetes logs are structured differently in Coralogix
41
+
42
+
To find the correct field names, examine your logs in the Coralogix UI and identify how pod names, namespaces, log messages, and timestamps are labeled.
**Note:** Change `"stdio"` to `"sse"` in the transport argument.
39
+
40
+
### Step 3: Configure HolmesGPT
41
+
42
+
Add this configuration to your HolmesGPT config file (`~/.holmes/config.yaml`):
43
+
44
+
```yaml
45
+
mcp_servers:
46
+
aks-mcp:
47
+
description: "Azure Kubernetes Service(AKS) Model Context Protocol(MCP) server"
48
+
url: "http://localhost:8000/sse"
49
+
llm_instructions: "MCP server to get AKS cluster information, retrieve cluster resources and workloads, analyze network policies and VNet configurations, query control plane logs, fetch cluster metrics and health status. Investigate networking issues with NSGs and load balancers, perform kubectl operations, real-time monitoring of DNS, services across Azure Kubernetes environments"
50
+
51
+
```
52
+
53
+
## Investigation Examples
54
+
55
+
Once configured, you can investigate AKS issues using natural language queries:
56
+
57
+
### Cluster Health Issues
58
+
```bash
59
+
holmes ask "What issues do I have in my AKS cluster?"
0 commit comments