---
title: "List agent sessions"
method: GET
path: "/v1/agents"
tags: ["Agents"]
---

# List agent sessions

`GET /v1/agents`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/agents`
- Auth: HTTP bearer

## Query parameters

- `project_id` string, uuid
- `state` union
  - 'working'
  - 'waiting'
  - 'exited'
- `limit` integer
- `cursor` string

## Response `200`

Default Response

- object
  - `data` Agent[], required
    - `id` string, required
    - `workspace_id` string, uuid, required: UUIDv7, lowercase canonical form.
    - `workspace_key` string, required
    - `app` union, required
      - 'claude'
      - 'codex'
    - `state` union, required
      - 'working'
      - 'waiting'
      - 'exited'
    - `since` string, date-time, required: RFC 3339 UTC timestamp with Z.
    - `title` string, required
    - `remote_control_url` string, required
    - `last_message` string, required: The session's latest message as one line of plain text: the agent's last reply when it waits or exits, its latest text while it works. Empty until it says one.
    - `labels` object, required
    - `conversation_id` string, nullable: The session's own conversation: the one whose harness session it is, else its computer's only live conversation. Several threads can share one computer, so prefer it over labels.shard_conversation, which names the computer's first conversation. Null when it cannot be told; absent before conversations exist.
    - `orchestrator_conversation_id` string, nullable
    - `orchestrator_input_id` string, nullable
    - `settled_reason` union: The conversation computer suspended or failed while a native turn was active. Null or absent does not establish completion.
      - 'computer_suspended'
      - 'computer_failed'
    - `credential_status` union
      - 'ready'
      - 'needs_sign_in'
  - `next_cursor` string, nullable, required

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

[API](https://skmtc.dev/shardflux/apis/shardflux-api.md) · [All operations](https://skmtc.dev/shardflux/apis/shardflux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shardflux/apis/shardflux-api/revisions/ea685f7b39c4?raw)
