Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aixerum/ai-telegram-assistant
Imagine a personal assistant in your pocket π± that handles your emails π§, schedule π
, and to-do lists β
βall through Telegram. That's what this Telegram AI agent does! π€β¨
https://github.com/aixerum/ai-telegram-assistant
ai assistant calendar email langgraph multiagent notion telegram-bot
Last synced: 21 days ago
JSON representation
Imagine a personal assistant in your pocket π± that handles your emails π§, schedule π , and to-do lists β βall through Telegram. That's what this Telegram AI agent does! π€β¨
- Host: GitHub
- URL: https://github.com/aixerum/ai-telegram-assistant
- Owner: AIXerum
- Created: 2024-10-11T06:45:08.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T07:36:56.000Z (2 months ago)
- Last Synced: 2024-10-27T01:25:43.637Z (2 months ago)
- Topics: ai, assistant, calendar, email, langgraph, multiagent, notion, telegram-bot
- Language: Python
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegram AI Agent
**Imagine a personal assistant in your pocket π± that handles your emails π§, schedule π , and to-do lists β βall through Telegram. That's what this Telegram AI agent does! π€β¨**
This project provides a personal assistant agent that manages tasks related to your email inbox, calendar, and Notion to-do list. The assistant communicates with you via Telegram, keeping you informed about your schedule, tasks, and emails. The assistant is equipped with sub-agents for handling specific tasks and tools for efficient task management.
## Overview
### Main Agent: Telegram Assistant Manager
The Telegram Assistant Manager is your personal assistant that orchestrates the tasks and communication between you and the sub-agents. The manager is responsible for:
- Receiving and analyzing your Telegram messages.
- Delegating tasks to the appropriate sub-agent (Email, Calendar, or Notion).
- Communicating updates, messages, and any queries back to you via Telegram.### Sub-Agents
The project includes three specialized sub-agents:
1. **Email Agent:** can handle all your email-related tasks, including sending emails, retrieving specific emails, and checking for important messages from your contacts list.
2. **Calendar Agent:** can manage your calendar by creating new events and retrieving and checking your scheduled events.
3. **Notion Agent:** can manage your to-do list in Notion, helping you add, remove, or check tasks as needed
All the sub-agents report back to the Telegram Assistant Manager after completing their respective tasks.
## System Flowchart
This is the detailed flow of the assistant:
## Tech Stack
- **LangGraph & LangChain**: Frameworks used for building the AI agents and interacting with LLMs (GPT4, LLAMA3, GEMINI)
- **LangSmith**: For monitoring the different LLM calls and AI agents interactions.
- **Google APIs**: Provides access to Google services like Calendar, Contacts, and Gmail.
- **Notion Client**: Interface for interacting with Notion to manage and update to-do lists.## How to Run
### Prerequisites
- Python 3.9+
- Google API credentials (for Calendar, Contacts, and Gmail access)
- Notion API key
- Groq API key (for Llama3)
- Google Gemini API key (for using the Gemini model)
- Create a Telegram Bot
- Necessary Python libraries (listed in `requirements.txt`)### Setup
1. **Clone the repository:**
```sh
git clone https://github.com/AIXerum/AI-Telegram-Assistant.git
cd AI-Telegram-Assistant
```2. **Create and activate a virtual environment:**
```sh
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```3. **Install the required packages:**
```sh
pip install -r requirements.txt
```4. **Set up environment variables:**
Create a `.env` file in the root directory of the project and add your API keys, see `.env.example` to know all the parameters you will need.
5. **Configure Google API credentials:**
Follow Google's documentation to set up credentials for Calendar, Contacts, and Gmail APIs. Save the credentials file in a secure location and update the path in the configuration file.
6. **Create a Telegram Bot:**
To interact with the assistant via Telegram, you will need to create a Telegram bot and obtain the bot token and chat ID. Follow this [guide](https://www.youtube.com/watch?v=ozQfKhdNjJU) to create your bot and get the necessary information.
7. **Run the project**:
```bash
python main.py
```### Usage
- **Communicating with the Assistant**: Simply send a message to your Telegram bot, and the assistant will analyze the message, delegate the task to the appropriate sub-agent, and report back with the results.