# Embed voice AI into any web application.

> Add real-time conversational AI to your website or product with just a few lines of code. Build voice experiences that feel native to your application.

Source: https://tryhamsa.com/voice-agents-sdk/

Developers · Web SDK

Add real-time conversational AI to your website or product with a few lines of code: voice experiences that feel native to your application, without building the infrastructure from scratch.

[`npm i @hamsa-ai/voice-agents-sdk`npm](https://www.npmjs.com/package/@hamsa-ai/voice-agents-sdk)

[Start building](https://agents.tryhamsa.com/)[View documentation](https://docs.tryhamsa.com/developers/sdks/voice-agents-web-sdk)

yoursite.com

Your site, with an agent in it

Why build with the SDK

## Everything you need to launch voice experiences.

✓

### Fast integration

Embed a fully functional AI voice agent in minutes with a simple JavaScript or npm package.

✓

### Real-time conversations

Low-latency voice interactions that feel natural and responsive, streaming both ways.

✓

### Browser-native

Conversations run directly inside your website. No external applications, no plugins.

✓

### Enterprise ready

Built for scalable production deployments with security, monitoring, and reliability in mind.

Beyond talking

## Agents that use your interface.

SDK agents don't just converse. They act inside your product:

-   ✓Interact with your application’s interface
-   ✓Trigger JavaScript functions
-   ✓Navigate users through workflows
-   ✓Access knowledge bases
-   ✓Connect to APIs and business systems
-   ✓Execute Web Tools for browser-based actions

```
import { HamsaVoiceAgent } from '@hamsa-ai/voice-agents-sdk';

const agent = new HamsaVoiceAgent({ publicKey });

agent.on('transcriptionReceived', (t) => render(t));
agent.on('answerReceived', (a) => render(a));

await agent.start({ agentId, voiceEnablement: true });
```

```
import { HamsaVoiceAgent } from '@hamsa-ai/voice-agents-sdk';

const agent = new HamsaVoiceAgent({ publicKey });

// your markup, your bubbles
agent.on('chatMessageReceived', (m) => renderBubble(m.role, m.text));

await agent.start({ agentId, isChatOnly: true });
```

Voice or chat

### The same agent, in your own interface.

One flag turns a voice session into a chat one. There is no chat widget to adopt and no second SDK to learn: you build the interface, and the SDK hands you the messages to put in it.

-   ✓Your markup, your styling, your placement
-   ✓Same agent, same knowledge, same tools
-   ✓Switch modes without a second integration

Build any voice experience

## One SDK, unlimited use cases.

### Customer support

Answer questions, resolve issues, and guide customers through your website.

### Sales assistant

Qualify leads, recommend products, and assist customers through the buying journey.

### Booking & reservations

Help users schedule appointments, make reservations, or update existing bookings.

### Internal assistants

Support employees with HR, IT, knowledge bases, and internal workflows.

### Government services

Guide citizens through digital services, applications, and public information.

### Healthcare

Assist patients with appointments, navigation, and service inquiries.

01

Install the SDK

02

Connect your agent

03

Customize the experience

04

Deploy to production

05

Monitor & improve
