A conversational AI astrologer that combines local RAG with voice and vision. It delivers Vedic astrology and palmistry guidance grounded in authoritative books. Built on Vision Agents.
| What | How |
|---|---|
| Birth charts | Local calculation (ephem) + RAG from Vedic astrology textbook |
| Palm reading | Show your palm on camera → Gemini sees it + RAG from Palmistry for All |
| Voice | Gemini Realtime (or Deepgram + ElevenLabs in RAG mode) |
| Knowledge | Local FAISS + sentence-transformers — no cloud indexing |
| Keys needed | GOOGLE_API_KEY + Stream keys. No NVIDIA key for palm reading. |
Agent RAG — The AI uses a local knowledge base to ground answers in real astrology and palmistry content. Indexing and search run on your machine.
Local AI Astrology — Birth chart calculations use ephem (local). RAG uses FAISS + sentence-transformers (local). Knowledge comes from PDF books you add to knowledge/ (see below).
Voice + Vision — Real-time speech and video. When you show your palm on camera, the agent can analyze it using palmistry knowledge from the RAG.
Agent RAG (local) → astro_calc, rag_faiss, buffered_analysis
Voice agent → agent.py (Gemini Realtime) or agent_rag.py (Deepgram + ElevenLabs)
Vision agent → agent.py sees video — palm reading when you show your palm
Main agent (agent.py): Gemini Realtime handles both voice and vision. Palm reading works with GOOGLE_API_KEY only — no NVIDIA key needed.
- Birth chart analysis — Nakshatra, moon/sun rashi, Vimshottari dasha
- Compatibility — Kundli matching for two people
- Palm reading — Show your palm on camera; agent analyzes lines, mounts, shapes
- Remedies, dashas, transits — RAG-grounded answers
- Buffered speech — Full analysis prepared before speaking (reduces stuttering)
- Plain language — Sanskrit terms explained (Tula → Libra, etc.)
The agent uses two reference books. These are not in the repo and must never be committed.
| Book | Purpose |
|---|---|
| Vedic Astrology: An Integrated Approach | Birth charts, nakshatras, dashas, remedies, transits |
| Palmistry for All | Palm lines, mounts, hand shapes |
Setup:
- Obtain the books (PDFs).
- Place them in the
knowledge/folder. - Run
python setup_rag.pyto build the index.
The knowledge/ folder and all PDFs in it are in .gitignore — they will never be committed.
cd "Personal Astrologer"
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txtcp .env.example .envEdit .env with your keys. Never commit .env — it is gitignored.
| Variable | For | Required |
|---|---|---|
STREAM_API_KEY |
Video/voice transport | Yes |
STREAM_API_SECRET |
Stream | Yes |
GOOGLE_API_KEY |
agent.py, agent_rag.py | Yes |
DEEPGRAM_API_KEY |
agent_rag.py only | Optional |
ELEVENLABS_API_KEY |
agent_rag.py only | Optional |
# After placing PDFs in knowledge/
python setup_rag.pypython agent.py runUses Gemini Realtime for voice and video. Palm reading works when you show your palm on camera. Needs GOOGLE_API_KEY only.
python agent_rag.py runRequires DEEPGRAM_API_KEY and ELEVENLABS_API_KEY.
python test_astrology.pyVerifies calculations and RAG. No video/voice.
- Join a call with video on.
- Show your palm to the camera.
- The agent sees it via Gemini Realtime and uses palmistry knowledge from the RAG.
Keys: GOOGLE_API_KEY (Gemini). No NVIDIA key needed for the main agent.
Personal Astrologer/
├── agent.py # Main: Gemini Realtime + RAG (voice + vision)
├── agent_rag.py # Deepgram + Gemini + ElevenLabs + RAG
├── astro_calc.py # Birth chart calculations
├── rag_faiss.py # Local FAISS RAG
├── buffered_analysis.py # Buffered birth chart flow
├── setup_rag.py # Build RAG from PDFs in knowledge/
├── test_astrology.py # Tests without Stream
├── requirements.txt
├── .env.example # Template (no real keys)
└── knowledge/ # Add PDFs here — gitignored, never committed
| Item | Status |
|---|---|
.env |
Gitignored — API keys stay local |
knowledge/ |
Gitignored — PDF books and extracted text never committed |
*.pdf in knowledge |
Gitignored — explicit backup |
faiss_index.bin, faiss_docstore.pkl |
Gitignored — regenerate with setup_rag.py |
Proprietary — All Rights Reserved
This software is the exclusive property of the copyright holder. Unauthorized copying, modification, distribution, or use is strictly prohibited. See LICENSE for full terms.