---
title: Keep an agent run warm
description: User-presence ping (WIBLO-085.6).
api_method: POST
api_path: "/v1/agent-runs/{runId}/keepalive"
canonical_url: https://wiblo.app/docs/developers/api/agent-runs/keepalive-agent-run
last_updated: 2026-07-28T17:31:44+02:00
md_url: https://wiblo.app/docs/developers/api/agent-runs/keepalive-agent-run.md
---

# Keep an agent run warm

`POST /v1/agent-runs/{runId}/keepalive`

User-presence ping (WIBLO-085.6). A run is a sandbox-backed session that stays warm while the user is active: this extends the sandbox lease one idle window and records user activity. If the warm session had already idle-stopped, the ack reports `needsReprovision: true` so the next message reprovisions. No raw sandbox handles are exposed. Cross-tenant probes and unknown ids collapse onto the same 404 `AGENT_RUN_NOT_FOUND` envelope. Per-user rate-limited at 60/60s.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `runId` | `string` | Yes |  |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/agent-runs/{runId}/keepalive \
  -X POST \
  -H "Authorization: Bearer $WIBLO_TOKEN"
```

**TypeScript**

```ts
import { createSdk, keepaliveAgentRun } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await keepaliveAgentRun({
  client: sdk,
  path: { runId: "..." },
})
```

## Responses

**`200`** — The lease was extended (or reported needing reprovision). Returns `KeepaliveAgentRunResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `runId` | `string` | Yes |  |
| `status` | `"provisioning" \| "active" \| "disconnected" \| "hibernating" \| "hibernated" \| "failed" \| ...` | Yes |  |
| `idleDeadlineAt` | `string \| null` | No | Defaults to `null`. |
| `needsReprovision` | `boolean` | No | Defaults to `false`. |

**`401`** — No valid session cookie or `wbl_*` bearer was present. Returns `ApiErrorEnvelope`.

**`404`** — No run visible to the caller with this id (`AGENT_RUN_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.
