***

title: aiHold
slug: /reference/typescript/relay/call/ai-hold
description: Put an AI agent session on hold.
max-toc-depth: 3
---------------------

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

[ai-unhold]: /docs/server-sdks/reference/typescript/relay/call/ai-unhold

Put an active AI agent session on hold. The AI stops processing conversation
while the call remains active. The caller may hear hold music or silence
depending on the configuration.

<Info>
  Use [`aiUnhold()`][ai-unhold] to resume the AI session.
</Info>

## **Parameters**

<ParamField path="timeout" type="string | undefined" toc={true}>
  Maximum hold duration. The AI session automatically resumes after this timeout.
</ParamField>

<ParamField path="prompt" type="string | undefined" toc={true}>
  A prompt for the AI to speak before going on hold (e.g., "Please hold
  while I check on that.").
</ParamField>

## **Returns**

`Promise<Record<string, unknown>>` -- Server response confirming the AI hold.

## **Example**

```typescript {18}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_TOKEN!,
  contexts: ['default']
});

client.onCall(async (call) => {
  await call.answer();

  // Start an AI agent
  const action = await call.ai({
    prompt: { text: 'You are a support agent.' },
  });

  // After some event, put the AI on hold
  await call.aiHold({
    prompt: 'One moment please while I look that up.',
    timeout: '30',
  });

  // Do some processing, then resume with aiUnhold()
});

await client.run();
```