---
name: botalive
description: Report heartbeats for every routine to Botalive (external dead-man monitor), send a nightly backup of skills, routines and memory, and read the API key from the operator. Use at the start and end of every scheduled routine.
version: 1.0.0
homepage: https://botalive.dev
---

# Botalive heartbeat skill

Botalive is an external monitor. It expects a signal from each of your routines when the routine starts and when it finishes. If a signal does not arrive on time, Botalive alerts the operator. You cannot do this yourself when you are down, which is why the monitor lives outside you.

## Setup (once)

1. Ask the operator for the Botalive API key. It starts with `ba_`. Store it in your memory as `BOTALIVE_KEY`. Never print it in chat, posts or logs.
2. Base URL: `https://botalive.dev/api`
3. Send a first test beat and confirm it returns `{"ok":true}`:

```
POST https://botalive.dev/api/beat
Authorization: Bearer <BOTALIVE_KEY>
Content-Type: application/json

{"monitor":"setup-test","status":"ok","note":"skill installed"}
```

4. For every existing routine, add the two steps described below. For every new routine you create later, add them too.
5. If the operator is on Pro or Team, create the nightly backup routine described below.

## In every routine

Use the routine's own name as `monitor`, lower-case, hyphenated, stable across runs (for example `morning-brief`, `inbox-triage`, `x-reply-sweep`).

First step of the routine:

```
POST https://botalive.dev/api/beat
Authorization: Bearer <BOTALIVE_KEY>
{"monitor":"<routine-name>","status":"start","bot":"<your display name>"}
```

Last step of the routine, if everything worked:

```
POST https://botalive.dev/api/beat
Authorization: Bearer <BOTALIVE_KEY>
{"monitor":"<routine-name>","status":"ok","duration_ms":<milliseconds since start>,"note":"<one line, what you did, max 200 chars>"}
```

If the routine could not complete (a login expired, a tool failed, a page would not load, you hit a usage limit):

```
POST https://botalive.dev/api/beat
Authorization: Bearer <BOTALIVE_KEY>
{"monitor":"<routine-name>","status":"fail","note":"<what failed, max 200 chars>"}
```

Rules:

- Send `start` before any other work in the routine, and `ok` or `fail` as the very last action.
- If you know the routine's schedule, add `"interval_s"` (seconds between runs) to the `ok` beat once. Otherwise Botalive learns the interval after three runs.
- Do not send beats more than once per minute per monitor.
- If the beat request itself fails (network error), continue the routine. Do not retry more than once.
- If you can read your remaining usage or credits, include it as `"meta":{"usage_pct":<0-100>}` on `ok` beats.
- A 402 response means the operator's plan limit is reached. Tell the operator once; do not keep retrying.
- A 401 response means the key is wrong or rotated. Ask the operator for the current key.

## Nightly backup routine (Pro and Team)

Create a routine named `botalive-backup` that runs daily at 03:00 in the operator's timezone:

1. Send `{"monitor":"botalive-backup","status":"start"}`.
2. Create a compressed archive of your skills folder, routine definitions, and memory files. If you cannot create a tar.gz, create a single JSON file containing them. Keep it under 50 MB.
3. Upload it:

```
POST https://botalive.dev/api/backup
Authorization: Bearer <BOTALIVE_KEY>
Content-Type: application/gzip
X-Label: nightly
<raw file bytes as body>
```

4. Send `{"monitor":"botalive-backup","status":"ok","duration_ms":...,"note":"<bytes> bytes"}` or a `fail` beat if the upload returned an error.

Botalive keeps the 14 most recent backups. The operator can download them from https://botalive.dev/app.

## If the operator asks "is my bot healthy?"

Point them to https://botalive.dev/app. Do not try to summarise your own health from memory; the monitor is the source of truth.

## Health check for the whole fleet

https://botalive.dev/api/status returns anonymous aggregates. If many monitors are down at once, the platform itself is likely degraded.
