|
5 | 5 | # -------------------------------------------------------------------------------------------- |
6 | 6 |
|
7 | 7 | # pylint: disable=too-many-lines |
8 | | - |
9 | 8 | from knack.help_files import helps |
10 | 9 |
|
11 | 10 | helps[ |
|
33 | 32 | Each provider may require different environment variables and model naming conventions. |
34 | 33 | For a full list of supported providers, model patterns, and required environment variables, see https://docs.litellm.ai/docs/providers. |
35 | 34 | Note: For Azure OpenAI, it is recommended to set the deployment name as the model name until https://github.com/BerriAI/litellm/issues/13950 is resolved. |
36 | | - - name: --api-key |
37 | | - type: string |
38 | | - short-summary: API key to use for the LLM (if not given, uses environment variables AZURE_API_KEY, OPENAI_API_KEY). (Deprecated) |
39 | | - - name: --config-file |
40 | | - type: string |
41 | | - short-summary: Path to configuration file. |
42 | 35 | - name: --max-steps |
43 | 36 | type: int |
44 | 37 | short-summary: Maximum number of steps the LLM can take to investigate the issue. |
|
57 | 50 | - name: --status |
58 | 51 | type: bool |
59 | 52 | short-summary: Show AKS agent configuration and status information. |
60 | | - - name: --aks-mcp |
61 | | - type: bool |
62 | | - short-summary: Enable AKS MCP integration for enhanced capabilities. Traditional mode is the default. |
63 | 53 |
|
64 | 54 | examples: |
| 55 | + - name: Ask about pod issues in the cluster with OpenAI |
| 56 | + text: |- |
| 57 | + az aks agent "Why are my pods not starting?" --name MyManagedCluster --resource-group MyResourceGroup --model gpt-4o |
65 | 58 | - name: Ask about pod issues in the cluster with last configured model |
66 | 59 | text: |- |
67 | 60 | az aks agent "Why are my pods not starting?" --name MyManagedCluster --resource-group MyResourceGroup |
|
71 | 64 | - name: Ask about pod issues in the cluster with OpenAI |
72 | 65 | text: |- |
73 | 66 | az aks agent "Why are my pods not starting?" --name MyManagedCluster --resource-group MyResourceGroup --model gpt-4o |
74 | | - - name: Run agent with config file |
75 | | - text: | |
76 | | - az aks agent "Check kubernetes pod resource usage" --config-file /path/to/custom.yaml --name MyManagedCluster --resource-group MyResourceGroup |
77 | | - Here is an example of config file: |
78 | | - ```json |
79 | | - llms: |
80 | | - - provider: azure |
81 | | - MODEL_NAME: gpt-4.1 |
82 | | - AZURE_API_KEY: ******* |
83 | | - AZURE_API_BASE: https://{azure-openai-service-name}.openai.azure.com/ |
84 | | - AZURE_API_VERSION: 2025-04-01-preview |
85 | | - # define a list of mcp servers, mcp server can be defined |
86 | | - mcp_servers: |
87 | | - aks_mcp: |
88 | | - description: "The AKS-MCP is a Model Context Protocol (MCP) server that enables AI assistants to interact with Azure Kubernetes Service (AKS) clusters" |
89 | | - url: "http://localhost:8003/sse" |
90 | | -
|
91 | | - # try adding your own tools or toggle the built-in toolsets here |
92 | | - # e.g. query company-specific data, fetch logs from your existing observability tools, etc |
93 | | - # To check how to add a customized toolset, please refer to https://docs.robusta.dev/master/configuration/holmesgpt/custom_toolsets.html#custom-toolsets |
94 | | - # To find all built-in toolsets, please refer to https://docs.robusta.dev/master/configuration/holmesgpt/builtin_toolsets.html |
95 | | - toolsets: |
96 | | - # add a new json processor toolset |
97 | | - json_processor: |
98 | | - description: "A toolset for processing JSON data using jq" |
99 | | - prerequisites: |
100 | | - - command: "jq --version" # Ensure jq is installed |
101 | | - tools: |
102 | | - - name: "process_json" |
103 | | - description: "A tool that uses jq to process JSON input" |
104 | | - command: "echo '{{ json_input }}' | jq '.'" # Example jq command to format JSON |
105 | | - # disable a built-in toolsets |
106 | | - aks/core: |
107 | | - enabled: false |
108 | | - ``` |
109 | 67 | - name: Run in interactive mode without a question |
110 | | - text: az aks agent "Check the pod status in my cluster" --name MyManagedCluster --resource-group MyResourceGroup --model azure/gpt-4.1 --api-key "sk-xxx" |
| 68 | + text: az aks agent "Check the pod status in my cluster" --name MyManagedCluster --resource-group MyResourceGroup --model azure/gpt-4.1 |
111 | 69 | - name: Run in non-interactive batch mode |
112 | 70 | text: az aks agent "Diagnose networking issues" --no-interactive --max-steps 15 --model azure/gpt-4.1 |
113 | 71 | - name: Show detailed tool output during analysis |
114 | 72 | text: az aks agent "Why is my service workload unavailable in namespace workload-ns?" --show-tool-output --model azure/gpt-4.1 |
115 | | - - name: Use custom configuration file |
116 | | - text: az aks agent "Check kubernetes pod resource usage" --config-file /path/to/custom.yaml --model azure/gpt-4.1 |
117 | 73 | - name: Run agent with no echo of the original question |
118 | 74 | text: az aks agent "What is the status of my cluster?" --no-echo-request --model azure/gpt-4.1 |
119 | 75 | - name: Refresh toolsets to get the latest available tools |
120 | 76 | text: az aks agent "What is the status of my cluster?" --refresh-toolsets --model azure/gpt-4.1 |
121 | 77 | - name: Show agent status (MCP readiness) |
122 | 78 | text: az aks agent --status |
123 | 79 | - name: Run in interactive mode without a question |
124 | | - text: az aks agent "Check the pod status in my cluster" --name MyManagedCluster --resource-group MyResourceGroup --model azure/my-gpt4.1-deployment --api-key "sk-xxx" |
| 80 | + text: az aks agent "Check the pod status in my cluster" --name MyManagedCluster --resource-group MyResourceGroup --model azure/my-gpt4.1-deployment |
125 | 81 | - name: Run in non-interactive batch mode |
126 | 82 | text: az aks agent "Diagnose networking issues" --no-interactive --max-steps 15 --model azure/my-gpt4.1-deployment |
127 | 83 | - name: Show detailed tool output during analysis |
128 | 84 | text: az aks agent "Why is my service workload unavailable in namespace workload-ns?" --show-tool-output --model azure/my-gpt4.1-deployment |
129 | | - - name: Use custom configuration file |
130 | | - text: az aks agent "Check kubernetes pod resource usage" --config-file /path/to/custom.yaml --model azure/my-gpt4.1-deployment |
131 | 85 | - name: Run agent with no echo of the original question |
132 | 86 | text: az aks agent "What is the status of my cluster?" --no-echo-request --model azure/my-gpt4.1-deployment |
133 | 87 | - name: Refresh toolsets to get the latest available tools |
134 | 88 | text: az aks agent "What is the status of my cluster?" --refresh-toolsets --model azure/my-gpt4.1-deployment |
135 | 89 | """ |
136 | | - |
137 | | -helps[ |
138 | | - "aks agent-init" |
139 | | -] = """ |
140 | | - type: command |
141 | | - short-summary: Initialize and validate LLM provider/model configuration for AKS agent. |
142 | | - long-summary: |- |
143 | | - This command interactively guides you to select an LLM provider and model, validates the connection, and saves the configuration for later use. |
144 | | - You can run this command multiple times to add or update different model configurations. |
145 | | - examples: |
146 | | - - name: Initialize configuration for Azure OpenAI, OpenAI or other llms |
147 | | - text: az aks agent-init |
148 | | -""" |
0 commit comments