For the complete documentation index, see llms.txt. This page is also available as Markdown.

Welcome to Portainer-Command

Portainer-Command is the safe way to put AI agents to work on your Kubernetes fleet. It sits between AI agents and your clusters: agents can read cluster state, but every change they want to make is forced through a Git pull request that a person approves, and Portainer's GitOps engine delivers it.

ArchitectureRequirementsInstall


Why Portainer-Command exists

Anyone can point an AI agent at kubectl today. What most organizations lack is permission: no security team signs off on an agent holding cluster credentials, and no operations lead wants to be on call when it goes wrong. Portainer-Command is the set of guardrails that makes "yes" possible.

It helps two kinds of team:

  • Teams that haven't started. The built-in AI Workspace is the on-ramp: an agent with nothing to install, a prompt library of real tasks (security audits, image pinning, network policy baselines, RBAC review), and undo on everything. The governance isn't a tax on getting started. It's the reason you're allowed to.

  • Teams whose engineers already point agents at clusters, officially or not. Start from the administration side: a fleet-wide timeline of all agent activity, per-environment allow and deny, namespace restrictions, per-user token spend, an emergency halt for an environment or a user, and one-click revert of any agent change. Don't fight the behavior. Govern it.

What Portainer-Command does

  • Agents can't change a cluster directly. There is no tool that writes to a cluster. The only write path is a commit: an agent pushes a branch, Portainer-Command turns it into a pull request, and a person who could deploy the change themselves approves it.

  • Reads are scoped and expire. An agent asks for a read-only kubeconfig for one environment. It only reaches the namespaces that both Portainer lets the user read and an administrator has opened to agents, and it expires on its own.

  • Every action has a person behind it. An agent acts with its owner's own Portainer credential, and its pull requests are authored with its owner's own Git credential. Portainer-Command never widens anyone's access.

  • Everything can be undone. Any proposal can be reverted in one click, and an environment can be rolled back to any past state. Both happen as pull requests, too.

  • Spend is visible. Model token usage and cost are tracked per user and per workspace.

  • The threat model is published. It documents each threat considered and what stops it. Download the threat model (PDF) to share with your security team, or open the Threat model page in Portainer-Command.

How a change happens

1

A person sets a goal

A user gives a goal to their AI Workspace, or connects their own agent, such as Claude Code or Cursor.

2

The agent reads the environment

The agent reads live state through a scoped, read-only kubeconfig, and desired state by cloning the environment's manifests from Git.

3

The agent proposes a change

The agent pushes a branch and opens a proposal. Portainer-Command opens a pull request, authored by the person whose agent made it.

4

A person approves it

On the Proposals page, someone who holds the rights to deploy the change reviews the diff and approves or rejects it.

5

Portainer delivers it

Approving merges the pull request, and Portainer GitOps delivers the change to the environment.

Anything can then be undone from Portainer-Command, or from Git history.

Where to go next

Last updated

Was this helpful?