> ## Documentation Index
> Fetch the complete documentation index at: https://anam.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Duration

> Configure Anam session limits, greeting behaviour, and inactivity handling so persona conversations start and end predictably.

## Duration limit

Control how long a session stays active with `maxSessionLengthSeconds`. The countdown begins when the persona starts streaming.

```javascript theme={"system"}
const personaConfig = {
  name: "Cara",
  avatarId: "071b0286-4cce-4808-bee2-e642f1062de3",
  avatarModel: "cara-4",
  voiceId: "de23e340-1416-4dd8-977d-065a7ca11697",
  llmId: "a7cf662c-2ace-4de1-a21e-ef0fbf144bb7",
  systemPrompt: "You are Cara, a helpful customer service representative.",
  maxSessionLengthSeconds: 300,
};
```

> [!NOTE]
>
> If you don't set `maxSessionLengthSeconds`, the session continues until manually ended or until it reaches your plan's conversation limit: 3 minutes on Free, 5 minutes on Starter, 10 minutes on Explorer, and unlimited on Growth and above.

### Recommended durations

| Use case | Duration | Reason |
| - | - | - |
| Trial / demo | 2–5 minutes | Gives users a taste without running up usage |
| Product demo | 5–15 minutes | Enough to showcase key features |
| Customer support | 10–30 minutes | Room for complex issues |

### Tips

* Allow enough time for the conversation to conclude naturally — abrupt endings frustrate users.
* Consider showing users a countdown timer so the cutoff isn't a surprise.
* Track actual session lengths to find the right limit for your use case.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.