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

# Quickstart

Build an agent, deploy it, and make your first call within minutes.

## Prerequisites

* A free Cartesia account ([sign up here](https://play.cartesia.ai))
* Python 3.9+
* An LLM API key (Anthropic, OpenAI, Google, etc.)
* [uv](https://docs.astral.sh/uv/) (Python package and project manager)

## Install the CLI

```bash theme={null}
curl -fsSL https://cartesia.sh | sh
cartesia auth login
```

## Install uv

Install [uv](https://docs.astral.sh/uv/), a fast Python package manager to manage dependencies and virtual environments.

```bash theme={null}
curl -LsSf https://astral.sh/uv/install.sh | sh
```

## Create your agent

Create a new project and install dependencies. uv will automatically set up a virtual environment and manage your packages.

```bash theme={null}
uv init my-voice-agent && cd my-voice-agent
uv add cartesia-line
```

Create `main.py`:

```python theme={null}
import os
from line.llm_agent import LlmAgent, LlmConfig, end_call
from line.voice_agent_app import VoiceAgentApp

async def get_agent(env, call_request):
    return LlmAgent(
        model="anthropic/claude-haiku-4-5-20251001", # Or "gpt-5-nano", "gemini/gemini-2.5-flash", etc.
        api_key=os.getenv("ANTHROPIC_API_KEY"),
        tools=[end_call],
        config=LlmConfig(
            system_prompt="You are a helpful assistant.",
            introduction="Hello! How can I help you today?",
        ),
    )

app = VoiceAgentApp(get_agent=get_agent)

if __name__ == "__main__":
    app.run()
```

## Test locally

Start your agent server.

```bash theme={null}
ANTHROPIC_API_KEY=your-api-key PORT=8000 uv run python main.py
```

In a separate terminal, chat with your agent by simply running:

```bash theme={null}
cartesia chat 8000
```

This lets you test your agent's reasoning before deploying.

## Deploy

Link your project and deploy.

```bash theme={null}
cartesia init    # Choose "Create new" and name your agent
cartesia deploy
```

Your agent deploys in under 30 seconds on Cartesia's managed runtime.

## Set environment variables

Configure your API key for the deployed agent.

```bash theme={null}
cartesia env set ANTHROPIC_API_KEY=your-api-key
```

Or import from a `.env` file:

```bash theme={null}
cartesia env set --from .env
```

## Make a call

Call your agent from your phone.

```bash theme={null}
cartesia call +1XXXXXXXXXX
```

Or visit the [Playground](https://play.cartesia.ai/agents) to call from the web.

## Next steps

<CardGroup cols={2}>
  <Card title="Add tools" icon="wrench" href="/line/sdk/tools">
    Connect databases, APIs, and external services
  </Card>

  <Card title="Configure prompts" icon="robot" href="/line/sdk/agents">
    Customize system prompts and conversation flow
  </Card>

  <Card title="Calls API" icon="globe" href="/line/integrations/calls-api">
    Connect web clients via WebSocket
  </Card>

  <Card title="Agent Builder" icon="sparkles" href="/line/start-building/agent-builder">
    Build agents visually in the Playground
  </Card>
</CardGroup>
