Bolna
Bolna is an open-source, production-ready framework for building LLM-based voice conversational agents. It orchestrates voice conversations over websockets using pluggable ASR, LLM, and TTS providers, and supports telephony integration via Twilio or Plivo. It is for developers who want to quickly create voice-first assistants defined by JSON or Python code.
✨ Key features
- End-to-end voice agent orchestration platform
- Pluggable ASR, LLM, and TTS providers
- Telephony integration with Twilio and Plivo
- Streaming conversation pipeline
- Text-only pipeline option
- Dockerized local setup for quick start
🎯 Use cases
- Build voice assistants for phone calls
- Create conversational AI agents with custom LLM logic
- Prototype voice agents locally with Docker
- Integrate with telephony providers for inbound/outbound calls
📦 Installation
🧰 Requirements: Requires Python, Docker (for local setup), and API keys for chosen providers (e.g., OpenAI, Deepgram, ElevenLabs, Twilio/Plivo).
cd local_setup
chmod +x start.sh
./start.sh
Alternatively, manually:
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
docker compose build
docker compose up -d
🚀 Usage
import asyncio
from bolna.assistant import Assistant
from bolna.models import Transcriber, Synthesizer, ElevenLabsConfig, LlmAgent, SimpleLlmAgent
async def main():
assistant = Assistant(name="demo_agent")
transcriber = Transcriber(provider="deepgram", model="nova-2", stream=True, language="en")
llm_agent = LlmAgent(
agent_type="simple_llm_agent",
agent_flow_type="streaming",
llm_config=SimpleLlmAgent(provider="openai", model="gpt-4o-mini", temperature=0.3),
)
synthesizer = Synthesizer(
provider="elevenlabs",
provider_config=ElevenLabsConfig(voice="George", voice_id="JBFqnCBsd6RMkjVDRZzb", model="eleven_turbo_v2_5"),
stream=True,
audio_format="wav",
)
assistant.add_task(
task_type="conversation",
llm_agent=llm_agent,
transcriber=transcriber,
synthesizer=synthesizer,
enable_textual_input=False,
)
async for chunk in assistant.execute():
print(chunk)
if __name__ == "__main__":
asyncio.run(main())
Run with:
export OPENAI_API_KEY=...
export DEEPGRAM_AUTH_TOKEN=...
export ELEVENLABS_API_KEY=...
python examples/simple_assi
⚠️ Good to know
The repository is actively looking for maintainers; hosted APIs and UI are closed source, and some telephony providers (Exotel, Vonage) are coming soon.
❓ FAQ
What providers are supported for ASR, LLM, and TTS?
ASR: Deepgram, Azure. LLM: OpenAI, DeepSeek, Llama, Cohere, Mistral, etc. via LiteLLM. TTS: AWS Polly, ElevenLabs, Deepgram, OpenAI, Azure, Cartesia, Smallest, Maya, Kalpa.
How do I run Bolna locally?
Use the provided script ./start.sh in local_setup/ or manually with docker compose up -d. You need Docker and to set up environment variables in .env.
Can I use Bolna without telephony?
Yes, you can run a text-only pipeline by setting enable_textual_input=True and omitting transcriber/synthesizer, as shown in examples/text_only_assistant.py.
How do I add a new telephony provider?
Ensure bi-directional streaming support, then add input/output handler files extending the telephony classes, and write a dedicated server like the Twilio example.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.