Overview

Connect your own chat interface to a Voiceflow agent. Create a session, send customer messages as actions and render the returned traces. HTTP Streaming (SSE) lets the interface update while the agent generates its response.

Use this path for text conversations with messages, cards and choices. For microphone input, agent audio and live interruption handling, use Voice.

Start a chat conversation

1

Create a session

Obtain your project ID and API credential. On your server, call Create a session for a chosen Environment, or use the project’s traffic split. Retain the returned sessionKey; keep the project credential out of browser code.

2

Send an action

Use the session key to authenticate Sending actions. Send launch once, then text for later customer messages. Streaming requests can also set session variables.

3

Render the response

Parse complete SSE events and dispatch each trace to its interface handler. Wait for the SSE event named end before considering delivery complete.

Implementation references

  • Sessions — identity, Environment routing, creation operations and continued conversations.
  • Sending actions — Streaming requests and the non-streaming HTTP alternative.
  • Handling responses — SSE framing, messages, controls and exact trace payloads.
  • Events and diagnostics — generated-text events, tool activity, logs and custom actions.
  • Errors and recovery — interrupted delivery and safe action recovery.
  • Human agent hand-off — Socket.IO updates, message relay and Custom Handoff callback contracts.

Build and manage the agent

Use Platform APIs to configure the agent, its Knowledge and tools, and publish changes. For spoken conversations, use Voice agents.

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