back to home

bolna-ai / bolna

Conversational voice AI agents

597 stars
253 forks
48 issues
PythonDockerfileShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing bolna-ai/bolna in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/bolna-ai/bolna)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

End-to-end open-source voice agents platform : Quickly build voice firsts conversational assistants through a json. Discord | Hosted Docs | Website > [!NOTE] > We are actively looking for maintainers. Introduction **Bolna** is the end-to-end open source production ready framework for quickly building LLM based voice driven conversational applications. Demo https://github.com/bolna-ai/bolna/assets/1313096/2237f64f-1c5b-4723-b7e7-d11466e9b226 What is this repository? This repository contains the entire orchestration platform to build voice AI applications. It technically orchestrates voice conversations using combination of different ASR+LLM+TTS providers and models over websockets. Components Bolna helps you create AI Voice Agents which can be instructed to do tasks beginning with: • Orchestration platform (this open source repository) • Hosted APIs (https://docs.bolna.ai/api-reference/introduction) built on top of this orchestration platform [currently closed source] • No-code UI playground at https://platform.bolna.ai/ using the hosted APIs + tailwind CSS [currently closed source] Development philosophy • Any integration, enhancement or feature initially lands on this open source package since it forms the backbone of our Hosted APIs and dashboard • Post that we expose APIs or make changes to existing APIs as required for the same • Thirdly, we push it to the UI dashboard Supported providers and models • Initiating a phone call using telephony providers like , , (coming soon), (coming soon) etc. • Transcribing the conversations using , etc. • Using LLMs like , , , , , etc to handle conversations • Synthesizing LLM responses back to telephony using , , , , , , etc. Refer to the docs for a deepdive into all supported providers. Local example setup [will be moved to a different repository] A basic local setup includes usage of Twilio or Plivo for telephony. We have dockerized the setup in . One will need to populate an environment file from . The setup consists of four containers: • Telephony web server: • Choosing Twilio: for initiating the calls one will need to set up a Twilio account • Choosing Plivo: for initiating the calls one will need to set up a Plivo account • Bolna server: for creating and handling agents • : for tunneling. One will need to add the to • : for persisting agents & prompt data Quick Start The easiest way to get started is to use the provided script: This script will check for Docker dependencies, build all services with BuildKit enabled, and start them in detached mode. Manual Setup Alternatively, you can manually build and run the services: • Make sure you have Docker with Docker Compose V2 installed • Enable BuildKit for faster builds: • Build the images: • Run the services: To run specific services only: Once the docker containers are up, you can now start to create your agents and instruct them to initiate calls. Example agents to create, use and start making calls You may try out different agents from example.bolna.dev. Programmatic usage (minimal example) You can also build and run an agent directly in Python without the local telephony setup. Example script: How to run: This demonstrates orchestration and streaming output. For telephony, use the services in . Note: For REST-based usage (Agent CRUD over HTTP), see in the repo root. Expected output shape: is an async generator yielding per-task result dicts (event-like chunks). The exact keys depend on configured tools/providers; treat it as a stream and process incrementally. Text-only pipeline example If you want a text-only flow (no transcriber/synthesizer), you can enable a text-only pipeline: Example script: How to run (text-only): Expected output shape: yields streaming dicts per task step; fields vary by configuration. Handle chunk-by-chunk. Using your own providers You can populate the file to use your own keys for providers. ASR Providers These are the current supported ASRs Providers: | Provider | Environment variable to be added in file | |--------------|-------------------------------------------------| | Deepgram | |   LLM Providers Bolna uses LiteLLM package to support multiple LLM integrations. These are the current supported LLM Provider Family: https://github.com/bolna-ai/bolna/blob/10fa26e5985d342eedb5a8985642f12f1cf92a4b/bolna/providers.py#L30-L47 For LiteLLM based LLMs, add either of the following to the file depending on your use-case: : API Key of the LLM : URL of the hosted LLM : API VERSION for LLMs like Azure For LLMs hosted via VLLM, add the following to the file: : URL of the hosted LLM using VLLM   TTS Providers These are the current supported TTS Providers: https://github.com/bolna-ai/bolna/blob/c8a0d1428793d4df29133119e354bc2f85a7ca76/bolna/providers.py#L7-L14 | Provider | Environment variable to be added in file | |------------|--------------------------------------------------| | AWS Polly | Accessed from system wide credentials via ~/.aws | | Elevenlabs | | | OpenAI | | | Deepgram | | | Cartesia | | | Smallest | |   Telephony Providers These are the current supported Telephony Providers: | Provider | Environment variable to be added in file | |----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Twilio | , , | | Plivo | , , | Open-source v/s Hosted APIs **We have in the past tried to maintain both the open source and the hosted solution (via APIs and a UI dashboard)**. We have fluctuated b/w maintaining this repository purely from a point of time crunch and not interest. Currently, we are continuing to maintain it for the community and improving the adoption of Voice AI. Though the repository is completely open source, you can connect with us if interested in managed hosted offerings or more customized solutions. Extending with other Telephony Providers In case you wish to exte…