Skip to main content
POST
Review An Agent Prompt
Changes state - verify before retry Review an agent prompt before publishing. The operation can check instructions, variables, speech quality, contradictions, hallucination risks, language, model fallback, post-call capture, and call-handling settings without editing or publishing the agent version.

When To Use Agent Prompt Review

  • Check a draft prompt before creating an immutable version.
  • Review only the check groups relevant to your release gate.
  • Generate a fix_prefill instruction that can be sent to an editing assistant.
  • Recheck after changing the prompt or the names of its default variables. A stored report is reused when only other settings changed (see below).

Before You Call It

  • Use an agent_ ID from List Agents.
  • Use a version number returned by Get Agent Details.
  • Keep prompt_text at 100,000 characters or fewer. Omit it to review the stored version prompt.
  • An empty or whitespace-only prompt_text also falls back to the stored prompt.

Choose Prompt Review Checks

Omit checks to run every available group. Send a smaller list when you need a faster focused review. The unknowable, conflicts, structure, and speech groups use a model-based check. Leave all four out to avoid model calls.

Response Fields

Side Effects And Retry Safety

This operation does not edit or publish the agent version. It can run billable model work, may take several seconds, and can store a complete report for reuse. Complete, non-degraded reports are cached by the prompt, the version’s default variable names, and the requested checks. Other settings such as languages, models, knowledge bases, post-call fields, and timeouts are not part of that key, so after changing only those settings the stored report is returned with cached: true; change the checks list to force a fresh review. Degraded reports are not cached so a later request can retry the full review. It is safe to retry after a timeout, but first allow enough time for the original review to finish. An identical completed request can return the cached report.

Verify The Result

Check degraded before treating the review as complete. Review every item where acknowledged is false, then either revise the prompt or record a decision with Acknowledge A Prompt Review Finding. Publishing remains a separate user action.

Operation-Specific Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

Signed agent ID.

versionNumber
number
required

Agent version number to review.

Body

application/json
checks
enum<string>[]

Check groups to run. Omit for all. unknowable, conflicts, structure and speech call a model; leave all four out to avoid model work.

Available options:
structure,
variables,
speech,
unknowable,
conflicts,
language,
models,
capture,
call_handling
prompt_text
string

Prompt text to review instead of the stored prompt, up to 100,000 characters. Empty or whitespace falls back to the stored prompt. The version must still exist in your workspace.

Maximum string length: 100000

Response

Prompt review completed.

success
enum<boolean>
required
Available options:
true
error
enum<boolean>
required
Available options:
false
statusCode
integer
required
Example:

201

message
string
required
Example:

"Success"

data
object
required
timestamp
string<date-time>
required