> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# ElevenLabs

ElevenLabs provides a VoxEngine client for connecting a call or media unit to the ElevenLabs Agents WebSocket API.

Use `ElevenLabs.createAgentsClient(...)` to create an `AgentsClient` for the current scenario.

## Related guides

Learn how ElevenLabs Agents fits into a VoxEngine call flow.

## Contents

* &#x20;[Usage](#usage): required module import and basic flow.
* &#x20;[Factory functions](#factory-functions): create the ElevenLabs Agents client.
* &#x20;[Methods](#methods): conversation, tools, and contextual client messages.
* &#x20;[Events](#events): WebSocket media bridge events.
* &#x20;[AgentsEvents](#agentsevents): ElevenLabs Agents event names and payload fields.

## Usage

Add the module before using the namespace:

```js
require(Modules.ElevenLabs);
```

Create the client, bridge media, and listen for ElevenLabs Agents events.

## Factory functions

### &#x20;createAgentsClient

Creates a new [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.

```ts
createAgentsClient(parameters: AgentsClientParameters): Promise<ElevenLabs.AgentsClient>
```

**Parameters**

| Parameter    | Type                                       | Req. | Description |
| ------------ | ------------------------------------------ | ---- | ----------- |
| `parameters` | <code>AgentsClient<wbr />Parameters</code> | ✓    |             |

**Returns**

| Type                                           | Description                                                          |
| ---------------------------------------------- | -------------------------------------------------------------------- |
| <code>Promise\<ElevenLabs.AgentsClient></code> | Resolves to the [`ElevenLabs.AgentsClient`](#agentsclient) instance. |

### &#x20;createRealtimeTTSPlayer

Creates a new [ElevenLabs.RealtimeTTSPlayer](/api-reference/voxengine/eleven-labs/realtime-tts-player) instance with the specified text (TTS is used to play the text). You can attach media streams later via the `ElevenLabs.RealtimeTTSPlayer.sendMediaTo` or `VoxEngine.sendMediaBetween` methods.
NOTE: this method uses 11labs `initializeConnection`([https://elevenlabs.io/docs/api-reference/text-to-speech/v-1-text-to-speech-voice-id-stream-input#send.initializeConnection](https://elevenlabs.io/docs/api-reference/text-to-speech/v-1-text-to-speech-voice-id-stream-input#send.initializeConnection)) method internally.

```ts
createRealtimeTTSPlayer(text: string, parameters?: RealtimeTTSPlayerParameters): RealtimeTTSPlayer
```

**Parameters**

| Parameter    | Type                                                   | Req. | Description |
| ------------ | ------------------------------------------------------ | ---- | ----------- |
| `text`       | `string`                                               | ✓    |             |
| `parameters` | <code>RealtimeTTS<wbr />Player<wbr />Parameters</code> | ✗    |             |

**Returns**

| Type                                  | Description                              |
| ------------------------------------- | ---------------------------------------- |
| <code>RealtimeTTS<wbr />Player</code> | The requested `RealtimeTTSPlayer` value. |

## AgentsClient

## Methods

### &#x20;addEventListener

Adds a handler for the specified [ElevenLabs.AgentsEvents](/api-reference/voxengine/eleven-labs#agentsevents) or [ElevenLabs.Events](/api-reference/voxengine/eleven-labs#events) event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.

```ts
addEventListener(event: ElevenLabs.Events | ElevenLabs.AgentsEvents | string, callback: (event: object) => any): void
```

**Parameters**

| Parameter  | Type                                                                              | Req. | Description                                   |
| ---------- | --------------------------------------------------------------------------------- | ---- | --------------------------------------------- |
| `event`    | <code>ElevenLabs.<wbr />Events \| ElevenLabs.<wbr />AgentsEvents \| string</code> | ✓    | Event constant or event name to subscribe to. |
| `callback` | <code>(event: object) => any</code>                                               | ✓    | Function called when the event is emitted.    |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;clearMediaBuffer

Clears the ElevenLabs WebSocket media buffer.

```ts
clearMediaBuffer(parameters?: ClearMediaBufferParameters): void
```

**Parameters**

| Parameter    | Type                                                  | Req. | Description |
| ------------ | ----------------------------------------------------- | ---- | ----------- |
| `parameters` | <code>ClearMedia<wbr />Buffer<wbr />Parameters</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;clientToolResult

Result of the client tool call. [https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#send.Client-Tool-Result](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#send.Client-Tool-Result)

```ts
clientToolResult(parameters: Object): void
```

**Parameters**

| Parameter    | Type     | Req. | Description |
| ------------ | -------- | ---- | ----------- |
| `parameters` | `Object` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;close

Closes the ElevenLabs connection (over WebSocket) or connection attempt.

```ts
close(): void
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;contextualUpdate

Allows to send non-interrupting background information to the conversation. [https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#send.Contextual-Update](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#send.Contextual-Update)

```ts
contextualUpdate(parameters: Object): void
```

**Parameters**

| Parameter    | Type     | Req. | Description |
| ------------ | -------- | ---- | ----------- |
| `parameters` | `Object` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;conversationInitiationClientData

Defines what can be customized when starting a conversation. [https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#send.Conversation-Initiation-Client-Data](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#send.Conversation-Initiation-Client-Data)

```ts
conversationInitiationClientData(parameters: Object): void
```

**Parameters**

| Parameter    | Type     | Req. | Description |
| ------------ | -------- | ---- | ----------- |
| `parameters` | `Object` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;id

Returns the AgentsClient id.

```ts
id(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;removeEventListener

Removes a handler for the specified [ElevenLabs.AgentsEvents](/api-reference/voxengine/eleven-labs#agentsevents) or [ElevenLabs.Events](/api-reference/voxengine/eleven-labs#events) event.

```ts
removeEventListener(event: ElevenLabs.Events | ElevenLabs.AgentsEvents | string, callback?: (event: object) => any): void
```

**Parameters**

| Parameter  | Type                                                                              | Req. | Description                                   |
| ---------- | --------------------------------------------------------------------------------- | ---- | --------------------------------------------- |
| `event`    | <code>ElevenLabs.<wbr />Events \| ElevenLabs.<wbr />AgentsEvents \| string</code> | ✓    | Event constant or event name to subscribe to. |
| `callback` | <code>(event: object) => any</code>                                               | ✗    | Function called when the event is emitted.    |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;sendMediaTo

Starts sending media from the ElevenLabs (via WebSocket) to the media unit. ElevenLabs works in real time.

```ts
sendMediaTo(mediaUnit: VoxMediaUnit, parameters?: SendMediaParameters): void
```

**Parameters**

| Parameter    | Type                                    | Req. | Description |
| ------------ | --------------------------------------- | ---- | ----------- |
| `mediaUnit`  | `VoxMediaUnit`                          | ✓    |             |
| `parameters` | <code>SendMedia<wbr />Parameters</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;stopMediaTo

Stops sending media from the ElevenLabs (via WebSocket) to the media unit.

```ts
stopMediaTo(mediaUnit: VoxMediaUnit): void
```

**Parameters**

| Parameter   | Type           | Req. | Description |
| ----------- | -------------- | ---- | ----------- |
| `mediaUnit` | `VoxMediaUnit` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;userMessage

Allows to send user text messages to the conversation. [https://elevenlabs.io/docs/agents-platform/customization/events/client-to-server-events#user-messages](https://elevenlabs.io/docs/agents-platform/customization/events/client-to-server-events#user-messages)

```ts
userMessage(parameters: Object): void
```

**Parameters**

| Parameter    | Type     | Req. | Description |
| ------------ | -------- | ---- | ----------- |
| `parameters` | `Object` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;webSocketId

Returns the ElevenLabs WebSocket id.

```ts
webSocketId(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

## Events

These events describe audio received through the ElevenLabs WebSocket media bridge.

### &#x20;WebSocketMediaStarted

Triggered when the audio stream sent by a third party through an ElevenLabs WebSocket is started playing.

Event constant: `Events.WebSocketMediaStarted`

**Payload**

| Field                                | Type                                     | Req. | Description                                                                                                                                       |
| ------------------------------------ | ---------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                             | `AgentsClient`                           | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                        |
| `tag`                                | `string`                                 | ✗    | Special tag to name audio streams sent over one WebSocket connection. With it, one can send 2 audios to 2 different media units at the same time. |
| `encoding`                           | `string`                                 | ✗    | Audio encoding formats.                                                                                                                           |
| <code>custom<wbr />Parameters</code> | <code>\{ \[key: string]: string }</code> | ✗    | Custom parameters.                                                                                                                                |

### &#x20;WebSocketMediaEnded

Triggers after the end of the audio stream sent by a third party through an ElevenLabs WebSocket (**1 second of silence**).

Event constant: `Events.WebSocketMediaEnded`

**Payload**

| Field       | Type                                   | Req. | Description                                                                                                                                       |
| ----------- | -------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`    | `AgentsClient`                         | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                        |
| `tag`       | `string`                               | ✗    | Special tag to name audio streams sent over one WebSocket connection. With it, one can send 2 audios to 2 different media units at the same time. |
| `mediaInfo` | <code>WebSocket<wbr />MediaInfo</code> | ✗    | Information about the audio stream that can be obtained after the stream stops or pauses (**1 second of silence**).                               |

## AgentsEvents

These events mirror server messages from the ElevenLabs Agents WebSocket API. The `data` field contains the provider event payload.

<a id="-unknown" />

The unknown event.

Event constant: `AgentsEvents.Unknown`

**Payload**

| Field    | Type           | Req. | Description                                                                                                                                                                                    |
| -------- | -------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client` | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                                                                     |
| `data`   | `Object`       | ✗    | This event payload is provider-specific. See the [partner event documentation](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket) for the full payload shape. |

<a id="-httpresponse" />

The HTTP response event.

Event constant: `AgentsEvents.HTTPResponse`

**Payload**

| Field    | Type           | Req. | Description                                                                                                                                                                                    |
| -------- | -------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client` | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                                                                     |
| `data`   | `Object`       | ✗    | This event payload is provider-specific. See the [partner event documentation](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket) for the full payload shape. |

<a id="-conversationinitiationmetadata" />

Automatically sent when starting a conversation. Initializes conversation settings and parameters. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#conversation\_initiation\_metadata](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#conversation_initiation_metadata)

Event constant: `AgentsEvents.ConversationInitiationMetadata`

**Payload**

| Field                                         | Type                                              | Req. | Description                                                                                                                                        |
| --------------------------------------------- | ------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                                      | `AgentsClient`                                    | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                         |
| `data`                                        | `Object`                                          | ✗    | Initial connection metadata See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`                                   | <code>"conversation\_initiation\_metadata"</code> | ✓    | Provider-defined field.                                                                                                                            |
| `data.conversation_initiation_metadata_event` | `unknown`                                         | ✓    | Provider-defined field.                                                                                                                            |

Example `data`:

```json
{
  "type": "conversation_initiation_metadata"
}
```

<a id="-ping" />

Health check event requiring immediate response. Used to maintain WebSocket connection. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#ping](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#ping)

Event constant: `AgentsEvents.Ping`

**Payload**

| Field             | Type           | Req. | Description                                                                                                                                       |
| ----------------- | -------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`          | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                        |
| `data`            | `Object`       | ✗    | Keepalive ping from server See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`       | `"ping"`       | ✓    | Provider-defined field.                                                                                                                           |
| `data.ping_event` | `unknown`      | ✓    | Provider-defined field.                                                                                                                           |

Example `data`:

```json
{
  "type": "ping"
}
```

<a id="-usertranscript" />

Contains finalized speech-to-text results. Represents complete user utterances. Used for conversation history. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#user\_transcript](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#user_transcript)

Event constant: `AgentsEvents.UserTranscript`

**Payload**

| Field                           | Type                            | Req. | Description                                                                                                                                               |
| ------------------------------- | ------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                        | `AgentsClient`                  | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                                |
| `data`                          | `Object`                        | ✗    | Final transcription of user speech See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`                     | <code>"user\_transcript"</code> | ✓    | Provider-defined field.                                                                                                                                   |
| `data.user_transcription_event` | `unknown`                       | ✓    | Provider-defined field.                                                                                                                                   |

Example `data`:

```json
{
  "type": "user_transcript"
}
```

<a id="-agentresponse" />

Contains complete agent message. Sent with first audio chunk. Used for display and history. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent\_response](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent_response)

Event constant: `AgentsEvents.AgentResponse`

**Payload**

| Field                       | Type                           | Req. | Description                                                                                                                                  |
| --------------------------- | ------------------------------ | ---- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                    | `AgentsClient`                 | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                   |
| `data`                      | `Object`                       | ✗    | Agent's text response See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`                 | <code>"agent\_response"</code> | ✓    | Provider-defined field.                                                                                                                      |
| `data.agent_response_event` | `unknown`                      | ✓    | Provider-defined field.                                                                                                                      |

Example `data`:

```json
{
  "type": "agent_response"
}
```

<a id="-agentresponsecorrection" />

Contains truncated response after interruption. Updates displayed message. Maintains conversation accuracy. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent\_response\_correction](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent_response_correction)

Event constant: `AgentsEvents.AgentResponseCorrection`

**Payload**

| Field                                  | Type                                       | Req. | Description                                                                                                                                                  |
| -------------------------------------- | ------------------------------------------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `client`                               | `AgentsClient`                             | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                                   |
| `data`                                 | `Object`                                   | ✗    | Corrected response after interruption See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`                            | <code>"agent\_response\_correction"</code> | ✓    | Provider-defined field.                                                                                                                                      |
| `data.agent_response_correction_event` | `unknown`                                  | ✓    | Provider-defined field.                                                                                                                                      |

Example `data`:

```json
{
  "type": "agent_response_correction"
}
```

<a id="-interruption" />

Contains event id of interrupted event. [https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Interruption](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Interruption)

Event constant: `AgentsEvents.Interruption`

**Payload**

| Field                     | Type                        | Req. | Description                                                                                                                                          |
| ------------------------- | --------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                  | `AgentsClient`              | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                           |
| `data`                    | `Object`                    | ✗    | User interrupted agent speech See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`               | <code>"interruption"</code> | ✓    | Provider-defined field.                                                                                                                              |
| `data.interruption_event` | `unknown`                   | ✓    | Provider-defined field.                                                                                                                              |

Example `data`:

```json
{
  "type": "interruption"
}
```

<a id="-contextualupdate" />

Contains contextual information to be added to the conversation state. [https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Contextual-Update](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Contextual-Update)

Event constant: `AgentsEvents.ContextualUpdate`

**Payload**

| Field    | Type           | Req. | Description                                                                                |
| -------- | -------------- | ---- | ------------------------------------------------------------------------------------------ |
| `client` | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance. |
| `data`   | `Object`       | ✗    | The event's data.                                                                          |

<a id="-clienttoolcall" />

Represents a function call the agent wants the client to execute. Contains tool name, tool call ID, and parameters. Requires client-side execution of the function and sending the result back to the server. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#client\_tool\_call](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#client_tool_call)

Event constant: `AgentsEvents.ClientToolCall`

**Payload**

| Field                   | Type                              | Req. | Description                                                                                                                                       |
| ----------------------- | --------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                | `AgentsClient`                    | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                        |
| `data`                  | `Object`                          | ✗    | Tool for client to execute See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`             | <code>"client\_tool\_call"</code> | ✓    | Provider-defined field.                                                                                                                           |
| `data.client_tool_call` | `unknown`                         | ✓    | Provider-defined field.                                                                                                                           |

Example `data`:

```json
{
  "type": "client_tool_call"
}
```

<a id="-vadscore" />

Voice Activity Detection score event. Indicates the probability that the user is speaking. Values range from 0 to 1, where higher values indicate higher confidence of speech. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#vad\_score](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#vad_score)

Event constant: `AgentsEvents.VadScore`

**Payload**

| Field    | Type           | Req. | Description                                                                                |
| -------- | -------------- | ---- | ------------------------------------------------------------------------------------------ |
| `client` | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance. |
| `data`   | `Object`       | ✗    | The event's data.                                                                          |

<a id="-internaltentativeagentresponse" />

Contains preliminary text from the agent. [https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Internal-Tentative-Agent-Response](https://elevenlabs.io/docs/agents-platform/api-reference/agents-platform/websocket#receive.Internal-Tentative-Agent-Response)

Event constant: `AgentsEvents.InternalTentativeAgentResponse`

**Payload**

| Field                                          | Type                                                | Req. | Description                                                                                                                                                                   |
| ---------------------------------------------- | --------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                                       | `AgentsClient`                                      | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                                                    |
| `data`                                         | `Object`                                            | ✗    | Internal tentative agent response (not for public use) See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`                                    | <code>"internal\_tentative\_agent\_response"</code> | ✓    | Provider-defined field.                                                                                                                                                       |
| `data.tentative_agent_response_internal_event` | `unknown`                                           | ✓    | Provider-defined field.                                                                                                                                                       |

Example `data`:

```json
{
  "type": "internal_tentative_agent_response"
}
```

<a id="-websocketerror" />

The WebSocket error response event.

Event constant: `AgentsEvents.WebSocketError`

**Payload**

| Field    | Type           | Req. | Description                                                                                |
| -------- | -------------- | ---- | ------------------------------------------------------------------------------------------ |
| `client` | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance. |
| `data`   | `Object`       | ✗    | The event's data.                                                                          |

<a id="-connectorinformation" />

Contains information about connector.

Event constant: `AgentsEvents.ConnectorInformation`

**Payload**

| Field    | Type           | Req. | Description                                                                                |
| -------- | -------------- | ---- | ------------------------------------------------------------------------------------------ |
| `client` | `AgentsClient` | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance. |
| `data`   | `Object`       | ✗    | The event's data.                                                                          |

<a id="-agenttoolresponse" />

Indicates when the agent has executed a tool function. Contains tool metadata and execution status. Provides visibility into agent tool usage during conversations. [https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent\_tool\_response](https://elevenlabs.io/docs/agents-platform/customization/events/client-events#agent_tool_response)

Event constant: `AgentsEvents.AgentToolResponse`

**Payload**

| Field                      | Type                                 | Req. | Description                                                                                                                                           |
| -------------------------- | ------------------------------------ | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`                   | `AgentsClient`                       | ✓    | The [ElevenLabs.AgentsClient](/api-reference/voxengine/eleven-labs#agentsclient) instance.                                                            |
| `data`                     | `Object`                             | ✗    | Result of agent tool execution See the [partner event documentation](https://elevenlabs.io/docs/eleven-agents/api-reference/eleven-agents/websocket). |
| `data.type`                | <code>"agent\_tool\_response"</code> | ✓    | Provider-defined field.                                                                                                                               |
| `data.agent_tool_response` | `unknown`                            | ✓    | Provider-defined field.                                                                                                                               |

Example `data`:

```json
{
  "type": "agent_tool_response"
}
```