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

# Deploy

> Deploy your LiveKit agent to Telnyx infrastructure with the lk agent deploy command, which builds a container image and provisions workers in chosen regions.

Same commands as LiveKit Cloud. `lk agent deploy` uploads your code, builds a container image on Telnyx's build service, and deploys the worker.

<Note>
  **First time deploying?** Complete [Quickstart — Step 1](/docs/livekit/quickstart#step-1-configure-the-cli) to configure your CLI and register with the platform.
</Note>

## 1. Create your agent

```bash theme={null}
lk agent create .
```

Registers the agent and writes the agent ID to `livekit.toml`. Skip this if you've already created the agent.

## 2. Deploy

```bash theme={null}
lk agent deploy . --secrets TELNYX_API_KEY=$TELNYX_API_KEY
```

Subsequent deploys roll out a new version.

## 3. Check status

```bash theme={null}
lk agent list
```

## 4. Tail logs

```bash theme={null}
lk agent logs --id <AGENT_ID>
```

For build logs:

```bash theme={null}
lk agent logs --id <AGENT_ID> --log-type build
```

## 5. Update secrets

Add or update secrets on a running agent:

```bash theme={null}
lk agent update-secrets <AGENT_ID> --secrets "OPENAI_API_KEY=<your-key>"
```

## 6. Rollback

```bash theme={null}
lk agent rollback <AGENT_ID>
```

## What gets auto-injected

The platform injects these into your agent's environment at runtime — you don't need to set them manually:

* `LIVEKIT_URL`
* `LIVEKIT_API_KEY` — your Telnyx API key
* `LIVEKIT_API_SECRET`

## More

* [Secrets](/docs/livekit/deploy/secrets) — Managing API keys and sensitive config
* [Configuration](/docs/livekit/deploy/configuration) — Regions, multi-agent projects, env vars
* [Management](/docs/livekit/deploy/management) — What Telnyx manages vs. what you control
