> For the complete documentation index, see [llms.txt](https://stakpak.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stakpak.gitbook.io/docs/how-it-works/autopilot.md).

# Autopilot

## Overview

{% embed url="<https://youtu.be/60Krvl71PsQ>" %}

Most infrastructure problems don’t start as incidents.

They start as:

* a pod getting OOM Killed
* disk quietly hitting 100%
* a “we’ll fix it later” change

And by the time you notice… It’s already expensive.

**Stakpak Autopilot changes that.**

It doesn’t just monitor.

It runs 24/7, detects unexpected changes, fixes what’s safe, and only alert you when it actually matters.

No dashboards to babysit.\
No alerts to ignore.\
No “we’ll look at it tomorrow.”

### Getting Started Takes Less Than a Min

1. [Install Stakpak](/docs/get-started/install-stakpak.md)&#x20;
2. Run [/Init](/docs/how-it-works/init.md) (understand your apps and tech stack)
3. Start with the recommended schedules

That’s it.

## Stakpak Autopilot Prerequisite&#x20;

Before running autopilot:

* Docker must be installed and accessible to the current user
* 2GB+ RAM is recommended for reliable autopilot + sandbox runs
* Swap is strongly recommended on small Linux hosts
* Linux user services may require linger to survive logout

## **Channels**

You can connect Stakpak Autopilot to

* Discord
* Telegram
* Slack ([slack yaml](https://github.com/stakpak/agent/blob/main/libs/gateway/src/channels/slack-manifest.yaml))

## Setting Up Stakpak Autopilot

<figure><img src="/files/5MrxzOjyLA2vxWYHriW4" alt=""><figcaption></figcaption></figure>

All you have to do is open Stakpak and ask it to monitor whatever you want, and it will help you set up the channels and everything

{% hint style="success" %}
Did you know you can either run Stakpak autopilot locally or on a remote server
{% endhint %}

### Use Cases

<figure><img src="/files/ow1jfAalg5rMDBJrM7Ix" alt=""><figcaption></figcaption></figure>

You can use Stakpak Autopilot to monitor your infrastructure 24/7, automatically fix what’s safe, and alert you only when it actually needs you:

* Monitor a fleet of OpenClaw deployments (gateway health, agents, connectivity)
* Keep nagging you until you actually set up backups for your database
* Detect and fix pods getting OOMKilled before users notice
* Restart stuck services or failing jobs automatically
* Detect expired credentials / broken integrations and fix or escalate
* Spot duplicate or unused resources quietly burning money
* Alert you when something *actually* needs a decision (not noise)
* Investigate failed deployments and suggest/apply fixes
* Continuously check that critical services are recoverable (not just “running”)

### **Configuration**

* `~/.stakpak/config.toml`: [Profiles](/docs/how-it-works/profiles.md) behavior (`model`, `allowed_tools`, `auto_approve`, `system_prompt`, `max_turns`, provider credentials)
* `~/.stakpak/autopilot.toml`: runtime wiring (`schedules`, `channels`, service/server settings)

Use `profile = "name"` on schedules/channels and keep behavior inside profile definitions.

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

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

Full setup guide: [cli/README.md](https://github.com/stakpak/agent/blob/main/cli/README.md)

### Commands

```
  stakpak autopilot up        # Start autopilot and install as system service (runs setup on first use)
  stakpak autopilot down      # Stop autopilot and remove system service
  stakpak autopilot status    # Show health, uptime, schedule/channel metadata, and recent activity
  stakpak autopilot logs      # Stream autopilot logs
  stakpak autopilot restart   # Restart autopilot (reload config)
  stakpak autopilot schedule  # Manage scheduled tasks
  stakpak autopilot channel   # Manage messaging channels (Slack, Telegram, Discord)
  stakpak autopilot doctor    # Run preflight checks for autopilot setup/runtime
```

#### Alias

```
stakpak up        # alias for: stakpak autopilot up
stakpak down      # alias for: stakpak autopilot down
```

### References

* [Install Stakpak](/docs/get-started/install-stakpak.md)
* [/Init](/docs/how-it-works/init.md)
* [Stakpak/Agent Readme](https://github.com/stakpak/agent)
* [cli/README.md](https://github.com/stakpak/agent/blob/main/cli/README.md)&#x20;
