Use the Platform APIs’ conversation testing operation to test an agent with two REST calls: launch it, then send a user message. This endpoint identifies the conversation by userID; it does not use the session-creation handshake of the customer-facing Chat and voice integrations.

For a customer-facing implementation, start with Chat agents or Voice agents. The recipe below exercises agent behavior through the testing API.

The recipe

1

Run the recipe

main.sh

How it works

  • The userID in the path IS the conversation. Call the same path again and the agent picks up where it left off; call it with a new userID and you get a fresh conversation.
  • action is what the user did. launch starts the agent from its entry point, text sends something they typed. The full set is in the trace reference.
  • version chooses which build answers: published runs the live version of the environment, draft runs what you are currently editing. A project that has never been published has no published build yet, so use draft until the first publish.
  • The response is an array of traces describing what the agent did. text carries the words a chat agent said; a voice agent answers with speak instead.
  • environmentAlias names the environment to run. New projects start with main.

When it fails

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.