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

# generateReply

> Trigger the agent to generate a reply.

Trigger the agent to generate a reply. When `instructions` is provided, it is
added as an "Initial Greeting" prompt section on the underlying SignalWire
`AgentBase`, causing the agent to speak those instructions.

## **Signature**

```typescript {1}
generateReply(options?: { instructions?: string }): void
```

## **Parameters**

**`instructions`** `string | undefined` — default: undefined

Optional instructions to include as an initial greeting. The agent will speak
this text when the session begins.

---

## **Returns**

`void`

## **Example**

```typescript {4}
const session = new AgentSession();
await session.start({ agent });

session.generateReply({ instructions: 'Greet the user warmly and ask how you can help.' });
```