v1

latestOpenAPI 3.1.02026-08-04156223229.6 KB
sync-chat

Create Sync Chat Turn

Open or extend the caller's sync-chat thread.

Renderer-facing (Stytch session gates the call; the thread is the caller's own). Writes a pending sync_chat_turns row, mints a handoff JWT carrying caps=['sync-chat-turn'] bound to this turn, stores it in Redis, and returns the handoff code the renderer forwards to agent-service. No workspace or snapshot coupling.

post/agent-loop/sync-chat/turns

Request body

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 sync-chat agent-svc JWT (caps=['sync-chat-turn']) bound to this turn. 60s TTL.