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

# Quickstart

> Create an agent session and connect a participant in a few steps.

This walks through starting a **web voice session** end to end. You'll need a workspace API key and a login session (see [Authentication](/api-reference/authentication)).

<Steps>
  <Step title="Verify your workspace">
    ```bash theme={null}
    curl "$LEHAR_BASE_URL/workspace" -H "X-API-KEY: $LEHAR_API_KEY"
    ```
  </Step>

  <Step title="List published agents">
    ```bash theme={null}
    curl "$LEHAR_BASE_URL/agent/all" -H "X-API-KEY: $LEHAR_API_KEY"
    ```

    Pick an `id` from the returned catalog.
  </Step>

  <Step title="Create a session">
    Session creation is authenticated with a **bearer login session**, not an API key.

    ```bash theme={null}
    curl -X POST "$LEHAR_BASE_URL/sessions" \
      -H "Authorization: Bearer $LEHAR_LOGIN_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "agent_id": "agent_sales_hi",
        "custom_variables": { "callee_name": "Jane", "company": "Acme" },
        "config": { "tts_provider": "sarvam", "voice": "anushka" }
      }'
    ```

    The response includes `participant_token`, `room_name`, and `livekit_url`.
  </Step>

  <Step title="Connect the participant">
    Use the returned values to connect a
    **voice client** in the browser. The agent joins the room automatically.
  </Step>

  <Step title="Read results">
    Fetch session state any time:

    ```bash theme={null}
    curl "$LEHAR_BASE_URL/sessions/$SESSION_ID" -H "X-API-KEY: $LEHAR_API_KEY"
    ```

    Or subscribe to webhooks for transcript and usage.
  </Step>
</Steps>

<Tip>
  Prompt placeholders like `{{callee_name}}` are filled from `custom_variables` at dispatch time.
</Tip>
