Skip to content

Capture Correction

POST
/api/v1/ai/corrections

Capture a user correction of an agent output.

Persists an agent_corrections row under the AUTHENTICATED tenant. Pattern extraction happens asynchronously (the row starts with the default correction_type and no pattern), so no LLM client is needed on this path.

Authorizations

Request Body required

Request body for capturing a user correction.

object
agent_role
required
string
>= 1 characters <= 100 characters
correction_context
object
key
additional properties
any
decision_id
Any of:
string format: uuid
original_output
required
string
>= 1 characters
tenant_id
required
string format: uuid
user_correction
required
string
>= 1 characters

Responses

201

Successful Response

Response body for a single correction record.

object
agent_role
required
string
applied_count
required
integer
correction_context
required
object
key
additional properties
any
correction_type
required
string
created_at
required
string format: date-time
decision_id
Any of:
string format: uuid
id
required
string format: uuid
original_output
required
string
pattern_description
Any of:
string
recurrence_count
required
integer
status
required
string
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
user_correction
required
string
weight
required
number

422

Validation Error

object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string