"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.
- Seamless voice conversations using Google's Realtime API
- Natural language processing with "Aoede" voice
- Real-time response generation
- 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
- π€οΈ 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
- Classy butler demeanor with a touch of sarcasm
- Inspired by Iron Man's Friday AI
- Professional yet entertaining responses
- Python 3.8 or higher
- A Google API key (for Gemini AI)
- LiveKit account and credentials
- Gmail account (for email functionality)
-
Clone the repository
git clone https://github.com/Debanjan110d/Friday-An-AI-assistent.git cd Friday-An-AI-assistent -
Install dependencies
pip install -r requirements.txt
-
Download required files
python agent.py download-files
-
Set up environment variables
Create a
.envfile 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
-
Run the assistant
# Development mode python agent.py dev # Console mode python agent.py console
- Go to Google AI Studio
- Create a new API key
- Copy the key to your
.envfile asGOOGLE_API_KEY
- Sign up at LiveKit Cloud
- Create a new project
- Get your WebSocket URL, API Key, and API Secret
- Add them to your
.envfile
For email functionality:
- Enable 2-Factor Authentication on your Gmail account
- Generate an App Password:
- Go to Google Account Settings
- Security β 2-Step Verification β App Passwords
- Generate password for "Mail"
- Use this app password (not your regular password) in
GMAIL_APP_PASSWORD
| 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 |
"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"
User: "Write a simple MongoDB schema"
Friday: "Certainly, Sir. Let me provide you with detailed coding assistance."
[Returns comprehensive code examples with explanations]
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Voice Input βββββΆβ RealtimeModel βββββΆβ Live Response β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Complex Queries βββββΆβ Gemini Pro βββββΆβ Detailed Output β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Tools β
β β’ Weather β
β β’ Web Search β
β β’ Email β
β β’ Code Analysis β
βββββββββββββββββββ
await get_weather(city="London")
# Returns: "London: β
οΈ +8Β°C"await search_web(query="Python best practices")
# Returns: Comprehensive search resultsawait send_email(
to_email="user@example.com",
subject="Meeting Reminder",
message="Don't forget about our meeting at 3 PM"
)await get_detailed_analysis(
query="Explain async/await in Python",
context_info="For a beginner programmer"
)
# Returns: Comprehensive explanation with examplesβ 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
β Cannot access local files or systems β Cannot execute code directly β Cannot make phone calls or SMS β Cannot access private databases
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/
- 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"- 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
],# 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- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- 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
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue if your problem isn't already listed
- 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 β