> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# start

> Bind an Agent and prepare the underlying SignalWire AgentBase.

[agent]: /docs/server-sdks/reference/python/agents/livewire/agent

[room]: /docs/server-sdks/reference/python/agents/livewire/job-context

Bind an [`Agent`][agent] to this session
and prepare the underlying SignalWire infrastructure. This translates the agent's
instructions into a prompt, registers tools as SWAIG functions, and maps timing
parameters to SignalWire AI parameters.

## **Parameters**

**`agent`** `Agent` — required

The [`Agent`][agent] instance to bind
to this session.

---

**`room`** `Any` — default: None

A [`Room`][room] instance.
Accepted for API compatibility.

---

**`record`** `bool` — default: False

Whether to record the session. Accepted for API compatibility.

---

## **Returns**

`None`

## **Example**

```python {15}
from signalwire.livewire import Agent, AgentSession, AgentServer, JobContext, function_tool, run_app

@function_tool
def get_weather(city: str) -> str:
    """Get the current weather for a city."""
    return f"Sunny in {city}"

server = AgentServer()

@server.rtc_session()
async def entrypoint(ctx: JobContext):
    await ctx.connect()
    agent = Agent(instructions="You help with weather.", tools=[get_weather])
    session = AgentSession()
    await session.start(agent, room=ctx.room)

run_app(server)
```