kagent Cheatsheet

kagent is a CNCF Sandbox project that brings agentic AI to Kubernetes clusters, letting you define, deploy, and chat with AI agents as native CRDs. This cheatsheet covers the kagent CLI for installing the platform, managing agents, and troubleshooting from your terminal.

Installation and Setup

# Install the kagent CLI via Homebrew
brew install kagent

# Or install via install script
curl https://raw.githubusercontent.com/kagent-dev/kagent/refs/heads/main/scripts/get-kagent | bash

# Set your model provider API key
export OPENAI_API_KEY="your-api-key-here"

# Install kagent to the current cluster with sample agents
kagent install --profile demo

# Install a minimal profile with no default agents
kagent install --profile minimal

# Remove kagent from the cluster
kagent uninstall

Dashboard and UI

# Open the kagent dashboard (sets up port-forward automatically)
kagent dashboard

# Print the kagent CLI and control plane version
kagent version

# Generate a bug report for troubleshooting
kagent bug-report

Managing Agents

# List all agents registered in the cluster
kagent get agent

# Get a specific kagent resource
kagent get <resource-type>

# Start a conversation with an agent
kagent invoke -t "What Helm charts are in my cluster?" --agent helm-agent

# Invoke an agent with a one-off prompt
kagent invoke -t "What API resources are running?" --agent my-first-k8s-agent

Shell and Help

# List every available command
kagent help

# Generate an autocompletion script for your shell
kagent completion bash
kagent completion zsh

Prefer the terminal? Every kagent agent can also be reached through Slack, Discord, or Telegram via Agent-to-Agent messaging, so you can keep the CLI workflow above for scripting and automation while chatting with the same agents elsewhere.