Skip to content

rityagodala/aiagent

Repository files navigation

AI Agent - Email & Voice Call Assistant

An intelligent AI agent that can send emails and make phone calls using natural language. Built with LlamaIndex and GPT-4o-mini.

✨ Features

  • 📧 Send Emails - Send emails via Gmail integration (Arcade)
  • 📞 Make Phone Calls - Place voice calls with custom scripts (Vapi)
  • 🤖 AI-Powered - Uses GPT-4o-mini for intelligent task planning
  • 🔗 REST API - FastAPI server for easy integration
  • 🐳 Docker Ready - Containerized deployment included

🚀 Quick Start

1. Install Dependencies

pip install -r requirements.txt
pip install fastapi uvicorn  # For API server

2. Set Up API Keys

Create a .env file with your API keys:

python3 setup_keys.py

Or manually create .env:

OPENAI_API_KEY=your_openai_key
ARCADE_API_KEY=your_arcade_key
VAPI_API_KEY=your_vapi_key

3. Run the Agent

Option A: Direct Usage

python3 agent.py

Option B: API Server (Recommended)

python3 api_server.py

Then visit: http://localhost:8000/docs

Option C: Interactive Python

from agent import chat
chat("Send an email to test@example.com with subject 'Hello'")

📡 API Usage

Start the server:

python3 api_server.py

Send a request:

curl -X POST "http://localhost:8000/chat" \
  -H "Content-Type: application/json" \
  -d '{"message": "Send an email to test@example.com"}'

🧪 Testing

# Quick test
python3 test_agent.py

# Full test suite
python3 test_suite.py

📁 Project Structure

aiagent/
├── agent.py              # Main agent (core logic)
├── api_server.py         # FastAPI REST API
├── test_agent.py         # Quick test script
├── test_suite.py         # Comprehensive tests
├── setup_keys.py         # Interactive API key setup
├── requirements.txt      # Dependencies
├── Dockerfile            # Docker config
└── docker-compose.yml    # Docker Compose setup

🐳 Docker Deployment

docker-compose up -d

📚 Documentation

🔑 Getting API Keys

  1. OpenAI: https://platform.openai.com/api-keys
  2. Arcade: https://arcade.chat (for Gmail integration)
  3. Vapi: https://vapi.ai (for voice calls)

🛠️ Built With

📝 License

MIT License - Feel free to use and modify!


Simple, powerful, and ready to use**

About

A production-ready AI agent built with LlamaIndex that can send emails via Arcade (Gmail integration) and make voice calls using Vapi. Powered by GPT-4o-mini for intelligent multi-step task planning. Includes FastAPI server, Docker support, and comprehensive testing suite.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors