Chat with an agent (text mode)

Sends a text message to the agent and returns the AI response. Uses the agent’s configured system_prompt, ai_provider, and ai_model. Pass conversation history to maintain context across turns. Does not create a call or use telephony. Intended for testing the agent’s prompt before making live calls.

Authentication

AuthorizationBearer

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

Path parameters

agent_idstringRequired

Request

This endpoint expects an object.
messagestringRequired
The user's text message
historylist of objectsOptional
Previous conversation turns for context
channelenumOptionalDefaults to voice
Channel context for the simulation (Phase I). `voice` (default) returns just the AI reply. `sms` / `whatsapp` augment the system prompt with channel-specific guidance (brevity, no markdown for SMS; minimal markdown for WhatsApp) AND return a `validation` block with length / encoding / segment metadata so developers see whether the reply fits channel constraints BEFORE wiring the live path.
Allowed values:

Response

Agent response
responsestring

The agent’s AI-generated response

channelenum
Echo of the request channel
validationobject

Messaging-channel reply metadata. Present only for sms and whatsapp channels. Omitted for voice.

Errors

400
Agent Playground Request Bad Request Error
404
Agent Playground Request Not Found Error
503
Agent Playground Request Service Unavailable Error