# Stakpak

> An open-source Rust agent for DevOps work that can run 24/7 on your own machines and keep your apps running

- Category: AI Coding / AI SDLC Automation
- Language: Rust
- Licence: Apache-2.0
- Repository: https://github.com/stakpak/agent
- Website: https://stakpak.dev
- Canonical page: https://ai-tldr.dev/tools/stakpak/

## In short

Stakpak is an open-source agent, written in Rust, built for DevOps and operations work. Its README describes it as an agent that lives on your machines 24/7, keeps your apps running and only pings when it needs a human. It sits in the AI SDLC Automation category of the AI Coding tools and is open-source, written in Rust and licensed Apache-2.0.

## Overview

Stakpak is an open-source agent, written in Rust, built for DevOps and operations work. Its README describes it as an agent that lives on your machines 24/7, keeps your apps running and only pings when it needs a human. It can generate infrastructure code, debug Kubernetes, configure CI/CD and automate deployments, and it is used interactively from a terminal UI or left running in the background as an autonomous service.

Its design starts from the premise that a single mistake by an AI agent can break production. Secret substitution lets the model work with credentials without ever seeing their values, Warden guardrails apply network-level policies that block destructive operations before they run, and a privacy mode redacts data such as IP addresses and AWS account IDs. File modifications are backed up so they can be recovered, and curated DevOps playbooks ship as Stakpak Rulebooks, markdown files with YAML frontmatter that you can extend with your own SOPs and runbooks.

Autopilot is the always-on half. `stakpak up` runs preflight checks and starts a background runtime that fires cron-style schedules, accepts inbound messages from Slack, Telegram or Discord, and routes notifications to a channel target such as a Slack #ops room. Behaviour is set by profiles in ~/.stakpak/config.toml (model, allowed tools, auto-approval, system prompt, max turns), while ~/.stakpak/autopilot.toml wires up schedules and channels; subagent tool calls run inside a Docker sandbox container.

Stakpak works with a Stakpak API key, with your own Anthropic, OpenAI or Gemini keys, or with a local OpenAI-compatible endpoint such as Ollama or LM Studio. It can also act as a security-hardened MCP server or an MCP proxy in front of other MCP servers, and it speaks the Agent Client Protocol so editors like Zed can use it as an agent. The project is released under the Apache-2.0 license.

## What it does

- Terminal UI agent for DevOps tasks: infrastructure code, Kubernetes debugging, CI/CD configuration and deployments, with checkpoints you can resume from
- Autopilot runtime (`stakpak up` / `stakpak down`) with cron schedules, Slack, Telegram and Discord channels, notification routing and a `doctor` readiness check
- Secret substitution, Warden network guardrails, privacy-mode redaction and reversible, backed-up file operations
- Rulebooks: markdown SOPs and playbooks with YAML frontmatter that shape the agent's behaviour, managed with `stakpak rb`
- Local indexing and semantic search over Terraform, Kubernetes, Dockerfile and GitHub Actions files, plus a documentation research agent
- MCP server and MCP proxy modes with mTLS, and an Agent Client Protocol mode for editors such as Zed

## Getting started

These steps follow the project's README. Stakpak installs as a single binary (Homebrew, the install script, GitHub release binaries or a Docker image). Autopilot needs Docker installed and accessible to the current user, and the README recommends 2GB+ RAM.

1. Install the CLI

   Use the install script, or Homebrew on Linux and macOS.

```bash
curl -sSL https://stakpak.dev/install.sh | sh

# or
brew tap stakpak/stakpak
brew install stakpak
```

2. Connect a model

   Run `stakpak` and follow the prompts to create a Stakpak API key, or log in non-interactively with your own provider key. A local OpenAI-compatible endpoint can instead be configured as a profile in ~/.stakpak/config.toml.

```bash
stakpak auth login --provider anthropic --api-key $ANTHROPIC_API_KEY
```

3. Work interactively in the TUI

   Open the terminal UI in your project directory and ask for DevOps work in plain language; resume a session later from a checkpoint.

```bash
stakpak

# resume from a checkpoint
stakpak -c <checkpoint-id>
```

4. Start the 24/7 autopilot

   `stakpak init` builds an understanding of your apps and tech stack; `doctor` checks deployment readiness before the first boot, and `up` starts the autonomous agent in the background.

```bash
stakpak init
stakpak autopilot doctor
stakpak up
stakpak autopilot status
stakpak autopilot logs
```

5. Add a channel and a schedule

   Wire Slack in as the default notification route, then add a cron schedule that runs a prompt under a restricted profile.

```bash
stakpak autopilot channel add slack --bot-token "$SLACK_BOT_TOKEN" --app-token "$SLACK_APP_TOKEN" --profile ops --target "#ops"

stakpak autopilot schedule add health --cron '*/5 * * * *' --prompt 'Check health' --profile monitoring
```

## When to use it

- Reach for it when you want an agent to write Terraform, Kubernetes manifests or GitHub Actions workflows and debug deployments without handing an LLM your raw secrets
- Use autopilot to run scheduled health checks on a server and post findings to Slack, Telegram or Discord, with a monitor-only profile that cannot make changes
- Encode your team's runbooks and deployment procedures as Rulebooks so the agent follows them
- Put Stakpak in front of other MCP servers as a proxy that redacts secrets and private data, or use it as an agent inside Zed over ACP
