Skip to main content
POST
Test an agent

Authorizations

Authorization
string
header
required

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

Path Parameters

agentId
string
required

Agent ID.

Body

application/json

Run the agent and return what it would say. Nothing is delivered to anyone, no execution is recorded, and nothing is charged.

message
string
required

What to say to the agent.

Example:

"Where is order ORD-12345?"

history
object[]

Prior turns, oldest first, to exercise multi-turn behaviour without persisting a thread. Trimmed to the agent's context window.

useKnowledgeBase
boolean
default:true

Set false to skip retrieval and isolate prompt behaviour from the knowledge base.

Response

The agent's reply.

success
boolean
required
text
string | null
required

What the agent would reply.

error
string | null
required
inputTokens
integer
required
outputTokens
integer
required
latencyMs
integer
required
knowledgeChunksUsed
integer
required

Knowledge-base chunks retrieved for this message. Zero means the answer was not grounded in your documents.

warnings
string[]
required

Things that are true of this agent but that a dry run cannot prove: the agent being disabled, enabled tools that its channels will never call (the text path does not offer tools to the model), and contact metadata that exists on a real conversation but not here. Surfaced so a passing dry run is never mistaken for proof that the agent works live.