# Reset an agent's computer

> Reset an agent's computer: it is stopped if awake, its saved home is deleted, and its command history is cleared.

<div class="g1t-endpoint"><span class="g1t-method" data-method="post">POST</span><code>/workspaces/{workspace}/agents/{agent}/computer/reset</code></div>

The agent's memory and artifacts are untouched. Owners, or the member whose personal agent it is. Returns what [`get_agent_computer`](/reference/api/agents-computers/get-agent-computer/) returns.

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`agent`](/reference/mcp/#agent) with `action` `reset_computer`, and the same inputs
- **Scope:** An access token needs [`agents:run`](/guides/authentication/#scopes).

## 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

```sh
curl -X POST https://api.g1t.sh/workspaces/flagon-io/agents/margo/computer/reset \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
{
  "status": {
    "agent_id": "agt_01k7a0b1c2d3e4f5g6h7j8k9mn",
    "state": "asleep",
    "since": "2026-10-10T10:25:00.000Z",
    "disk_used_bytes": 0,
    "disk_cap_bytes": 5000000000,
    "last_woke_at": "2026-10-10T10:02:17.000Z",
    "last_slept_at": "2026-10-10T10:20:51.000Z",
    "snapshot_bytes": null,
    "snapshot_at": null,
    "where": "g1t_cloud",
    "disk_attached": true,
    "problem": null,
    "delete_after": null
  },
  "commands": [],
  "can_manage": true
}
```

## Errors

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#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. |
