Skip to main content

Test the agent in a chat

POST 

/v1/agents/:agentId/test-chat

x-scope: "conversations:write"
x-rate-limit-per-minute: 10

Sends a message to the agent as a customer would write it and returns the agent's answer in the same response, so you can check how it answers after changing its instructions, knowledge or attachments. Leave conversation_id out to start a new test chat; send the conversation_id of an earlier answer to continue it, so the agent sees the whole chat. Only test chats can be continued: a customer's conversation is 404 not_found.

The AI answers exactly as it does for customers, with its knowledge, tools, attachments and lead capture. Its tools run for real: a test can book a calendar slot, capture a lead or call your company's own API. Each answer counts against your plan's message limit, like any AI reply; over the limit, nothing is saved and the answer is 402 message_limit_exceeded. A test chat is saved like one from the dashboard's test chat, under a customer named after the key or the AI assistant.

The request waits up to 30 seconds for the answer. status says how it went: replied with the agent's messages in replies; pending when no answer came in time (read it later with listConversationMessages and after set to message_id); or no_reply when the AI is switched off or paused in that chat. One message at a time per test chat: sending another while one waits is 409 test_chat_busy.

Request​

Responses​

The message as saved, and the agent's answer when it came in time.

Response Headers
    X-Correlation-ID

    Correlation id for this request — paste into support tickets.