An open API service indexing awesome lists of open source software.

https://github.com/cogniolab/nio-voice-agent-sdk

Open-source voice agent platform - Self-hosted alternative to enterprise voice AI. AGPL-3.0 licensed.
https://github.com/cogniolab/nio-voice-agent-sdk

agpl ai-agent anthropic claude deepgram llm openai sdk self-hosted speech-to-text text-to-speech typescript voice-agent voice-ai

Last synced: 11 days ago
JSON representation

Open-source voice agent platform - Self-hosted alternative to enterprise voice AI. AGPL-3.0 licensed.

Awesome Lists containing this project

README

          

# Nio Voice Agent SDK

**Open-source voice agent platform - Self-hosted alternative to enterprise voice AI solutions**

[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
[![Node.js](https://img.shields.io/badge/Node.js-18+-green)](https://nodejs.org/)

## ๐ŸŽฏ Why Nio Voice Agent SDK?

Building production voice agents shouldn't require months of integration work and enterprise budgets. Nio Voice Agent SDK provides:

- **๐Ÿš€ Deploy in minutes, not months** - Pre-built integrations with leading LLM and voice providers
- **๐Ÿ’ฐ Self-hosted or managed** - Run on your infrastructure or use Nio Voice Cloud
- **๐Ÿ”Œ MCP-native** - Built-in support for Model Context Protocol
- **๐Ÿงช Testing-first** - Human-in-the-loop testing framework included
- **๐Ÿ“ฆ Production-ready** - Session management, streaming, error handling built-in

## ๐Ÿ—๏ธ Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Nio Voice Agent SDK โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Voice SDK โ”‚ โ”‚ MCP โ”‚ โ”‚ Testing โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ Framework โ”‚ โ”‚ Framework โ”‚ โ”‚
โ”‚ โ”‚ โ€ข Providers โ”‚ โ”‚ โ€ข Adapters โ”‚ โ”‚ โ€ข HITL โ”‚ โ”‚
โ”‚ โ”‚ โ€ข Streaming โ”‚ โ”‚ โ€ข Connectors โ”‚ โ”‚ โ€ข Scenarios โ”‚ โ”‚
โ”‚ โ”‚ โ€ข Session โ”‚ โ”‚ โ€ข Testing โ”‚ โ”‚ โ€ข Assertions โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Embeddable Voice Widget โ”‚ โ”‚
โ”‚ โ”‚ React + Vanilla JS โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ†“ โ†“ โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Deepgram โ”‚ โ”‚ Claude AI โ”‚ โ”‚ Your Business โ”‚
โ”‚ OpenAI STT โ”‚ โ”‚ OpenAI GPT โ”‚ โ”‚ Logic (MCP) โ”‚
โ”‚ ElevenLabs โ”‚ โ”‚ Groq โ”‚ โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

## ๐Ÿ“ฆ Packages

### Core Packages

- **[@nio-voice/sdk](./packages/voice-sdk)** - Core voice agent SDK with provider integrations
- **[@nio-voice/mcp-framework](./packages/mcp-framework)** - Model Context Protocol framework for integrations
- **[@nio-voice/testing](./packages/testing-framework)** - Human-in-the-loop testing framework
- **[@nio-voice/widget](./packages/widget)** - Embeddable voice widget for websites

## ๐Ÿš€ Quick Start

### Installation

```bash
npm install @nio-voice/sdk @nio-voice/mcp-framework
```

### Basic Voice Agent

```typescript
import { VoiceAgent, DeepgramProvider, ClaudeProvider } from '@nio-voice/sdk';

const agent = new VoiceAgent({
speech: new DeepgramProvider({
apiKey: process.env.DEEPGRAM_API_KEY
}),
llm: new ClaudeProvider({
apiKey: process.env.ANTHROPIC_API_KEY,
model: 'claude-3-5-sonnet-20241022'
}),
systemPrompt: 'You are a helpful customer service agent.'
});

// Start voice session
await agent.startSession({
onTranscript: (text) => console.log('User said:', text),
onResponse: (text) => console.log('Agent said:', text),
onEnd: () => console.log('Session ended')
});
```

### With MCP Integration

```typescript
import { VoiceAgent } from '@nio-voice/sdk';
import { MCPAdapter } from '@nio-voice/mcp-framework';

const agent = new VoiceAgent({
// ... voice config
mcp: new MCPAdapter({
serverUrl: 'http://localhost:3000/mcp',
tools: ['book_appointment', 'check_availability']
})
});

// Agent can now call your business functions via MCP
```

### Add to Your Website

```html

NioVoice.init({
apiKey: 'your-api-key',
agentId: 'your-agent-id',
position: 'bottom-right'
});

```

## ๐ŸŽจ Examples

Check out the [examples](./examples) directory for complete working examples:

- **[Basic Agent](./examples/basic-agent)** - Simple customer service agent
- **[Appointment Booking](./examples/appointment-booking)** - Full booking workflow with MCP
- **[Customer Support](./examples/customer-support)** - Multi-turn support conversations

## ๐Ÿ“š Documentation

- [Getting Started Guide](./docs/guides/getting-started.md)
- [Voice SDK API Reference](./docs/api/voice-sdk.md)
- [MCP Framework Guide](./docs/api/mcp-framework.md)
- [Testing Framework Guide](./docs/api/testing-framework.md)
- [Widget Integration Guide](./docs/guides/widget-integration.md)

## ๐Ÿค Contributing

We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.

## ๐Ÿ“œ License

This project is licensed under **AGPL-3.0** - see the [LICENSE](./LICENSE) file for details.

### What does AGPL-3.0 mean?

- โœ… **Free to use** for personal and commercial projects
- โœ… **Modify and distribute** your changes
- โš ๏ธ **Network use = distribution** - If you offer this as a service over a network, you must share your source code
- ๐Ÿ’ผ **Commercial license available** - Contact dev@cogniolab.com for closed-source licensing

### Why AGPL?

We chose AGPL-3.0 to ensure that improvements to voice AI technology remain open and accessible to everyone. If you build a hosted service using this code, your users deserve the same freedoms.

**Need a proprietary license?** Contact dev@cogniolab.com

## ๐ŸŒŸ Nio Voice Cloud

Don't want to self-host? Use [Nio Voice Cloud](https://nioai.us/) for:

- ๐ŸŽฏ **Auto-discovery** - Paste your website URL, get a voice agent instantly
- ๐Ÿญ **Industry templates** - Pre-built for healthcare, HVAC, retail, etc.
- ๐Ÿ“Š **Analytics dashboard** - Conversation insights and call analytics
- ๐Ÿ”ง **Managed infrastructure** - No servers to manage
- ๐Ÿ’ฌ **Priority support** - Direct access to the Nio team

**Pricing**: $299-$2999/month (vs $100K+ for enterprise alternatives)

## ๐Ÿ†š Comparison

| Feature | Nio Voice SDK (Open Source) | Retell AI / Vapi | Enterprise (Poly.ai) |
|---------|---------------------------|-----------------|---------------------|
| **Setup Time** | Minutes | Hours | Months |
| **Cost** | Free (self-hosted) | Usage-based ($$) | $100K+ |
| **Flexibility** | Full control | API limits | Consultative |
| **Lock-in** | None | Vendor lock-in | Contract lock-in |
| **Hosting** | Your infrastructure | Their cloud | Their cloud |
| **Source Code** | Available (AGPL) | Closed | Closed |

## ๐ŸŽฏ Roadmap

- [x] Core voice SDK with Deepgram/OpenAI
- [x] Claude and GPT integration
- [x] MCP framework
- [x] Testing framework
- [x] Embeddable widget
- [ ] Phone system integration (Twilio/Bandwidth)
- [ ] Advanced voice customization
- [ ] Multi-language support
- [ ] Real-time translation
- [ ] Voice analytics SDK

## ๐Ÿ’ฌ Community

Join our community to ask questions, share ideas, and connect with other developers building voice-enabled AI agents!

- **[GitHub Discussions](https://github.com/cogniolab/nio-voice-agent-sdk/discussions)** - Ask questions, share your work, and discuss best practices
- **Email**: dev@cogniolab.com
- **Enterprise Support**: Available with commercial license

We're building a supportive community where developers help each other create amazing voice AI experiences. Whether you're just getting started or building production systems, your questions and contributions are welcome!

---

**Built with โค๏ธ by [Cognio Lab](https://cogniolab.com)**

*Making voice AI accessible to everyone*