# Real-time monitoring

Real-time monitoring enables live observation of agent conversations via WebSocket and remote control of active calls. This feature provides real-time visibility into conversation events and allows intervention through control commands.

:::callout{intent="note"}
This is an enterprise-only feature.
:::

## Overview

Monitoring sessions stream conversation events in real-time, including transcripts, agent responses, and corrections. You can also send control commands to end calls, transfer to phone numbers, or enable human takeover during active chat conversations.

## WebSocket endpoint

Connect to a live conversation using the monitoring endpoint:

```
wss://api.elevenlabs.io/v1/convai/conversations/{conversation_id}/monitor
```

Replace `{conversation_id}` with the ID of the conversation you want to monitor.

## Authentication

Authentication requires:

- **API key permissions**: Your API key must have `ElevenLabs Agents Write` scope
- **Workspace access**: You must have `EDITOR` access to the agent’s workspace
- **Header format**: Include your API key via the `xi-api-key` header

### Example connection

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
const ws = new WebSocket('wss://api.elevenlabs.io/v1/convai/conversations/conv_123/monitor', {
  headers: {
    'xi-api-key': 'your_api_key_here',
  },
});
```

## Configuration

Before monitoring conversations, enable the feature in your agent’s settings:

:::::steps
:::step{title="Navigate to agent settings"}
Open your agent’s configuration page in the dashboard.
:::

:::step{title="Enable monitoring"}
In the Advanced settings panel, toggle the “Monitoring” option.

<img src="/current/media/t/75c5dc71-055f-4496-bcaf-6966eeb0b645/p/a00292c8-d5af-403f-99c5-4db8968239ca/1a4b5507a39ddf6a517772b8c01ede5f7d12429175fdf89e04c8ba910f646f8e.png/raw" alt="Monitoring toggle in agent settings">
:::

::::step{title="Select events"}
Choose which events you want to monitor. See [Client Events](/guides/elevenagents-customization-events-client-events) for a full list of available events.

:::callout{intent="warning"}
The following events cannot be monitored: VAD scores, turn probability metrics, and pings.
:::
::::
:::::

:::callout{intent="info"}
The conversation must be active before you can connect to monitor it. You cannot monitor a conversation before it begins.
:::

## Control commands

Send JSON commands through the WebSocket to control the conversation:

:::::accordion{title="End call"}
Terminate the active conversation immediately.

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
// End the active conversation
ws.send(JSON.stringify({
  command_type: "end_call"
}));
```
:::::

:::::accordion{title="Transfer to phone number"}
Transfer the call to a specified phone number.

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
// Transfer to a phone number
ws.send(JSON.stringify({
  command_type: "transfer_to_number",
  parameters: {
    phone_number: "+1234567890"
  }
}));
```

:::callout{intent="note"}
The `transfer_to_number` system tool must already be configured in the agent.
:::
:::::

:::::accordion{title="Realtime contextual update"}
Inject context or instructions into the active conversation so the agent can use the new information in its responses.

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
// Send a contextual update to the agent
ws.send(JSON.stringify({
  command_type: "contextual_update",
  parameters: {
    contextual_update: "<your update text>"
  }
}));
```
:::::

:::::accordion{title="Enable human takeover"}
Switch from AI agent to human operator mode for chat conversations.

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
// Enable human takeover
ws.send(JSON.stringify({
  command_type: "enable_human_takeover"
}));
```
:::::

:::::accordion{title="Send message as human"}
Send a message to the user as a human operator in chat conversations.

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
// Send a message as a human operator
ws.send(JSON.stringify({
  command_type: "send_human_message",
  parameters: {
    text: "How can I help you?"
  }
}));
```
:::::

:::::accordion{title="Disable human takeover"}
Return control from human operator back to the AI agent.

::::tabs
:::tab{title="JavaScript"}
:::

:::tab{title="Python"}
:::
::::

```javascript
// Disable human takeover and return to AI
ws.send(JSON.stringify({
  command_type: "disable_human_takeover"
}));
```
:::::

## Use cases

Real-time monitoring enables several operational scenarios:

::::card-grid
:::card{title="Quality assurance"}
Monitor agent conversations in real-time to ensure quality standards and identify training opportunities.
:::

:::card{title="Human escalation"}
Detect conversations requiring human intervention and seamlessly take over from the AI agent.
:::

:::card{title="Analytics dashboards"}
Build real-time monitoring dashboards that aggregate conversation metrics and performance indicators.
:::

:::card{title="Call center oversight"}
Supervise multiple agent conversations simultaneously and intervene when necessary.
:::

:::card{title="Automated intervention"}
Implement automated systems that analyze conversation content and trigger actions based on specific conditions.
:::

:::card{title="Training and coaching"}
Use live conversations as training material and provide real-time feedback to improve agent performance.
:::
::::

## Limitations

:::accordion{title="Asynchronous event delivery"}
Monitoring events are sent asynchronously to the conversation and may not arrive in the same order as the core conversation events. When processing events, do not rely on event order to reconstruct exact conversation timing.
:::

:::accordion{title="Audio data not available"}
The monitoring endpoint streams only text events and metadata. Raw audio data is not included in monitoring events.
:::

:::accordion{title="Historical event limit"}
Only approximately the last 100 events are cached and available when connecting to an active conversation. Earlier events cannot be retrieved.
:::

:::accordion{title="Event filtering restrictions"}
VAD scores, turn probability metrics, and ping events cannot be monitored when custom event selection is enabled.
:::

:::accordion{title="Connection timing"}
You must connect after the conversation has started. The monitoring endpoint cannot be used before conversation initiation.
:::

:::accordion{title="Permissions required"}
API keys must have `ElevenLabs Agents Write` scope, and you must have `EDITOR` workspace access to monitor conversations.
:::

## Related resources

::::card-grid
:::card{title="Post-call Webhooks" href="/guides/elevenagents-workflows-post-call-webhooks"}
Receive conversation data and analysis after calls complete.
:::

:::card{title="Agent Analysis" href="/guides/elevenagents-customization-agent-analysis"}
Configure success evaluation and data collection for conversations.
:::

:::card{title="Client Events" href="/guides/elevenagents-customization-events-client-events"}
Understand events received during conversational applications.
:::

:::card{title="WebSocket API" href="/guides/elevenagents-libraries-web-sockets"}
Learn about the WebSocket API for real-time conversations.
:::
::::

## Related pages

- [Administration](./administration-index.md)
- [API reference](./api-reference-index.md)
- [Changelog](./changelog-index.md)
- [ElevenAgents](./elevenagents-index.md)
- [ElevenAPI](./elevenapi-index.md)
- [ElevenCreative](./elevencreative-index.md)
- [ElevenLabs Documentation Docs](../index.md)
- [General Troubleshooting FAQ](./troubleshooting-index.md)
- [General Website FAQ](./website-index.md)
- [Help Center](./help-center-2-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
