Pre-launchTallrig is being built in the open and is not yet open for production customers. General availability: late 2026 – 2027.
Tallrig
Colour theme
Sign inRequest access
6 steps · 8 min

Build your own medic

Give a small watcher one narrow key and let it repair one project: restart it, roll it back to the last good release, or redeploy it. The key can do nothing else on your account.

  1. Create a key limited to one projectIn the dashboard, open Agents & MCP, then API keys. Name the key, set Access to the one project the medic looks after, and tick Repair and Redeploy. Copy the key when it is shown; it is shown once. This key cannot read billing, reach your other projects, change environment variables, or create keys. Any call outside its project or its actions is refused with 403 and a message that starts API_KEY_SCOPE_REFUSED.
  2. Watch your app's health from outsideThe medic decides when to act, so it needs its own signal: request your app's health URL every 30 seconds and count failures. Act after three in a row, not after one slow answer. If you would rather read the platform's own check, add Read deploys to the key and call deployments.liveProbe; add Read runtime logs to read what the app printed with projects.runtimeLogs.
  3. First response: restartprojects.restart restarts the release that is already live. Nothing is built. The call waits for the app to come back and answers healthy: true or healthy: false. A project can be restarted once every two minutes, and not while a deploy is running; both refusals say when to try again.
  4. Still unhealthy: roll back to the last good releasedeployments.rollbackToLastGood puts production back on the newest earlier release that went live. You do not pick a deployment, and the key cannot roll back to one of its choosing. Each call goes one release further back, never forward to the release it just left. With no earlier release it refuses and changes nothing. A project can be rolled back once every five minutes.
  5. After a fix is pushed: redeploydeployments.create with only the project id builds and ships the current head of the project's tracked branch. With a scoped key the call may not name a branch or a commit, so the medic can ship what you merged and nothing else.
  6. Stop and tell a personA medic that loops makes an outage worse. Treat 429 (cooldown) and 409 (a deploy is running) as wait. Treat 412 (nothing to roll back to), a restart that answers healthy: false twice, and any 403 as stop: page a person with the message the call returned. Every restart, rollback and log read is recorded by the platform with the key that made it.
APIbash
# The worked example: a medic for a project called nyilo.
# One key, limited to that project, with Repair and Redeploy. These are its only three calls.
KEY=your-scoped-key
PROJECT=your-project-id
API=https://api.tallrig.com/api/trpc

# What this key is: its project, its scopes, its expiry. Works for any key.
curl -s $API/apiKeys.current -H "authorization: Bearer $KEY"

# 1. Restart the current release. Answers {"healthy":true|false,"status":"running",...}
curl -s -X POST $API/projects.restart -H "authorization: Bearer $KEY" \
  -H "content-type: application/json" -d "{\"projectId\":\"$PROJECT\"}"

# 2. Roll back to the last good release. Answers {"targetDeploymentId":"...","isCurrent":true,...}
curl -s -X POST $API/deployments.rollbackToLastGood -H "authorization: Bearer $KEY" \
  -H "content-type: application/json" -d "{\"projectId\":\"$PROJECT\"}"

# 3. Redeploy the tracked branch's current head. Send the project id and nothing else.
curl -s -X POST $API/deployments.create -H "authorization: Bearer $KEY" \
  -H "content-type: application/json" -d "{\"projectId\":\"$PROJECT\"}"

# Everything else is refused, for example:
#   deployments.rollback (a deployment of your choosing), billing.*, projects.setEnvVar,
#   projects.list, apiKeys.create, and the same three calls on any other project.
# -> HTTP 403  {"error":{"message":"API_KEY_SCOPE_REFUSED: ..."}}
A medic in 30 linesbash
#!/usr/bin/env bash
# Watch one URL. After 3 failures: restart. If that does not help: roll back, then stop.
set -u
KEY=your-scoped-key; PROJECT=your-project-id
HEALTH=https://your-app.example/health
API=https://api.tallrig.com/api/trpc
call() { curl -s -o /tmp/medic.out -w '%{http_code}' -X POST "$API/$1" \
  -H "authorization: Bearer $KEY" -H "content-type: application/json" \
  -d "{\"projectId\":\"$PROJECT\"}"; }
healthy() { curl -fsS -m 10 -o /dev/null "$HEALTH"; }

fails=0
while sleep 30; do
  if healthy; then fails=0; continue; fi
  fails=$((fails + 1)); [ "$fails" -lt 3 ] && continue

  code=$(call projects.restart)
  if [ "$code" = 200 ] && grep -q '"healthy":true' /tmp/medic.out && healthy; then fails=0; continue; fi
  if [ "$code" = 429 ] || [ "$code" = 409 ]; then continue; fi   # cooldown or a deploy running: wait

  code=$(call deployments.rollbackToLastGood)
  if [ "$code" = 200 ] && sleep 20 && healthy; then fails=0; continue; fi

  echo "medic: could not repair ($code): $(cat /tmp/medic.out)" >&2   # page a person here
  exit 1
done
CLIbash
# login accepts a scoped key, says what it can do, and makes its project the default
TALLRIG_TOKEN=your-scoped-key tallrig login

tallrig restart                 # exit 0 healthy, 5 restarted but not healthy, 2 refused
tallrig rollback --last-good    # exit 2 when there is no earlier release
tallrig logs --runtime --lines 200   # needs Read runtime logs on the key
MCP (AI agents)json
// POST https://api.tallrig.com/api/mcp/tenant/call   Authorization: Bearer <your scoped key>
// A scoped key may call only these tools, and only for its own project.

{ "name": "tallrig_restart_project", "arguments": { "project_id": "your-project-id" } }

{ "name": "tallrig_rollback_last_good", "arguments": { "project_id": "your-project-id" } }

{ "name": "tallrig_deploy_project", "arguments": { "project_id": "your-project-id" } }

// With Read runtime logs on the key:
{ "name": "tallrig_runtime_logs", "arguments": { "project_id": "your-project-id", "lines": 200 } }

All guides

Ready to build?

Signups are invite-only right now — request access and we'll follow up.

Request accessRead the docs