Developing Autonomous Telephone Agents with Bland AI Bland AI is a platform for creating voice agents that conduct full-fledged two-way conversations according to a predetermined scenario. Unlike traditional IVR systems with a rigid menu tree, a Bland AI agent understands free speech, processes non-standard responses, and integrates with business systems via webhooks in real time. ### Bland AI Architecture and Capabilities The platform operates according to the following model: incoming/outgoing call → Speech-to-Text → LLM for response generation → Text-to-Speech → voiceover. The entire cycle takes 300-700ms, ensuring a natural conversational pace without noticeable pauses. Key components: - Pathways — a dialogue graph with conditional transitions (branching based on user responses) - Tools — calling external APIs directly during a call (checking order status, recording in CRM) - Knowledge Base — vector storage for answering questions about documents - Transfer — switching to a live operator when an escalation trigger
import requests
import json
class BlandAIAgent:
"""Управление агентами через Bland AI API"""
def __init__(self, api_key: str):
self.api_key = api_key
self.base_url = "https://api.bland.ai"
self.headers = {
"Authorization": api_key,
"Content-Type": "application/json"
}
def create_phone_call(self, phone_number: str,
task: str,
pathway_id: str = None,
voice: str = "maya",
max_duration: int = 12) -> dict:
"""
Инициирование исходящего звонка.
task: инструкция для агента (prompt)
pathway_id: ID предварительно настроенного графа диалога
"""
payload = {
"phone_number": phone_number,
"voice": voice,
"max_duration": max_duration,
"task": task,
"language": "ru",
"reduce_latency": True,
"interruption_threshold": 100, # ms, насколько ждём паузы
}
if pathway_id:
payload["pathway_id"] = pathway_id
response = requests.post(
f"{self.base_url}/v1/calls",
json=payload,
headers=self.headers
)
return response.json()
def create_pathway(self, name: str, nodes: list[dict],
edges: list[dict]) -> dict:
"""
Создание графа диалога (Pathway).
nodes: узлы разговора (вопросы, ответы, действия)
edges: переходы между узлами по условиям
"""
payload = {
"name": name,
"nodes": nodes,
"edges": edges
}
response = requests.post(
f"{self.base_url}/v1/pathway",
json=payload,
headers=self.headers
)
return response.json()
def analyze_call(self, call_id: str,
questions: list[dict]) -> dict:
"""
Post-call анализ: извлечение структурированных данных из разговора.
questions: [{"question": "...", "type": "boolean|text|date"}]
"""
payload = {"questions": questions}
response = requests.post(
f"{self.base_url}/v1/calls/{call_id}/analyze",
json=payload,
headers=self.headers
)
return response.json()
def get_call_transcript(self, call_id: str) -> dict:
"""Транскрипт и метаданные завершённого звонка"""
response = requests.get(
f"{self.base_url}/v1/calls/{call_id}",
headers=self.headers
)
return response.json()
```### Usage Scenarios **Outbound Sales and Lead Qualification.** An agent calls the lead database, asks qualifying questions using the BANT framework, and transfers hot leads to the CRM with filled-in fields. Lead-to-Qualified Lead conversion is comparable to a junior SDR with 10x the productivity. **Meeting and Appointment Confirmation.** Automatic calling the day before a meeting with the ability to reschedule via voice response. Reduces the no-show rate by 35-55%. **Post-Service Feedback Collection.** An NPS survey via phone provides a response rate of 40-60% versus 5-15% for email. The agent dives into low scores with follow-up questions. ### Metrics and Limitations | Parameter | Value | |----------|---------| | First Response Latency | 400-700ms |
| Russian language recognition | good (Whisper-based) | | Simultaneous calls | up to 1000+ (enterprise) | | Cost | ~$0.09/min | | CSAT vs. live agent | 75-85% | **Limitations:** Complex emotional conversations (complaints, conflicts) require escalation to a human. The agent does not recognize sarcasm and cultural nuances with the reliability of a live employee. For sensitive topics (healthcare, legal issues), additional restriction settings are required. The typical deployment period for a simple agent for confirming records is 1-2 weeks. A complex qualification agent with CRM integration and objection handling - 4-6 weeks.