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

# Sharing Agents

> Share your deployed voice agent via link, embed, or phone number.

# Sharing Agents

After deploying your agent to LiveKit Cloud, you can share it in three ways: a **Private Link**, a **Public Link**, or a **Phone Number**. All options are in the **Share** tab of the Deploy dialog.

## Opening the Share tab

1. Open the **Deploy** dialog from the toolbar.
2. Switch to the **Share** tab.
3. Choose a sharing option: **Private Link**, **Public Link**, or **Phone**.

***

## Private Link

Best for sharing with a specific person — a colleague, a client, or a tester.

* Generates a **one-time use** link with a configurable expiration (1 hour, 24 hours, or 7 days).
* The link contains a LiveKit JWT token that auto-creates a room and dispatches your deployed agent when opened.
* After the TTL expires, the link stops working.

### Security

The JWT token embedded in the URL is **signed** with your LiveKit API secret but **does not contain** the secret itself. If someone decodes the URL, they can only see the room name, participant identity, permissions, and agent name — no credentials are exposed.

### How it works

```
1. Builder generates JWT with RoomAgentDispatch (agent name embedded in token)
2. Token + LiveKit server URL encoded as base64 in the share URL
3. End-user opens voiceblox.ai/talk/{encoded-config}
4. Browser connects to LiveKit using the JWT
5. LiveKit Cloud auto-creates the room and dispatches the agent
6. Voice conversation starts
```

***

## Public Link

Best for embedding on a website or sharing publicly. Each visitor gets their own independent session.

<Warning>
  Public links require the **LiveKit Sandbox Token Server**, which is designed for development and testing. It is not recommended for high-volume production use.
</Warning>

### Setup

1. Open your project's [Settings](https://cloud.livekit.io/projects/p_/settings/project) page in LiveKit Cloud.
2. Find the **Token server** toggle and switch it on.
3. Copy the **sandboxId** displayed below the toggle.
4. Add it to `.env.local`:

```env theme={null}
LIVEKIT_SANDBOX_ID=your-sandbox-id
```

5. Restart the dev server.

### How it works

* Each time someone opens the link, the LiveKit Sandbox Token Server generates a fresh token and creates a new room.
* The deployed agent is automatically dispatched to the new room.
* Multiple people can use the same link simultaneously — each gets a separate conversation.

***

## Embed code

Public links also generate an embed code (iframe) you can paste into any website:

```html theme={null}
<iframe
  src="https://voiceblox.ai/embed/{config}"
  allow="microphone"
  style="width:400px;height:600px;border:none;border-radius:12px;"
></iframe>
```

<Note>
  Embed code is only available for Public Links, since Private Links are single-use.
</Note>

***

## Phone Number

Assign a real phone number to your agent so anyone can call it from their phone — no browser or link required.

### How it works

Voiceblox uses [LiveKit Phone Numbers](https://docs.livekit.io/agents/telephony/phone-numbers/) to purchase and assign a US number to your deployed agent. When someone calls the number, LiveKit creates a room and dispatches your agent automatically via a SIP dispatch rule.

<Note>
  Avatars are automatically disabled on phone calls to avoid unnecessary API cost.
</Note>

### Assigning a phone number

1. Open the **Deploy** dialog and go to the **Share** tab → **Phone** section.
2. If you already own a number in LiveKit, it appears in the **Your Numbers** list — click **Assign** to connect it to this agent.
3. To get a new number, optionally enter an **area code** and click **Search**. Available US numbers are listed.
4. Click **Purchase** next to the number you want. Voiceblox purchases it and creates a SIP dispatch rule pointing to your agent.
5. The assigned number is displayed — anyone can now call it and be connected to your agent.

### Releasing a number

Click the **trash icon** next to the assigned number to unassign it and release it from your LiveKit project.

<Warning>
  Releasing a number removes the SIP dispatch rule. Anyone who has the number saved will no longer be able to reach the agent via that number.
</Warning>

### Requirements

* The agent must be deployed to LiveKit Cloud first.
* Phone numbers are US-based only at this time.
* The `lk` CLI must be installed and available on the server running Voiceblox (used internally for number search and purchase).

***

## Troubleshooting

| Issue                                      | Fix                                                                               |
| ------------------------------------------ | --------------------------------------------------------------------------------- |
| "Share" tab says "Deploy your agent first" | Deploy the agent before generating links or assigning a phone number              |
| Public Link shows setup warning            | Add `LIVEKIT_SANDBOX_ID` to `.env.local` (see [Setup](#setup) above)              |
| Private Link expired                       | Generate a new link with a longer TTL                                             |
| Agent doesn't connect after opening link   | Ensure the agent is still deployed in LiveKit Cloud                               |
| Phone number search returns no results     | Try a different area code, or leave it blank to search all available US numbers   |
| Caller hears silence or no agent joins     | Verify the agent is deployed and the SIP dispatch rule is active in LiveKit Cloud |

***

## Related

* [Deploy to LiveKit Cloud](/deployment/livekit-cloud) — deploy your agent first
* [Environment Variables](/deployment/environment-variables) — full list of env vars
* [Playground](/testing/playground) — test agents locally before deploying
