***

title: generate_reply
slug: /reference/python/agents/livewire/agent-session/generate-reply
description: Trigger the agent to generate a reply.
max-toc-depth: 3
---------------------

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

Trigger the agent to generate a reply. On SignalWire the prompt handles
generation automatically; when `instructions` is provided, it is queued as
additional text to speak.

## **Parameters**

<ParamField path="instructions" type="Optional[str]" default="None" toc={true}>
  Optional instructions to include in the reply.
</ParamField>

## **Returns**

`None`

## **Example**

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

server = AgentServer()

@server.rtc_session()
async def entrypoint(ctx: JobContext):
    await ctx.connect()
    agent = Agent(instructions="You are a helpful assistant.")
    session = AgentSession()
    await session.start(agent, room=ctx.room)
    session.generate_reply(instructions="Please introduce yourself to the caller.")

run_app(server)
```