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: src/aks-agent/README.rst
+59-17Lines changed: 59 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,32 +4,41 @@ Azure CLI AKS Agent Extension
4
4
Introduction
5
5
============
6
6
7
-
The AKS Agent extension provides the "az aks agent" command, an AI-powered assistant that
8
-
helps analyze and troubleshoot Azure Kubernetes Service (AKS) clusters using Large Language
9
-
Models (LLMs). The agent combines cluster context, configurable toolsets, and LLMs to answer
10
-
natural-language questions about your cluster (for example, "Why are my pods not starting?")
11
-
and can investigate issues in both interactive and non-interactive (batch) modes.
7
+
8
+
The AKS Agent extension provides the "az aks agent" command, an AI-powered assistant that helps analyze and troubleshoot Azure Kubernetes Service (AKS) clusters using Large Language Models (LLMs). The agent combines cluster context, configurable toolsets, and LLMs to answer natural-language questions about your cluster (for example, "Why are my pods not starting?") and can investigate issues in both interactive and non-interactive (batch) modes.
9
+
10
+
New in this version: **az aks agent-init** command for easy LLM model configuration!
11
+
12
+
You can now use `az aks agent-init` to interactively add and configure LLM models before asking questions. This command guides you through the setup process, allowing you to add multiple models as needed. When asking questions with `az aks agent`, you can:
13
+
14
+
- Use `--config-file` to specify your own model configuration file
15
+
- Use `--model` to select a previously configured model
16
+
- If neither is provided, the last configured LLM will be used by default
17
+
18
+
This makes it much easier to manage and switch between multiple models for your AKS troubleshooting workflows.
12
19
13
20
Key capabilities
14
21
----------------
15
22
23
+
16
24
- Interactive and non-interactive modes (use --no-interactive for batch runs).
17
-
- Support for multiple LLM providers (Azure OpenAI, OpenAI, etc.) via environment variables.
18
-
- Configurable via a JSON/YAML config file provided with --config-file.
25
+
- Support for multiple LLM providers (Azure OpenAI, OpenAI, etc.) via interactive configuration.
26
+
- **Easy model setup with `az aks agent-init`**: interactively add and configure LLM models, run multiple times to add more models.
27
+
- Configurable via a JSON/YAML config file provided with --config-file, or select a model with --model.
28
+
- If no config or model is specified, the last configured LLM is used automatically.
19
29
- Control echo and tool output visibility with --no-echo-request and --show-tool-output.
20
30
- Refresh the available toolsets with --refresh-toolsets.
21
31
- Stay in traditional toolset mode by default, or opt in to aks-mcp integration with ``--aks-mcp`` when you need the enhanced capabilities.
22
32
23
33
Prerequisites
24
34
-------------
25
-
26
-
Before using the agent, make sure provider-specific environment variables are set. For
27
-
example, Azure OpenAI typically requires AZURE_API_BASE, AZURE_API_VERSION, and AZURE_API_KEY,
28
-
while OpenAI requires OPENAI_API_KEY. For more details about supported providers and required
35
+
No need to manually set environment variables! All model and credential information can be configured interactively using `az aks agent-init`.
36
+
For more details about supported model providers and required
This command will guide you through adding a new LLM model. You can run it multiple times to add more models or update existing models. All configured models are saved locally and can be selected when asking questions.
58
+
59
+
Run the agent (Azure OpenAI example) :
42
60
-----------------------------------
43
61
62
+
**1. Use the last configured model (no extra parameters needed):**
Copy file name to clipboardExpand all lines: src/aks-agent/azext_aks_agent/_help.py
+23-8Lines changed: 23 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
short-summary: Run AI assistant to analyze and troubleshoot Kubernetes clusters.
17
17
long-summary: |-
18
18
This command allows you to ask questions about your Azure Kubernetes cluster and get answers using AI models.
19
-
Environment variables must be set to use the AI model, please refer to https://docs.litellm.ai/docs/providers to learn more about supported AI providers and models and required environment variables.
19
+
No need to manually set environment variables! All model and credential information can be configured interactively using `az aks agent-init` or via a config file.
20
20
parameters:
21
21
- name: --name -n
22
22
type: string
@@ -36,7 +36,7 @@
36
36
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.
37
37
- name: --api-key
38
38
type: string
39
-
short-summary: API key to use for the LLM (if not given, uses environment variables AZURE_API_KEY, OPENAI_API_KEY).
39
+
short-summary: API key to use for the LLM (if not given, uses environment variables AZURE_API_KEY, OPENAI_API_KEY). (Deprecated)
40
40
- name: --config-file
41
41
type: string
42
42
short-summary: Path to configuration file.
@@ -63,23 +63,25 @@
63
63
short-summary: Enable AKS MCP integration for enhanced capabilities. Traditional mode is the default.
64
64
65
65
examples:
66
+
- name: Ask about pod issues in the cluster with last configured model
67
+
text: |-
68
+
az aks agent "Why are my pods not starting?" --name MyManagedCluster --resource-group MyResourceGroup
66
69
- name: Ask about pod issues in the cluster with Azure OpenAI
0 commit comments