The Avaya Infinity™ Agent SDK is a JavaScript/TypeScript library that lets you embed contact-center agent capabilities of the Avaya Infinity™ platform into client application of your choice. It is the single entry point for everything an agent needs to do - sign in, manage status, handle customer interactions across channels, transfer and conference calls, and monitor and manage their team (for supervisors).
To install the Agent SDK, run the following command:
npm install @avaya/infinity-agent-sdk
Agent SDK exports a set of types and classes. Out of all the exports, the class AvayaInfinityAgentSdk is the origin point of the Agent SDK usage flow. It can be imported as follows:
import { AvayaInfinityAgentSdk } from "@avaya/infinity-agent-sdk";
Before initializing the SDK, gather the following from your Avaya Infinity™ account administrator:
For details on provisioning and how to obtain these values, refer to the Developer Portal overview.
The SDK capabilities are organized into the functional groups below. Each sub-item links to the relevant section of the detailed guides. Sub-items prefixed with (Elite) apply only to Elite (hybrid) deployments. For now, the Agent SDK supports voice interactions only.
This documentation assumes working familiarity with Avaya Infinity™ terminology (see the Avaya Infinity documentation) and with the voice domain. Get comfortable with both before working through the use cases.
The code samples in these guides are illustrative and focus on the SDK API being demonstrated. For brevity they omit production concerns - logging, input validation, error handling, and handler cleanup (unsubscribing). Integrators are responsible for adding these.
Handling failures: Every asynchronous SDK action returns a promise that rejects with an AvayaInfinityAgentSdkError when the operation fails. Always handle the rejection - either await the action inside a try/catch, or attach a .catch() handler:
try {
await interaction.accept();
} catch (err) {
// err is an AvayaInfinityAgentSdkError - inspect err.code to decide how to react
showError(err);
}
// Without await, use the .catch() pattern instead:
interaction.reject().catch((err) => showError(err));