製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗The system is composed of a UI Extension for user interaction, an Agent service for intelligent decision-making, and one or more MCP Servers that act as the intermediary between the agent and the Rancher API (or other backends).
The Agent is the orchestrator of the system’s intelligence. It is built on LangGraph and leverages a Large Language Model (LLM) as its reasoning engine, while the agent itself provides the structure, coordination, and secure execution of actions.
Specialized child agents are defined through AIAgentConfig CRDs, each backed by its own MCP server. Depending on the agents available to the user, the Agent runs in one of three modes:
Planner mode and plan approval are disabled by default and can be enabled through the Helm chart values:
plan:
enabled: true # use the planner instead of the supervisor
planApproval:
enabled: true # ask the user to approve multi-step plans before running them
The MCP Server acts as a secure, controlled gateway between the Agent and the Rancher and Kubernetes APIs. Its functions include:
The UI Extension provides the user-facing chat interface within the Rancher dashboard. It is designed to be a seamless part of the Rancher experience and is responsible for:
The UI Tools system allows the AI agent to intelligently select and dispatch specialized UI components (viewers, editors, comparators, etc.) to enhance responses. This is a generic mechanism that can be integrated into any user interface.
For comprehensive documentation on defining, configuring, and using UI tools, see UI Tools Configuration Guide. This covers:
For detailed documentation on the supervisor/child-agents architecture, planner mode, middleware system, and human validation flow, see ARCHITECTURE.md.
graph TD
subgraph "A. User Interaction"
User[User / Analyst / DevOps]
end
subgraph "B. Rancher AI Assistant (Processing)"
Agent(Agent)
LLM(LLM local or online)
MCPServer(MCP Server)
end
subgraph "C. Infrastructure"
Kubernetes(Clusters)
end
%% Step 1: User sends intent
User -- "1. Query " --> Agent
%% Step 2 & 3: Initial Reasoning Loop
Agent -- "2. Tool Planning Request" --> LLM
LLM -- "3. Action Plan (e.g., list_pods tool)" --> Agent
%% Step 4: Action Execution
Agent -- "4. Execute Tool via MCP" --> MCPServer
%% Step 5 & 6: Cluster Interaction
MCPServer -- "5. Secure Action " --> Kubernetes
Kubernetes -- "6. Raw Results / Status" --> MCPServer
%% Step 7: Raw results back to Agent
MCPServer -- "7. Raw Tool Output" --> Agent
%% Step 8 & 9: Final Interpretation Loop (Crucial step)
Agent -- "8. Interpret Raw Output" --> LLM
LLM -- "9. Formatted Final Answer" --> Agent
%% Step 10: Final Response to User
Agent -- "10. Final Conversational Response" --> User
%% Styles
style User fill:#e0f2f7,stroke:#1e88e5,stroke-width:2px
style Agent fill:#d4edda,stroke:#28a745,stroke-width:2px
style LLM fill:#fff3cd,stroke:#ffc107,stroke-width:2px
style MCPServer fill:#cce5ff,stroke:#007bff,stroke-width:2px
style Kubernetes fill:#f8d7da,stroke:#dc3545,stroke-width:2px
See the Quick Start guide for installation instructions.
The AI Assistant maintains persistent chat history with REST API endpoints for accessing and managing conversations:
GET /api/chats - List all chat sessionsGET /api/chats/{id}/messages - Retrieve all messages for a specific chat sessionDELETE /api/chats/{id} - Delete a specific chat sessionSee the OpenAPI spec for full API details.
The AI Agent supports multiple authentication methods for connecting to MCP servers. The authentication type is configured per agent via the AIAgentConfig CRD's authenticationType field.
No authentication is applied. The agent connects to the MCP server without any credentials. Suitable for MCP servers running locally or behind a network-level security boundary.
authenticationType: NONE
Uses the current user's Rancher session token to authenticate with the MCP server. The token is passed in the request headers, allowing the MCP server to enforce Rancher RBAC on behalf of the user.
authenticationType: RANCHER
HTTP Basic authentication using credentials stored in a Kubernetes secret. The secret must contain username and password keys.
authenticationType: BASIC
authenticationSecret: my-basic-auth-secret
Custom header-based authentication. The agent sends a static token (e.g., API key) stored in a Kubernetes secret as a request header to the MCP server.
authenticationType: HEADER
authenticationSecret: my-header-auth-secret
OAuth 2.0 with PKCE (Proof Key for Code Exchange) for MCP servers that implement the OAuth 2.0 authorization framework. It supports:
/.well-known/oauth-authorization-server metadata.S256 code challenge for secure authorization code exchange.authenticationType: OAUTH2
authenticationSecret: my-oauth-secret
OAuth Secret Format (when using static credentials):
The Kubernetes secret referenced by authenticationSecret should contain:
| Key | Required | Description |
|--------------------|----------|--------------------------------------------------------|
| clientID | Yes | The OAuth2 client identifier |
| clientSecret | No | The OAuth2 client secret (for confidential clients) |
| scope | No | Space-separated list of OAuth scopes |
| metadata_endpoint| Yes | Authorization server metadata endpoint (RFC 8414/OIDC) |
Flow:
401 Unauthorized response from the MCP server.