---
title: "Get Workspace State"
method: GET
path: "/agent-loop/workspaces/{workspace_id}/state"
tags: ["agent-loop"]
---

# Get Workspace State

`GET /agent-loop/workspaces/{workspace_id}/state`

Single call: all turns with DAG annotations + cursor position.
Anonymous access allowed for public workspaces (cursor/member tracking skipped).
Pure read — no E2B calls. Frontend calls /wake separately to ensure the sandbox is running.

## Path parameters

- `workspace_id` string, required

## Response `200`

Successful Response

- WorkspaceStateResponse — Single call gives the renderer everything needed to paint the workspace page.
  - `turns` TurnSummary[], required
    - `id` string, required
    - `workspace_id` string, required
    - `parent_id` string, nullable, required
    - `status` string, required
    - `is_from_scott_push` boolean
    - `user_message` string, nullable, required
    - `assistant_text` string, nullable, required
    - `error` string, nullable
    - `created_at` string, date-time, required
    - `completed_at` string, date-time, nullable, required
    - `user_id` string, nullable
    - `active_artifact_id` string, nullable
    - `origin_snapshot_id` string, nullable
    - `scott_push_agent` string, nullable
  - `artifacts` ArtifactSummary[]
    - `id` string, required
    - `workspace_id` string, required
    - `name` string, nullable
    - `produced_at_turn_id` string, required
    - `created_at` string, date-time, required
    - `content` ArtifactContent, required — Blocks + markdown to render. Selection rule lives in `_build_artifact_summaries` (cursor-scoped latest capture, else creation node).
      - `blocks` unknown[], required
        - unknown
      - `markdown` string, required
    - `diff` ChangeEntry[], nullable
      - `changeType` 'added' | 'modified' | 'removed', required
      - `concept` string, required
      - `summary` string, required
      - `sectionHeading` string, nullable
  - `snapshot_nodes` SnapshotNode[]
    - `id` string, required
    - `document_artifact_id` string, required
    - `parent_snapshot_id` string, nullable
    - `turn_id` string, required
    - `kind` 'node' | 'capture', required
    - `status` 'draft' | 'committed' | 'discarded', required
    - `name` string, nullable
    - `created_at` string, date-time, required
    - `content` ArtifactContent, required — Blocks + markdown to render. Selection rule lives in `_build_artifact_summaries` (cursor-scoped latest capture, else creation node).
      - `blocks` unknown[], required
        - unknown
      - `markdown` string, required
    - `diff` ChangeEntry[], nullable
      - `changeType` 'added' | 'modified' | 'removed', required
      - `concept` string, required
      - `summary` string, required
      - `sectionHeading` string, nullable
    - `has_user_edits` boolean
    - `suggestion` Suggestion — An unresolved agent suggestion sitting on a draft snapshot. An agent turn writes this onto the focused draft instead of committing a node; the human resolves it (accept/reject) before committing. One per draft, last writer wins. The draft's own `content` excludes it.
      - `suggestion_id` string, required
      - `turn_id` string, required
      - `author` string, nullable
      - `base_markdown` string, required
      - `suggested_markdown` string, required
      - `suggested_blocks` unknown[]
        - unknown
  - `commit_references` CommitReferenceSummary[]
    - `id` string, required
    - `workspace_id` string, required
    - `produced_at_turn_id` string, required
    - `repo` string, required
    - `branch` string, nullable
    - `commit_sha` string, required
    - `short_sha` string, required
    - `commit_title` string, required
    - `commit_message` string, required
    - `commit_url` string, required
    - `author_name` string, nullable
    - `author_email` string, nullable
    - `committed_at` string, date-time, required
    - `files_changed` integer, nullable
    - `additions` integer, nullable
    - `deletions` integer, nullable
    - `created_at` string, date-time, required
  - `current_turn_id` string, nullable, required
  - `current_snapshot_id` string, nullable
  - `member_cursors` MemberCursor[]
    - `user_id` string, required
    - `display_name` string, nullable, required
    - `avatar_url` string, nullable, required
    - `turn_id` string, nullable, required
  - `is_public` boolean
  - `sandbox_url` string, nullable
  - `review_status` string
  - `description` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/tryscott/apis/one-shot-api.md) · [All operations](https://skmtc.net/tryscott/apis/one-shot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryscott/one-shot-api/versions/28bdface01df/schema)
