> ## Documentation Index
> Fetch the complete documentation index at: https://docs.astradial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Super Human (AI bots)

> Create AI voice bots powered by Google Gemini that can answer phone calls, have conversations, and transfer to humans.

**Super Human** is Astradial's AI voice bot system. It lets you create bots that can answer phone calls, have natural conversations, collect information, and transfer callers to human agents when needed. The bots are powered by Google Gemini Live.

## How it works

1. You create a bot and design its conversation flow
2. You connect a phone number or extension to the bot
3. When someone calls that number, the bot answers
4. The bot follows your flow — greeting the caller, asking questions, taking actions
5. The bot can transfer to a human agent, create tickets, or call webhooks

## Set up your API key

Before creating bots, you need a Google Gemini API key:

<Steps>
  <Step title="Get a Gemini API key">
    Go to [Google AI Studio](https://aistudio.google.com/) and create an API key.
  </Step>

  <Step title="Open the Super Human page">
    Click **Super Human** in the sidebar under **Configure**.
  </Step>

  <Step title="Click the status indicator">
    At the top of the page, click the pill that says "Not Connected" (red).
  </Step>

  <Step title="Enter your API key">
    Paste your Google API key in the dialog and click **Save**.
  </Step>

  <Step title="Verify connection">
    The status indicator turns green and shows "Connected".
  </Step>
</Steps>

## Create a bot

<Steps>
  <Step title="Enter a name">
    Type a name for your bot in the input field (e.g., "Reception Bot").
  </Step>

  <Step title="Click Create Agent">
    The bot is created with an empty flow.
  </Step>

  <Step title="Click Edit Flow">
    Click the **Edit Flow** button on the bot card to open the visual flow editor.
  </Step>
</Steps>

## The flow editor

The flow editor is a visual tool where you design the conversation. It looks like a flowchart — nodes connected by lines.

### Node types

| Node        | Purpose                                                                   |
| ----------- | ------------------------------------------------------------------------- |
| **Initial** | The starting point. Defines the bot's personality and first instructions. |
| **Node**    | A conversation step with instructions and available actions.              |
| **End**     | The end of the conversation. The bot hangs up.                            |

### Configuring a node

Click any node to open the inspector panel on the right. The inspector has four tabs:

**General tab:**

* **Label** — A name for this node (for your reference)
* **Respond Immediately** — Whether the bot speaks right away or waits
* **Context Strategy** — How conversation history is handled:
  * **Append** — Keep all messages (default)
  * **Reset** — Clear context between turns
  * **Reset with Summary** — Clear but create a summary first

**Messages tab:**

* **Role Messages** — Define the bot's personality (e.g., "You are a friendly hotel receptionist named Sarah")
* **Task Messages** — Instructions for what the bot should do at this step (e.g., "Ask the guest for their room number")

**Functions tab:**

* Define actions the bot can take:
  * **Transfer to Department** — Send the caller to a queue or phone number
  * **Check Availability** — Call an external API
  * **Submit Ticket** — Create a support ticket
  * Each function has parameters, routing rules, and state mappings

**Actions tab:**

* **Pre-actions** — Things that happen before the bot speaks (e.g., call a webhook)
* **Post-actions** — Things that happen after (e.g., hang up, say something with TTS)

### Saving your flow

Press **Cmd+S** (Mac) or **Ctrl+S** (Windows) to save, or click the **Save to Gateway** button.

## Connect a bot to a phone number

To make a bot answer calls:

<Steps>
  <Step title="Create a user with AI routing">
    Go to **Users** → **Add User**. Set the routing to **AI Bot (WSS URL)**.
  </Step>

  <Step title="Get the WebSocket URL">
    On the Super Human page, the WebSocket URL is shown at the bottom:

    ```
    wss://gateway.astradial.com/ws/{orgId}/{botId}?key={apiKey}
    ```
  </Step>

  <Step title="Paste the URL as the routing destination">
    Use this URL as the WebSocket URL in the user's routing configuration.
  </Step>

  <Step title="Route a phone number to this extension">
    Go to **Phone Numbers**, configure the routing of your DID to point to this user's extension.
  </Step>
</Steps>

Now when someone calls that phone number, it rings the extension, which connects to your AI bot.

## Department transfers

Bots can transfer callers to human agents. Set up department routing:

1. On the bot card, click the **Transfer Config** button (expand icon)
2. Click **Add** to add a department
3. For each department, configure:
   * **Label** — The department name (e.g., "Room Service")
   * **Type** — Queue or Phone
   * **Target** — The queue number or phone number
4. Click **Save Mappings**

The bot can then use a `transfer_to_department` function to route callers to the right team.

## API keys

Generate API keys for your bots:

1. Enter an optional label in the API key input
2. Click **Create Key**
3. Copy the key immediately — it is only shown once
4. Use this key in the WebSocket URL to authenticate connections

## Bot settings

Each bot shows:

* **Name** — The bot's display name
* **Extension** — If linked to a PBX extension
* **Model** — The Gemini model being used (e.g., gemini-2.0-flash)
* **Voice** — The voice ID (e.g., Puck, Kore)
* **Status** — Active or Inactive
