AstroVoice-Agent is a real-time, agentic voice AI middleware that bridges ASR (Speech-to-Text) and TTS (Text-to-Speech) systems, while orchestrating intelligent conversations using LLMs and asynchronous pipelines.
It is designed for telephony-grade voice systems where responses must be fast, stateful, and structured.
User Speech
↓
ASR (Speech → Text)
↓
AstroVoice-Agent (LLM + LangGraph)
↓
Async Intelligence Pipeline (Astrology)
↓
Response
↓
TTS (Text → Speech)
- Agentic orchestration using LangGraph (stateful, conditional routing)
- Voice-first responses optimized for real-time conversations
- Structured data extraction (Name, DOB, TOB, POB)
- Async pipeline execution triggered only when required inputs are complete
- Strict prompt-governed reasoning (no hallucinated astrology)
- State management via Redis (conversation, session, extracted data, computed charts)
- Message-level control using
reply_idfor deletion
| Layer | Responsibility |
|---|---|
| API Layer | FastAPI endpoints, request handling |
| Agent Layer | LangGraph workflow, LLM execution |
| State Layer | Redis (sessions, memory, charts) |
| Pipeline Layer | Astrology computation + profile generation |
| LLM Layer | Azure OpenAI / OpenAI-compatible models |
astrovoice-agent/
│
├── config.py # Redis, API keys, constants
├── models.py # Pydantic models + TypedDict state
├── astro.py # Geocoding, Prokerala APIs, profile builder
├── graph.py # LangGraph nodes, routing, compiled graph
├── main.py # FastAPI app, endpoints, session handling
│
├── requirements.txt
└── README.md
┌────────────┐
│ LLM Call │
└─────┬──────┘
│
┌────────▼────────┐
│ Route Logic │
└─────┬─────┬────┘
│ │
│ ▼
│ Summarize → END
│
▼
Astro Pipeline (async)
│
▼
END
git clone https://github.com/ut2903/AstroVoice-Agent.git
cd AstroVoice-Agentpython -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtpython main.pyServer runs on:
http://localhost:5000
Request
{
"user_id": "123",
"name": "User",
"message": "Hello"
}Response
{
"Agent": "नमस्ते...",
"call_status": "ONGOING",
"language": "Hindi",
"summary": "",
"reply_id": "uuid"
}Request
{
"reply_id": "uuid"
}Behavior
- Deletes the AI response
- Deletes preceding user message (if applicable)
- Maintains conversation consistency
- Astrology interpretation is strictly based on pipeline-generated data
- No inference from DOB/TOB/POB without computed chart
- Responses are short and voice-friendly
- JSON output format is enforced for every turn
- Pipeline executes only once per user (cached in Redis)
- FastAPI
- LangGraph
- Azure OpenAI / OpenAI-compatible LLM
- Redis
- External APIs (Geocoding + Astrology)