---
title: "Timeout mechanisms in Moveo"
description: "Learn how the session timeout, the inactivity timeout, and keep alive control how long a conversation stays open."
---

# Timeout mechanisms in Moveo

> Learn how the session timeout, the inactivity timeout, and keep alive control how long a conversation stays open.

Moveo uses several timeout mechanisms to manage the lifecycle of conversations. These timeouts serve
different purposes and work together to ensure optimal user experience while maintaining system
efficiency. This page explains the key timeout mechanisms and how they impact conversations.

## Session timeout

The **session timeout** is the default timeout that acts as the baseline lifetime for a conversation. Its value is configured at the integration level and varies depending on the integration (for example, WhatsApp vs. Zendesk). In the API, it is represented as **session timeout** (in seconds).

The default session timeout varies depending on the integration type. The following table shows the default session timeout for each integration type:

| Integration Type                                              | Default Session Timeout (seconds) |
| ------------------------------------------------------------- | --------------------------------- |
| [Facebook-messenger](/docs/integrations/facebook-messenger)   | 604800 (7 days)                   |
| [Instagram-messenger](/docs/integrations/instagram-messenger) | 604800 (7 days)                   |
| [WhatsApp](/docs/integrations/whatsapp)                       | 604800 (7 days)                   |
| [Viber](/docs/integrations/viber)                             | 604800 (7 days)                   |
| [Intercom](/docs/integrations/intercom)                       | 86400 (1 day)                     |
| [Zendesk](/docs/integrations/zendesk-chat)                    | 86400 (1 day)                     |
| [Front](/docs/integrations/front)                             | 86400 (1 day)                     |
| [Web](/docs/integrations/web/web-getting-started)             | 3600 (1 hour)                     |
| [Sunco](/docs/integrations/sunco)                             | 600 (10 minutes)                  |
| [Smartlead](/docs/integrations/smartlead)                     | 1296000 (15 days)                 |
| [Infobip-sms](/docs/integrations/infobip-sms)                 | 604800 (7 days)                   |
| Infobip-rcs                                                   | 604800 (7 days)                   |
| Telnyx-voice                                                  | 300 (5 minutes)                   |
| Twilio-voice                                                  | 300 (5 minutes)                   |
| Email                                                         | 1296000 (15 days)                 |

This timeout is primarily used in two scenarios:

1.  **Initial Conversation Timeout**: When a conversation is first created, such as through a broadcast message, it uses the **session timeout** until the user replies and an AI or human agent is assigned.
2.  **Human Agent Conversations**: When a human agent is handling the conversation, the **session timeout** governs the session's maximum duration.

The session's expiration time is reset to the **session timeout** value each time the **user** sends a message during a human-handled conversation.

:::note
The **session timeout** is not configurable from the UI. It can only be set via the API by setting `config.session_timeout` property when [creating or updating an integration](/api/rest/add-integration).
:::

---

## Inactivity timeout

The **inactivity timeout** governs the session's duration when an **AI Agent** is active, taking precedence over the default **session timeout**. When an AI agent is assigned to a session, the **inactivity timeout** from the agent's configuration defines the session's maximum lifetime. The session expires if the user does not send a message within this timeframe. This value is represented as **inactivity timeout seconds** in the API.

:::tip
Subscribe to [event notifications](https://docs.moveo.ai/docs/platform/platform-event-notifications.md) to receive notification when a session expires due to inactivity.
:::

Configure this timeout in the **Advanced** section of the AI agent **Settings**. The session's expiration time is reset to the **inactivity timeout** value each time the **user** sends a message during an AI-handled conversation.

### How to configure inactivity timeout

1.  Navigate to your AI agent.
2.  Open the menu next to the AI agent name and click **Settings**.
3.  In **Advanced**, set the days, hours, and minutes of the **Inactivity timeout**.

## Dynamic timeout behavior

Moveo dynamically manages the session timeout based on the context of the conversation.

- If an **AI Agent** is assigned to the conversation, the session's lifetime is determined by the agent's **inactivity timeout**.
- If a **human agent** takes over, the timeout switches to the integration's default **session timeout**.

This ensures that the session's lifetime is adapted to the context, whether it's automated or handled by a human.

For example, if a conversation is started by a campaign, it remains open until the initial **session timeout** expires. If the user responds and an AI agent takes over, the AI agent's **inactivity timeout** now sets the session's expiration. The session expires if the user does not send another message within that new timeframe.

:::note
The session timeout, whether it is the **session timeout** or the **inactivity timeout**, is **only** reset when the **user** sends a message. Messages sent by an AI agent or a human agent do not extend the session's life. The conversation is kept alive exclusively by the user's interactions.
:::

## Keep alive

The **keep alive** timeout specifies the number of seconds to keep a session open after it has been marked as resolved. This allows users to continue the same conversation if they have follow-up questions within a short period.

### Key features:

- **Grace Period**: Provides a buffer after a conversation is resolved.
- **Measured in Seconds**: The value is configured in seconds (for example, 300 seconds = 5 minutes).
- **API Representation**: Represented as `keep_alive` in the API.

### Use case:

Imagine a customer support scenario where an agent has resolved a user's issue and marked the conversation as complete. With a `keep_alive` of 5 minutes:

1.  The conversation remains open and accessible for 5 minutes after being resolved.
2.  If the user sends another message within this window, it is appended to the same conversation.
3.  If the user sends a message after the 5-minute period, a new conversation is created.

### How to configure keep alive timeout

1.  Navigate to **Settings**.
2.  Select the **Environment** you want to modify.
3.  Select the **Settings** tab.
4.  Scroll down to the **Keep alive** section.

### Voice integrations

Keep alive does not affect call termination on voice integrations such as
[Twilio Voice](https://docs.moveo.ai/docs/integrations/twilio-voice.md) and
[Telnyx Voice](https://docs.moveo.ai/docs/integrations/telnyx-voice.md). When the AI agent triggers
[`Resolve`](https://docs.moveo.ai/docs/ai-agents/operations/resolve.md), the platform hangs up the call within a couple of
seconds, whatever the keep alive value.

Choose the keep alive value for your chat channels alone. The setting applies to the whole
environment, so lowering it for a voice reason also shortens the follow-up window of every chat
integration on that environment.

To keep the caller on the line for longer before the call ends, add a
[`Pause`](https://docs.moveo.ai/docs/ai-agents/operations/pause.md) action before `Resolve`. A pause is the only way to
postpone the hangup.
