# Get an agent's computer

> A workspace agent's own computer: its status (state asleep, waking, awake or sleeping, and since; disk_used_bytes of disk_cap_bytes, 5 GB; last_woke_at, last_slept_at; the saved home's snapshot_bytes and snapshot_at; where, g1t_cloud; disk_attached, false while the installation has no storage for homes; a problem the owner should know of; delete_after once the agent was archived), its recent commands newest first, and can_manage, whether you may wake, sleep or reset it.

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

Members of the workspace; a personal agent's only its member and the owners.

The computer is asleep until a session or a person wakes it; while awake its time is sandbox time on the workspace's usage, under the agent and whoever asked. `disk_cap_bytes` is 5 GB, included, with no disk charge; `disk_attached` is false while the installation has no storage for homes, in which case the home is forgotten at every sleep.

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`agent`](/reference/mcp/#agent) with `action` `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 https://api.g1t.sh/workspaces/flagon-io/agents/margo/computer \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
{
  "status": {
    "agent_id": "agt_01k7a0b1c2d3e4f5g6h7j8k9mn",
    "state": "asleep",
    "since": "2026-10-10T09:42:10.000Z",
    "disk_used_bytes": 734003200,
    "disk_cap_bytes": 5000000000,
    "last_woke_at": "2026-10-10T09:12:03.000Z",
    "last_slept_at": "2026-10-10T09:42:10.000Z",
    "snapshot_bytes": 212337664,
    "snapshot_at": "2026-10-10T09:42:08.000Z",
    "where": "g1t_cloud",
    "disk_attached": true,
    "problem": null,
    "delete_after": null
  },
  "commands": [
    {
      "id": "cmd_4f1c9e2a7b3d5f6081a2",
      "session_id": "asn_01k7b2c3d4e5f6g7h8j9k0mnpq",
      "asked_by": "ana",
      "started_at": "2026-10-10T09:31:44.000Z",
      "cmd": "npm test",
      "cwd": "/home/agent/sessions/asn_01k7b2c3d4e5f6g7h8j9k0mnpq/web",
      "exit_code": 0,
      "duration_ms": 41230,
      "output": "> web@1.0.0 test\n> node --test\n\nℹ tests 128\nℹ pass 128\nℹ fail 0",
      "truncated": false,
      "timed_out": false
    }
  ],
  "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. |
| 422 | `invalid` | The input is not valid. `message` says which field and why. |
