v1

latestOpenAPI 3.1.02026-08-04156223229.6 KB
agent-loop

Create Review Chat Turn

Open or extend the caller's private review-chat thread on a snapshot.

Renderer-facing (workspace membership gates the call; the thread is the caller's own). Writes a pending review_chat_turns row, then mints a handoff JWT carrying caps=['review-chat-turn'] plus the snapshot_id claim that flips agent-service into the read-only review sandbox. The claim — never a body flag — is the source of truth for the turn kind. Returns the handoff code the renderer forwards to agent-service.

post/agent-loop/workspaces/{workspace_id}/review-chat/turns

Path parameters

workspace_idstring required

Request body

snapshot_idstring required
parent_turn_idstring nullable
user_messagestring nullable
idstring nullable

Response

Successful Response

turn_idstring required
handoff_codestring required

Single-use code redeemable at /agent-loop/internal/agent-token/redeem for the review-chat agent-svc JWT (caps=['review-chat-turn'] + snapshot_id) bound to this turn. 60s TTL.