Skip to content

Debanjan110d/Friday-An-AI-assistent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Friday - AI Assistant

Python License LiveKit Gemini

"Just like the AI from Iron Man, but with more attitude and better coding skills."

Friday is a sophisticated AI assistant built with LiveKit and Google's Gemini AI, offering seamless voice interactions, detailed analysis capabilities, and a personality inspired by Tony Stark's AI companion from Iron Man.

✨ Features

πŸŽ™οΈ Realtime Voice Interaction

  • Seamless voice conversations using Google's Realtime API
  • Natural language processing with "Aoede" voice
  • Real-time response generation

🧠 Advanced AI Capabilities

  • Dual AI Architecture: Combines realtime voice with detailed text analysis
  • Coding Assistant: Comprehensive code examples, best practices, and debugging help
  • Technical Analysis: In-depth explanations and multiple perspectives
  • Smart Tool Integration: Weather, web search, email, and detailed analysis

πŸ› οΈ Built-in Tools

  • 🌀️ Weather Information: Get current weather for any city
  • πŸ” Web Search: DuckDuckGo integration for real-time information
  • πŸ“§ Email Sending: Gmail integration with secure authentication
  • πŸ’» Code Analysis: Detailed programming help and explanations

🎭 Personality

  • Classy butler demeanor with a touch of sarcasm
  • Inspired by Iron Man's Friday AI
  • Professional yet entertaining responses

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • A Google API key (for Gemini AI)
  • LiveKit account and credentials
  • Gmail account (for email functionality)

Installation

  1. Clone the repository

    git clone https://github.com/Debanjan110d/Friday-An-AI-assistent.git
    cd Friday-An-AI-assistent
  2. Install dependencies

    pip install -r requirements.txt
  3. Download required files

    python agent.py download-files
  4. Set up environment variables

    Create a .env file in the project root:

    # Google Gemini AI
    GOOGLE_API_KEY=your_google_api_key_here
    
    # LiveKit Configuration
    LIVEKIT_URL=wss://your-livekit-url.livekit.cloud
    LIVEKIT_API_KEY=your_livekit_api_key
    LIVEKIT_API_SECRET=your_livekit_api_secret
    
    # Gmail Configuration (Optional - for email functionality)
    GMAIL_USER=your_email@gmail.com
    GMAIL_APP_PASSWORD=your_gmail_app_password
  5. Run the assistant

    # Development mode
    python agent.py dev
    
    # Console mode
    python agent.py console

πŸ”§ Setup Guide

1. Getting Google API Key

  1. Go to Google AI Studio
  2. Create a new API key
  3. Copy the key to your .env file as GOOGLE_API_KEY

2. LiveKit Setup

  1. Sign up at LiveKit Cloud
  2. Create a new project
  3. Get your WebSocket URL, API Key, and API Secret
  4. Add them to your .env file

3. Gmail Setup (Optional)

For email functionality:

  1. Enable 2-Factor Authentication on your Gmail account
  2. Generate an App Password:
    • Go to Google Account Settings
    • Security β†’ 2-Step Verification β†’ App Passwords
    • Generate password for "Mail"
  3. Use this app password (not your regular password) in GMAIL_APP_PASSWORD

πŸ“‹ Environment Variables

Variable Required Description
GOOGLE_API_KEY βœ… Yes Google Gemini AI API key
LIVEKIT_URL βœ… Yes LiveKit WebSocket URL
LIVEKIT_API_KEY βœ… Yes LiveKit API key
LIVEKIT_API_SECRET βœ… Yes LiveKit API secret
GMAIL_USER ❌ Optional Gmail address for email functionality
GMAIL_APP_PASSWORD ❌ Optional Gmail app password

🎯 Usage Examples

Voice Commands

"Hey Friday, what's the weather in New York?"
"Can you search the web for Python tutorials?"
"Send an email to john@example.com about the meeting"
"Help me write a MongoDB user schema"

Coding Assistance

User: "Write a simple MongoDB schema"
Friday: "Certainly, Sir. Let me provide you with detailed coding assistance."
[Returns comprehensive code examples with explanations]

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Voice Input   │───▢│  RealtimeModel  │───▢│  Live Response  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Complex Queries │───▢│   Gemini Pro    │───▢│ Detailed Output β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚      Tools      β”‚
                    β”‚ β€’ Weather       β”‚
                    β”‚ β€’ Web Search    β”‚
                    β”‚ β€’ Email         β”‚
                    β”‚ β€’ Code Analysis β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Available Tools

Weather Tool

await get_weather(city="London")
# Returns: "London: ⛅️ +8Β°C"

Web Search Tool

await search_web(query="Python best practices")
# Returns: Comprehensive search results

Email Tool

await send_email(
    to_email="user@example.com",
    subject="Meeting Reminder",
    message="Don't forget about our meeting at 3 PM"
)

Detailed Analysis Tool

await get_detailed_analysis(
    query="Explain async/await in Python",
    context_info="For a beginner programmer"
)
# Returns: Comprehensive explanation with examples

πŸ” Capabilities

What Friday Can Do:

βœ… Voice Interactions

  • Natural conversation in real-time
  • Context-aware responses
  • Personality-driven communication

βœ… Coding Assistance

  • Code generation and explanation
  • Best practices recommendations
  • Debugging help and error analysis
  • Multiple programming languages support

βœ… Information Retrieval

  • Real-time weather data
  • Web search capabilities
  • Current events and facts

βœ… Communication

  • Email composition and sending
  • Professional communication assistance

βœ… Analysis & Reasoning

  • Complex problem breakdown
  • Multiple perspective analysis
  • Technical documentation explanation

Current Limitations:

❌ Cannot access local files or systems ❌ Cannot execute code directly ❌ Cannot make phone calls or SMS ❌ Cannot access private databases

πŸ§ͺ Development

Project Structure

Friday-An-AI-assistent/
β”œβ”€β”€ agent.py              # Main agent logic
β”œβ”€β”€ tools.py              # Tool implementations
β”œβ”€β”€ prompts.py            # AI prompts and instructions
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ .env                  # Environment variables
β”œβ”€β”€ .gitignore           # Git ignore rules
β”œβ”€β”€ README.md            # This file
β”œβ”€β”€ LICENSE              # MIT License
└── KMS/                 # Key Management and logs
    └── logs/

Adding New Tools

  1. Create a new function in tools.py:
@function_tool()
async def your_new_tool(
    context: RunContext,
    parameter: str
) -> str:
    """Your tool description"""
    # Implementation here
    return "Result"
  1. Import and add to agent in agent.py:
from tools import get_weather, search_web, send_email, get_detailed_analysis, your_new_tool

# In Assistant class
tools=[
    get_weather,
    search_web,
    send_email,
    get_detailed_analysis,
    your_new_tool  # Add here
],

Running in Different Modes

# Development mode (with debugging)
python agent.py dev

# Console mode (text-based interaction)
python agent.py console

# Download required files
python agent.py download-files

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • LiveKit for real-time communication infrastructure
  • Google AI for Gemini AI capabilities
  • Marvel Studios for the inspiration from Iron Man's Friday AI
  • The open-source community for various tools and libraries

πŸ“ž Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already listed
  3. Provide detailed information about your setup and the error

"Sometimes you gotta run before you can walk." - Tony Stark

Made with ❀️ and a lot of coffee β˜•

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors