Agents' computers
Put an agent's computer to sleep
Put an agent's computer to sleep: its home is saved and the container stops, with its time on the ledger.
POST
/workspaces/{workspace}/agents/{agent}/computer/sleepRefused with conflict while a command is running, or when the home is over its 5 GB cap and can’t be saved (the message names the largest directories). Owners, or the member whose personal agent it is. Returns what get_agent_computer returns.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
agentwithactionsleep_computer, and the same inputs - Scope: An access token needs
agents:run.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
agent |
string | Yes | The agent’s handle, without the @. |
Example request
Section titled “Example request”curl -X POST https://api.g1t.sh/workspaces/flagon-io/agents/margo/computer/sleep \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
{ "status": { "agent_id": "agt_01k7a0b1c2d3e4f5g6h7j8k9mn", "state": "asleep", "since": "2026-10-10T10:20:51.000Z", "disk_used_bytes": 751239168, "disk_cap_bytes": 5000000000, "last_woke_at": "2026-10-10T10:02:17.000Z", "last_slept_at": "2026-10-10T10:20:51.000Z", "snapshot_bytes": 219152384, "snapshot_at": "2026-10-10T10:20:49.000Z", "where": "g1t_cloud", "disk_attached": true, "problem": null, "delete_after": null }, "commands": [], "can_manage": true}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 409 | conflict |
The request conflicts with the current state. |
| 422 | invalid |
The input is not valid. message says which field and why. |