Build agents

Chat agents

Every agent handles text conversations out of the box. The same agent can answer in the on-site widget, over SMS and WhatsApp, and from your own backend; each is a channel on the same agent, and adding voice or a schedule takes nothing away.

Greeting & behavior

Set a chat greeting, the opener shown when a new conversation starts. Beyond that, the agent's behavior comes from its system prompt, its knowledge, and its tools. Starting a brand-new conversation returns the greeting instantly without a model call.

When a turn ends

A live agent is tuned for responsiveness. Once your question is answered the turn is over: its reply ends the turn instead of the agent carrying on by itself, and when it needs something from you it asks and waits for your answer rather than guessing.

If an agent's first reply comes back empty, Hania asks again once on its own, so the customer still gets an answer. This happens in web chat and the widget, on WhatsApp, Messenger and Instagram, over the API and on phone calls, though not on realtime voice calls. Nothing extra appears in the conversation.

Autonomous runs are the opposite case, because nobody is there to judge the result. Those are checked against the evidence of what the tools actually returned before the run is accepted as complete. See how a run knows it's done. You can ask for the same check in a single conversation by giving it a goal.

Questions in the chat

When an agent needs something from you before it can go on, it asks in the conversation. On the web console that is a card with one or more questions, each with choices to pick from or a box to type in, and a short label on each when there are several. Pick an answer, type your own instead, or leave a question for the agent to decide. Or just keep typing in the chat; that dismisses the card and the agent carries on from your message.

Once you answer, the agent continues the same reply from where it paused. Your answers stay on the card rather than appearing as a new message from you. Every agent can do this on the web console, with nothing to add or set up.

On the website widget, on messaging channels (WhatsApp, Telegram, Slack, email, SMS), on phone calls, and over the API, the agent asks in plain words, as before. For scheduled runs with nobody present, questions go to the Review queue instead.

Where it runs

  • Web: the embeddable widget on your site, and the built-in test chat in the dashboard.
  • SMS & WhatsApp: text messaging channels.
  • API: your backend, via the Chat API (channel=api), passing your own external_user_id.

Every message lands in a conversation tagged with its channel, so you can review and filter by where it happened.

When a reply fails

Now and then an agent can't finish a reply, for example when a service it depends on doesn't answer. You can see this in Conversations: a short Reply failed line sits under the message it belongs to, with the reason and the time. In a chat you started from the dashboard, the line is under the reply that failed. On the widget and on messaging channels, it's under the customer's message that didn't get an answer.

In the list, a conversation where something went wrong shows a small red number. It counts failed replies and failed tool calls, a reply that WhatsApp, Messenger, Instagram, Telegram, Slack or SMS wouldn't accept, and a run that failed, was interrupted or expired while waiting for an answer. The number covers the whole conversation, so it stays after later replies go through. To see only these conversations, open Filter in Conversations and tick Has errors.

When a channel didn't accept a reply, the conversation also shows a note saying a reply couldn't be delivered, with the time it happened. Choose Details to see the reason the platform gave. The note is a record of what happened rather than a live status, so it stays even after later replies go through, and a newer failure replaces it.

Driving it from code

To integrate an agent into your product, call POST /api/v1/chat/send (or the streaming /chat/send-stream) with the agent id and the user's message. Persist the returned conversation_id to keep a thread going. See the Chat API for the full contract.

Test it

Use the dashboard's test chat to talk to the agent as a user would, watch tool calls run, and inspect the trace before you put it in front of customers. When the agent uses a model that shows its thinking, you can open its thought process right in the chat.