Agents' computers
List an agent's computer's commands
The commands an agent's computer ran most recently, newest first, up to 50: each with its cmd, cwd, exit_code, duration_ms, output (cut at 64 KB, truncated when so), timed_out, the session_id it ran in and who asked_by.
GET
/workspaces/{workspace}/agents/{agent}/computer/commandsMembers of the workspace; a personal agent’s only its member and the owners.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
agentwithactioncomputer_commands, 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 https://api.g1t.sh/workspaces/flagon-io/agents/margo/computer/commands \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
[ { "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 }, { "id": "cmd_0a9b8c7d6e5f4a3b2c1d", "session_id": "asn_01k7b2c3d4e5f6g7h8j9k0mnpq", "asked_by": "ana", "started_at": "2026-10-10T09:30:02.000Z", "cmd": "git clone https://g1t.sh/flagon-io/web.git && cd web && npm ci", "cwd": "/home/agent/sessions/asn_01k7b2c3d4e5f6g7h8j9k0mnpq", "exit_code": 0, "duration_ms": 58904, "output": "Cloning into 'web'...\nadded 412 packages in 48s", "truncated": false, "timed_out": false }]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. |
| 422 | invalid |
The input is not valid. message says which field and why. |