---
title: "Get Agent Counsel Context"
method: GET
path: "/agent-loop/workspaces/{workspace_id}/agent-counsel/context"
tags: ["agent-counsel", "agent-counsel-internal"]
---

# Get Agent Counsel Context

`GET /agent-loop/workspaces/{workspace_id}/agent-counsel/context`

Snapshot-scoped context for an agent-service agent-counsel turn (the branch loader).

Agent-service-facing (caps=['agent-counsel-turn']). The reviewer (=user_id) and
snapshot_id come from the verified JWT, never request input. Authorization is
the cap plus an open ReviewRequest for (reviewer_id, snapshot_id); never workspace
membership, since synthetic reviewers are not members. Returns the one snapshot's
content, the workspace identity + connected sources, and the comments on that
snapshot. ``turns`` is empty: agent counsel is a single fire-and-forget pass with no
private thread to walk.

## Path parameters

- `workspace_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- AgentCounselContextResponse — Agent-counsel's snapshot-scoped context. Same shape as SnapshotScopedContext; owns its own name + OpenAPI id, decoupled from review-chat. ``turns`` is always empty (a counsel review is a single fire-and-forget pass).
  - `snapshot` SnapshotInfo, required
    - `id` string, required
    - `name` string, nullable
    - `content` string, required
  - `workspace` WorkspaceContextInfo, required
    - `id` string, required
    - `name` string, nullable
    - `description` string, nullable
    - `connected_sources` ConnectedSource[], nullable
      - `id` string, nullable
      - `linked_by_user_id` string, required
      - `adapter` 'github' | 'slack' | 'uploaded_file', required — Type of source adapter (github, uploaded_file, etc.)
      - `visibility` 'private' | 'public' — Visibility level of a source
      - `config` union, required
        - GitHubSourceConfig — Configuration for a GitHub source
          - `repo` string, required
          - `branch` string, required
        - SlackSourceConfig — Configuration for a Slack source
          - `slack_team_id` string, required
          - `channel_id` string, required
        - UploadedFileSourceConfig — Configuration for an uploaded file source
          - `file_id` string, required
      - `metadata` union, required
        - GitHubSourceMetadata — Metadata for a GitHub source
          - `installation_id` integer, required
          - `commit_sha` string, required
        - SlackSourceMetadata — Metadata for a Slack source
          - `team_name` string, nullable
          - `channel_name` string, required
          - `is_private` boolean
        - UploadedFileSourceMetadata — Metadata for an uploaded file source
          - `filename` string, required
          - `content_type` string, nullable
          - `size_bytes` integer, nullable
    - `connected_sources_fingerprint` string, nullable
  - `comments` CommentSnapshot[]
    - `id` string, required
    - `parent_id` string, nullable
    - `author_display_name` string, nullable
    - `content` string, required
    - `anchor_text` string, nullable
    - `resolved` boolean, required
    - `created_at` string, date-time, required
  - `turns` ReviewerContextTurn[], required
    - `id` string, required
    - `parent_id` string, nullable, required
    - `user_id` string, nullable
    - `user_display_name` string, nullable
    - `user_message` string, nullable, required
    - `assistant_text` string, nullable, required
    - `message_deltas` unknown
    - `usage` unknown

## Other responses

- `422` — Validation Error

---

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