Skip to content

sreeteja2006/AstroAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstroAgent - Aradhana

Aradhana is an agentic AI astrologer built as a spiritual companion. It computes real birth charts using an ephemeris, fetches daily transits, and answers astrological questions with a warm, caring persona.

Architecture

  • Backend: FastAPI with LangGraph.
    • Stateful Graph: Manages messages, birth data, and conversation intent.
    • Agent: Uses gemma-4-26b-a4b-it (optimized for performance/quota) for reasoning and tool calling.
    • Tools:
      • compute_birth_chart: Accurate planetary math using kerykeion.
      • get_daily_transits: Relates current planet positions to natal chart.
      • geocode_place: Converts locations to lat/lng/timezone for accurate math.
      • knowledge_lookup: RAG-based lookup of astrological reference notes.
  • Frontend: React + TypeScript (Vite).
    • Streaming responses (token-by-token).
    • Real-time tool activity indicators.
    • Validated birth data collection.

Agent Flow

graph TD
    START((START)) --> Router[Router Node]
    Router --> Chatbot[Chatbot Node]
    Chatbot -- "Tool Call" --> Tools[Tool Node]
    Tools -- "Observation" --> Chatbot
    Chatbot -- "Final Response" --> END((END))
    
    subgraph "State Management"
        A[messages]
        B[birth_data]
        C[intent]
    end
Loading

Setup

Backend

  1. Create virtual env: python -m venv astro-env
  2. Activate: source astro-env/bin/activate
  3. Install deps: pip install -r backend/requirements.txt (or ensure langgraph, fastapi, langchain-google-genai, kerykeion, geopy, timezonefinder are installed)
  4. Set .env: Create backend/.env with GOOGLE_API_KEY.
  5. Run: cd backend && python main.py

Frontend

  1. cd frontend
  2. npm install
  3. npm run dev

Evaluation

Run the scorecard harness:

export PYTHONPATH=$PYTHONPATH:$(pwd)/backend
source astro-env/bin/activate
python evaluation/run_eval.py

Known Limitations

  • Knowledge base is currently limited to core concepts.
  • gemma model was used to bypass gemini-1.5-flash quota issues during development.
  • Geocoding uses Nominatim (OpenStreetMap) which may have rate limits for heavy use.

About

A langgraph based chatbot which can tell the transits of a person by their birith date detail

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages