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

# Conversation

## Constructor

```ts
new Conversation(settings: CCAI.ConversationSettings)
```

**Parameters**

**`settings`** `CCAI.ConversationSettings` — required

---

```ts
new Conversation(settings: CCAI.ConversationSettings)
```

**Parameters**

**`settings`** `CCAI.ConversationSettings` — required

---

## Methods

### addEventListener

Adds a handler for the specified [CCAI.Events.Conversation](/api-reference/voxengine/ccai/events/conversation) event. Use only functions as handlers; anything except a function leads to an error and scenario termination when a handler is called.

```ts
addEventListener(event: CCAI.Events.Conversation | T, callback: (event: CCAI.Events._ConversationEvents[T]) => any): void
```

**Parameters**

**`event`** `CCAI.Events.Conversation | T` — required

---

**`callback`** `(event: CCAI.Events._ConversationEvents[T]) => any` — required

---

### addParticipant

Adds a participant to the conversation.

```ts
addParticipant(settings: CCAI.ParticipantSettings): CCAI.Participant
```

**Parameters**

**`settings`** `CCAI.ParticipantSettings` — required

---

### removeEventListener

Removes a handler for the specified [CCAI.Events.Conversation](/api-reference/voxengine/ccai/events/conversation) event.

```ts
removeEventListener(event: CCAI.Events.Conversation | T, callback?: (event: CCAI.Events._ConversationEvents[T]) => any): void
```

**Parameters**

**`event`** `CCAI.Events.Conversation | T` — required

---

**`callback`** `(event: CCAI.Events._ConversationEvents[T]) => any`

---

### removeParticipant

Removes a participant from the conversation.

```ts
removeParticipant(participant: CCAI.Participant): void
```

**Parameters**

**`participant`** `CCAI.Participant` — required

---