Skip to main content
POST
Record an agent builder turn

Authorizations

X-API-Key
string
header
required

Path Parameters

conversation_id
string<uuid>
required

Body

application/json

Record a turn the prompt edit route produced.

instruction
string
required

The change asked for, exactly as typed.

Required string length: 1 - 4000
summary
string
required

What the revision did, in one line, as the assistant said it.

Required string length: 1 - 2000
added
integer | null

Prompt lines the revision added. Leave both counts out for a revision that was not measured; 0 and 0 is a measured revision that changed no line.

Required range: 0 <= x <= 100000
inputs
AgentInput · object[] | null

The inputs the revised prompt declares, as the edit route returned them.

Maximum array length: 20
prompt
AgentPromptTemplate · object | null

The prompt as the edit route returned it. Send it so a reopened thread can show the revision; a failed turn has none.

removed
integer | null

Prompt lines the revision removed. Leave both counts out when not measured.

Required range: 0 <= x <= 100000
status
enum<string>
default:complete

Whether a recorded turn's revision landed.

A failed turn stays in the thread rather than being dropped, so the person sees what was asked and that the prompt did not change.

Available options:
complete,
failed

Response

Successful Response

One recorded turn: what was asked, and what the revision did.

added
integer | null
required

Prompt lines the revision added; null, with removed, when the revision was not measured.

conversation_id
string<uuid>
required
created_at
string<date-time>
required
id
string<uuid>
required
inputs
Inputs · object[] | null
required

The inputs the revised prompt declares; null when the turn was recorded without them.

instruction
string
required
prompt_segments
Prompt Segments · object[] | null
required

The prompt as revised, in the prompt edit route's segment shape; null when the turn was recorded without it.

removed
integer | null
required

Prompt lines the revision removed; null, with added, when the revision was not measured.

sequence
integer
required
status
enum<string>
required

Whether a recorded turn's revision landed.

A failed turn stays in the thread rather than being dropped, so the person sees what was asked and that the prompt did not change.

Available options:
complete,
failed
summary
string
required