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.
- Host: GitHub
- URL: https://github.com/cogniolab/nio-voice-agent-sdk
- Owner: cogniolab
- License: other
- Created: 2025-10-16T06:16:51.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-16T18:39:04.000Z (8 months ago)
- Last Synced: 2025-10-17T17:54:25.627Z (8 months ago)
- Topics: agpl, ai-agent, anthropic, claude, deepgram, llm, openai, sdk, self-hosted, speech-to-text, text-to-speech, typescript, voice-agent, voice-ai
- Language: TypeScript
- Size: 24.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Nio Voice Agent SDK
**Open-source voice agent platform - Self-hosted alternative to enterprise voice AI solutions**
[](https://www.gnu.org/licenses/agpl-3.0)
[](https://www.typescriptlang.org/)
[](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*