# Quickstart

This guide gets a new Leilani agent from account creation to a supervised inbound call.

Leilani is built around SIP-based inbound calling. You need a SIP username, password, host, port, and transport from your PBX, SBC, or SIP provider before the agent can register and receive calls.

## 1. Create or open an agent

Sign in from the app with your email address. Leilani sends a magic link and opens the console for the selected agent.

To create another agent, open the header menu and select **New agent**. Each agent has its own SIP registration, instructions, tools, knowledge, directory, users, and funds.

## 2. Configure SIP

Open **Configuration** and fill in the connection details:

- `Display Name`
- `Username`
- `Password`
- `Host`
- `Port`
- `Transport (SIP)`

Use the same values your SIP environment expects for registration. Leilani's SIP traffic originates from `leilani.dev (178.156.204.11)`, which may need to be allowlisted.

Save the configuration, then restart the agent if connection details changed. Restarting drops active calls.

## 3. Set the first-call behavior

Still in **Configuration**, set:

- `Instructions`, for the role, rules, escalation behavior, and tool usage
- `Greeting`, if the agent should read exact opening text
- `Voice`
- `Language`, if most callers speak one language
- `Max Duration`
- `Email`, if completed call transcripts should be sent somewhere

If `Instructions` is empty, Leilani uses its default receptionist behavior. If `Greeting` is empty, the agent starts based on the instructions.

See [Configuration](configuration.md) and [Instructions](instructions.md) for production guidance.

## 4. Add routing

Open **Directory** and add the destinations callers should be able to ask for.

Each entry needs:

- `display_name`, the caller-facing name
- `username`, the SIP destination or transfer target
- `transfer_mode`, one of `Cold`, `Warm`, or `Auto`
- `mailbox`, optional email or E.164 phone number for missed warm handoff messages

You can edit entries manually, upload a CSV, or configure a sync URL. See [Directory](directory.md).

## 5. Add knowledge and tools

Add only what the first workflow needs:

- Use [Knowledge Base](knowledge-base.md) for uploaded text files or crawled website content.
- Use [Functions](functions.md) for HTTP webhooks, email, SMS, and TEL transfers.
- Use [MCP Servers](mcp-servers.md) when a remote system already exposes MCP tools.
- Use [Web Search](web-search.md) only for approved domains.

Keep the first version narrow. It is easier to debug one known callflow than a broad assistant with many overlapping tools.

## 6. Fund the agent

Open **Dashboard** and check **Current Balance**.

The Dashboard displays available funds in dollars at `$0.10` per minute and shows approximate minutes remaining. Use **Add funds** before live testing if the balance is low or empty.

See [Billing & Usage](billing-and-usage.md).

## 7. Test an inbound call

Call the number or route that reaches the configured SIP account.

During the test:

- watch **Dashboard** for registration state and active-call counts
- open **Inbox** to select the live call and watch the transcript
- use manual transfer or hang up only when you need operator intervention
- review transcript email delivery after the call, if configured

## Production checklist

Before sending real callers to an agent:

- SIP registration is green in **Dashboard**
- at least one successful test call has completed
- instructions cover transfer, escalation, unsupported requests, and hangup behavior
- directory entries have tested destinations
- warm transfer entries have mailbox values where missed handoffs matter
- knowledge documents and jobs contain current source material
- Functions have narrow schemas and clear usage instructions
- web search allowlist is empty unless the workflow needs approved public sources
- funds cover the expected launch traffic
