***

title: generateReply
slug: /reference/typescript/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. 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**

<ParamField path="instructions" type="string | undefined" default="undefined" toc={true}>
  Optional instructions to include as an initial greeting. The agent will speak
  this text when the session begins.
</ParamField>

## **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.' });
```