> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecadence.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Computer

> Start, stop and work with a bot's computer.

Every computer procedure takes a `botId`. See [Computers](https://docs.usecadence.gg/work/computers.md).

## Lifecycle

| Procedure | Effect |
| - | - |
| `computer/status` | The computer's current state. |
| `computer/boot` | Starts it. |
| `computer/stop` | Stops it. Files are kept. |
| `computer/recover` | Tries to repair a computer that is stuck. |
| `computer/reset` | Restores the last saved workspace. |
| `computer/update` | Saves the workspace and installs current software. |

```bash theme={null}
curl -s "$CADENCE_URL/rpc/computer/boot" \
  -H "Authorization: Bearer $CADENCE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json": {"botId": "YOUR_BOT_ID"}}'
```

If the computer provider is slow or down, these return `SERVICE_UNAVAILABLE`; retry with backoff.

## Files

### computer/files

Lists a folder.

**botId** `string` *required*

The bot.

**path** `string` (default: /)

The folder.

Returns entries with `path`, `kind` (`file` or `dir`) and `size`.

### computer/readFile and computer/downloadFile

`readFile` returns a text file's `content`. `downloadFile` returns any file as `contentBase64`. Both take `botId` and `path`.

### computer/uploadFile

**botId** `string` *required*

The bot.

**path** `string` *required*

Where to write the file.

**contentBase64** `string` *required*

The file, base64-encoded.

## Taking control

`computer/takeover` gives you control of the screen and returns a `leaseId` and when it expires. `computer/release` hands control back to the bot. You cannot take over while the bot is running; stop it first.

`computer/commands` returns the commands the bot ran, for an activity log.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.