# Repository Briefing: bolna-ai/bolna
> Source: https://repoforai.com/repo/bolna-ai/bolna (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/bolna-ai/bolna
- **Official Docs / Website**: https://www.bolna.ai
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (96/100 · Maintenance 35/35 · Adoption 21/25 · Releases 20/20 · License 20/20)
- **Latest Release**: 0.11.74 (2026-12-03) — https://github.com/bolna-ai/bolna/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, API
- **Momentum**: 840 ★ total (+1 24h / +8 7d) · 415 forks
- **Topics**: `agentic-ai`, `agents`, `ai-agents`, `cartesia`, `conversational-ai`, `deepgram`, `deepseek`, `deepseek-chat`, `elevenlabs`, `function-calling`, `gpt-4`, `llama`
- **When to Use**: Best for: Python teams building phone-based booking, routing, or support flows that need independent choices for telephony, recognition, language models, and synthesis. Skip if: You need an included no-code dashboard, an offline phone stack, or managed operations; for one fixed provider stack, consider direct SDK integration first.

## Overview
```text
### Architecture & Core Mechanics
Bolna is a Python orchestration framework, not a bundled speech or language model. The bolna.assistant.Assistant API composes a conversation task from a transcriber, an LLM agent, and a synthesizer. For a phone session, carrier audio arrives over a bidirectional WebSocket, ASR produces text, the LLM drives the conversation, and TTS produces audio for the return stream. Assistant.execute() exposes task results as an async generator of dictionaries, not a fixed event schema.

The manifest includes FastAPI, Uvicorn, Pydantic, websockets, LiteLLM, and Redis. Telephony adapters are split between bolna/input_handlers/telephony_providers and bolna/output_handlers/telephony_providers: one side ingests provider events, while the other formats synthesized audio for the carrier and streams it back. Adding a carrier also entails a call-initiation server like the Twilio example in local_setup/telephony_server; a carrier with no bidirectional streaming interface does not fit that adapter pattern.

### Key Capabilities & Differentiators
Twilio and Plivo are the concrete telephony examples; Exotel and Vonage are listed as forthcoming, not available integrations. The speech path can combine Deepgram streaming ASR, an OpenAI gpt-4o-mini conversational agent, and ElevenLabs eleven_turbo_v2_5 with WAV output. WAV is the synthesizer setting in that example, not a universal carrier format. Other listed adapters include Azure for speech recognition and AWS Polly, Cartesia, and OpenAI for synthesis.

LiteLLM broadens model choice to families such as DeepSeek, Llama, Cohere, and Mistral, and a configured vLLM server can supply a separately hosted model. The transcription adapter can target a self-hosted endpoint that speaks the OpenAI Realtime transcription protocol; custom synthesis targets an OpenAI speech-compatible endpoint. Setting enable_textual_input=True and omitting both speech stages gives a text-only path for testing conversation logic independently of audio and telephony.

### Trade-offs & Limitations
Bolna is a better fit than direct provider SDKs when a team expects to swap or compare ASR, LLM, and TTS independently. If the stack will remain fixed, direct integration removes an abstraction layer and makes it easier to reason about one set of provider events. In Bolna, configuration-dependent output and carrier-specific media handling mean a provider swap should be validated end to end for turn latency, language handling, and audio compatibility rather than treated as a drop-in change.

Compared with a managed voice platform, Bolna gives you MIT-licensed orchestration code but leaves credentials, carrier connectivity, and uptime in your hands. The separate hosted APIs and no-code dashboard are closed source. The ngrok-based example is a starting point for integration, not a production ingress plan; decide how to authenticate exposed endpoints, observe call failures, and handle audio and transcript retention before launch.

### Hardware & Deployment Guide
For SDK evaluation, use Python 3.10 or newer and start with examples/text_only_assistant.py or examples/simple_assistant.py, setting credentials for the selected providers. API.md covers REST agent CRUD. For a phone test, configure .env from .env.sample, supply a Twilio or Plivo account and an ngrok token, and launch local_setup/start.sh or run Docker Compose V2 from local_setup/. The stack consists of Bolna, a telephony web service, ngrok, and Redis for agent and prompt persistence.

Self-hosting the stack does not make it offline: the example calls depend on carrier connectivity, and cloud ASR, LLM, and TTS require network access and credentials. Provider-backed examples do not require a local GPU; size the orchestration service for concurrent streams and audio work, and size any self-hosted model servers separately. Releases 0.11.72–0.11.74 added optional strict Soniox language hints, improved the missing ElevenLabs voice error, and fixed tool calls being dropped after a language switch.
```

## Key Capabilities
```text
- Streaming contract: Assistant.execute() yields configuration-dependent result dictionaries through an async generator.
- Pipeline composition: Configure ASR, LLM, and TTS separately; text-only tasks omit both speech stages.
- Telephony boundary: Twilio and Plivo examples pair provider-specific media handlers with dedicated call-initiation services.
- Backend options: LiteLLM provider routing, a vLLM base URL, and custom transcription and synthesis endpoints.
- Self-hosted footprint: Docker Compose runs the Bolna server, telephony service, ngrok tunnel, and Redis for agent and prompt data.
- Release focus: 0.11.74 preserves tool calls across language switches; 0.11.73 surfaces missing ElevenLabs voices as errors.
```

## Quick Start / Clone
```bash
docker compose build
```
