@k1ssh/qbot v0.1.0
qbot
QBot SDK is the engine that powers the K1s QBot, your kubepilot assistant. See this as the Kubernetes' kubelet
, where you can request actions to be performed on your Kubernetes cluster and resources. QBot is an Agent that executes task in an (ZTNA) environment on behalf of a user.
Concepts
tasks
: The tasks are the requests that you can send to the QBot. For example, you can request the QBot to "deploy a new application", or to "scale an existing application", or to "troubleshoot a problem". The QBot will process the request and execute the necessary actions to fulfill the request.resources
: The resources are the objects that the QBot can manage. For example, the QBot can manage Deployments, Services, ConfigMaps, etc.applications
: The applications are the objects that the QBot can manage. For example, the QBot can manage Helm Charts, Kustomize, etc.applications
are a subset ofresources
.tools
: The tools are the AI tools that the QBot uses to process the requests. For example, the QBot can use theHelm
tool to deploy a Helm Chart, or theKustomize
tool to deploy a Kustomize application.tools
encapsulate the logic to manage theapplications
andresources
to simplify thetasks
a DevOps engineer can perform. The QBot can use multipletools
to process a singletask
.
Components model
The QBot is composed of the following components:
- The QBot
Engine
: The main engine that processes the requests and executes thetasks
through one or moretools
. - The QBot
Tools
: AI Tools allow LLMs to interact with the QBot Engine, see tools as the APIs for LLMs. The QBot can use multipletools
to process a singletask
. Tasks
: The tasks are acions implemented by tools that the QBot can perform. For example, the QBot can detect the "drift configuration" of anapplication
, or can perform a "root cause analysis" of a problem. By executing thedrift_detection
tool that will perform the actions needed. Atask
can be composed of multipletools
.- The QBot
CLI
: The CLI is the interface that the user can use to interact with the QBot SDK. The CLI allows the user to interact with an environment.
Both, the CLI and the QBot Engine, interact with the QBot SDK to perform the actions. The QBot SDK is a set of libraries that encapsulate the logic to interact with the Kubernetes API, Helm, Kustomize, etc.
In an analogy with Kubernetes applications, the QBot Engine is the kubelet
, the QBot Tools are the pods
, the QBot tasks are the deployments
, and the QBot CLI is the kubectl
, leveraging MCP (Model Context Protocol) to interact with LLMs, MCP would be the kube-api-server
API. QBot is a kubelet
for LLMs.
At "La Rebelion" we consider that MCP (Model Context Protocol) is the best way to interact with LLMs, so the QBot API is a group of MCP Tools that can be used by LLMs to interact with the QBot Engine. The MCP server can expose the MCP API over HTTP, or stdin
- for CLI, important in airgapped environments.
Components Overview Diagram
Components Diagram Details
To install dependencies:
bun install
To run:
bun run index.ts
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Helm
- Kubernetes
- Bitnami
- "La Rebelion" GitHub
- "La Rebelion" Website
- Agentico
- Agentico GitHub
- K1s, simplifying Kubernetes for developers.
9 months ago