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

# Agent

## Constructor

```ts
new Agent(agentId: string, region?: string)
```

**Parameters**

```ts
new Agent(agentId: string, region?: string)
```

**Parameters**

## Methods

### addEventListener

Adds a handler for the specified [CCAI.Events.Agent](/api-reference/voxengine/ccai/events/agent) 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.Agent | T, callback: (event: CCAI.Events._AgentEvents[T]) => any): void
```

**Parameters**

### destroy

Destroys a CCAI Agent instance.

```ts
destroy(): void
```

### getConversationProfile

Gets the Dialogflow conversation profile.

```ts
getConversationProfile(request: Object): Promise<GetConversationProfileResult>
```

**Parameters**

### getProfilesList

Gets the list of a Dialogflow conversation profiles.

```ts
getProfilesList(): Promise<GetProfilesListResult>
```

### id

Returns the CCAI Agent id.

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

### removeEventListener

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

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

**Parameters**

### updateConversationProfile

Updates the Dialogflow conversation profile.

```ts
updateConversationProfile(request: Object): Promise<UpdateConversationProfileResult>
```

**Parameters**