01 Product & Integration Overview
01 Product & Integration Overview
1. What is AgentSDK?
AgentSDK is an enterprise-grade headless (UI-less) calling SDK for web-based agent applications. It provides telephony and event notifications for contact center scenarios:
- Built-in connection management, event model, heartbeat, and reconnection
- Supports both UMD (script tag) and ESM (npm package) integration
- Exposes a public contract in the form of Operations (Promises) + Events (
on/off/once)
If you only need a UI toolbar (plugin edition), it is typically provided by an upper-layer
AgentToolbarbuilt on top of AgentSDK. This documentation focuses on the API/SDK (headless) integration.
2. Integration Options
2.1 UMD (for direct page inclusion)
- Include the bundle via
<script> - The SDK is exposed on
window(global name is typicallywindow.AgentSDK)
2.2 ESM (for modern build systems)
- Install via npm/pnpm/yarn
- Import the SDK in your codebase
3. Prerequisites (must confirm)
- HTTPS: microphone permission generally requires HTTPS (especially for WebRTC softphone scenarios)
- Browser permissions: microphone access must be granted; ensure corporate/browser policies allow it
- Network connectivity:
baseURL(Agent Gateway endpoint) must be reachable - Credentials: valid
tenantId / agentNo / sessionKeyfor sign-in
4. High-Level Data Flow
AgentSDK communicates with backend services primarily over WebSocket:
- You initiate an operation:
sdk.method(params)→ backend processes → returns an operation response (Promise resolves) - Backend/SDK emits events:
sdk.on(EventType.X, handler)receives event notifications
Typical usage:
- Check the Promise first: definitive success/failure of the operation (recommended)
- Then handle events: drive UI updates and workflow orchestration (status changes, call milestones, etc.)
5. Reading Guide
- First-time integration:
02-Quick-Start→03-Core-Concepts-and-Lifecycle - Troubleshooting:
07-Error-Handling, then05-Events+08-State-Machine-stateAction - Type/TS work: treat
06-Typesas the source of truth
Updated 4 days ago