Guides

Guides

Short, end-to-end walkthroughs for common jobs. Each one strings together the concepts and APIs you've met into a finished result.

Build a support chat agent

  1. Create a bot as a chat agent and write its system prompt — its job, tone, and guardrails.
  2. Add your help content as knowledge (a help-center URL or uploaded docs) and assign it to the bot.
  3. Give it a tool or two so it can act — look up an order, open a ticket.
  4. Talk to it in the test chat, watch the trace, and refine the prompt until it's right.
  5. Deploy it with the widget on your site, or drive it from your backend with the Chat API.

Connect a custom API tool

  1. In Tools, create a configuration — by hand, from a preset, or with discovery that reads your API docs for you.
  2. Store any API key or token in the tool's configuration; it's encrypted and write-only.
  3. Test the tool with sample parameters to confirm the request and response.
  4. Assign it to a bot with clear instructions on when to use it, then test the agent end-to-end.

Embed the widget on your site

  1. Create a widget key for the bot and restrict it to your domain(s).
  2. Customize the theme, greeting, and copy.
  3. Copy the embed snippet and paste it into your site's HTML — changes you make later sync to the live widget.
Use the public hania_ widget key in the browser — never your account hania_sk_ key.

Set up an outbound calling flow

  1. Build a voice agent with a greeting and in-call controls, and configure its outbound voice number.
  2. From your backend, place a call with the Calls API — pass the bot and the number to dial.
  3. Read the result as a voice conversation, and close it out with a post-call hook that writes the outcome to your system.