> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # Agent ## Constructor ```ts new Agent(agentId: string, region?: string) ``` **Parameters** **`agentId`** `string` — required --- **`region`** `string` --- ```ts new Agent(agentId: string, region?: string) ``` **Parameters** **`agentId`** `string` — required --- **`region`** `string` --- ## 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** **`event`** `CCAI.Events.Agent | T` — required --- **`callback`** `(event: CCAI.Events._AgentEvents[T]) => any` — required --- ### destroy Destroys a CCAI Agent instance. ```ts destroy(): void ``` ### getConversationProfile Gets the Dialogflow conversation profile. ```ts getConversationProfile(request: Object): Promise ``` **Parameters** **`request`** `Object` — required --- ### getProfilesList Gets the list of a Dialogflow conversation profiles. ```ts getProfilesList(): Promise ``` ### 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** **`event`** `CCAI.Events.Agent | T` — required --- **`callback`** `(event: CCAI.Events._AgentEvents[T]) => any` --- ### updateConversationProfile Updates the Dialogflow conversation profile. ```ts updateConversationProfile(request: Object): Promise ``` **Parameters** **`request`** `Object` — required --- > Represents a CCAI Agent instance.