Skip to main content
POST
Teach the agent (preview, then commit)

Authorizations

Authorization
string
header
required

Access token issued by gs.service.id. Its access_identity claim carries team_sid, actor_sid and actor_type, and that team scope is authoritative.

Team-SID
string
header
required

Team scope for tokens that do not carry one. Ignored when the token already names a team.

Body

application/json

Request body of route_agent_fix.

text
string
required

What the person said, typed or dictated, as they said it (1..2000 chars): about the reply, or about the agent ("we do not work with agencies").

Required string length: 1 - 2000
agent_sid
string | null

The AI SDR the fix is about (ub_ag_…) when no run is named; left out, the team's default. With run_sid the run's own agent is the one, whatever is sent here.

Required string length: 18
Pattern: ^ub_ag_
run_sid
string | null

The run whose reply the fix is about (ub_rn_…), a row of the Analyzer's log (search_agent_runs with filter.outcome); left out, the fix is about the agent at large.

Required string length: 18
Pattern: ^ub_rn_
place
enum<string> | null

The place the person picked, for its draft: knowledge (a fact), golden_set (the reply as it should have gone; a run needed), brief (a standing rule), voice (one of its four lines), rules (a setting), scenario (a step's line). Left out, the composer picks.

Available options:
knowledge,
golden_set,
brief,
voice,
rules,
scenario
proposal

The commit: the preview's result.proposal as drafted or as the person edited it, in its place's own shape (one of the six objects here, place first). Left out, the call is the preview and writes nothing.

commit_token
string | null

The preview's result.commit_token, required with proposal: minted for this text, agent and run, good for fifteen minutes (422 invalid_commit_token, commit_token_expired: ask for the draft again).

Maximum string length: 512

Response

action success envelope.

success
enum<boolean>
required
Available options:
true
operation
enum<string>
required
Available options:
action
action
string
required

kebab-case verb; matches the route segment.

item
any
required
result
object
required
meta
object
required