> ## 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.

# Platform

> How Lehar is put together: control plane, voice agent, and the media layer.

Lehar is a multi-tenant voice-AI platform built on a real-time **Media Layer**. You create and configure AI agents that talk to end users over the web (WebRTC) or phone (outbound SIP), plus WhatsApp text and voice, and run outbound **campaigns**.

## Components

| Component                         | Role                                                                                                                                                                                                             |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Control plane**                 | System of record (workspaces, users, keys, agents, sessions, campaigns). Creates rooms, dispatches the agent, mints tokens, runs the knowledge base and the campaign engine. This is the API you integrate with. |
| **Voice agent**                   | Worker that joins the room and runs the speech loop (STT → LLM → TTS), tools, and knowledge-base lookups.                                                                                                        |
| **Media Layer**                   | Real-time audio transport and dispatch; outbound SIP for phone calls.                                                                                                                                            |
| **Campaign Engine**               | Durable orchestration for outbound voice and WhatsApp campaigns.                                                                                                                                                 |
| **Knowledge base (Vector Store)** | Vector search for retrieval-augmented answers.                                                                                                                                                                   |

## Session flow

```mermaid theme={null}
sequenceDiagram
  participant U as User (browser/phone)
  participant BE as Control plane
  participant LK as Media Layer
  participant AG as Voice agent
  U->>BE: POST /sessions (bearer)
  BE->>BE: assemble prompt + substitute variables
  BE->>LK: create room + dispatch agent
  BE-->>U: participant_token, room, livekit_url
  U->>LK: connect with token
  LK->>AG: dispatch job
  loop conversation
    U->>AG: speech
    AG-->>U: spoken reply
  end
  AG->>BE: webhook: transcript + usage
```

## Channels

* **Web voice** — a browser participant connects to a media room with a short-lived token.
* **Outbound phone** — the agent dials the recipient over SIP.
* **WhatsApp** — text conversations, optionally escalating to a voice call.

## Where to go next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">Start your first session.</Card>
  <Card title="API Reference" icon="book" href="/api-reference/introduction">Integrate the control-plane API.</Card>
</CardGroup>
