{"id":17504642,"url":"https://github.com/aixerum/ai-telegram-assistant","last_synced_at":"2025-04-11T02:52:32.174Z","repository":{"id":258506503,"uuid":"871041623","full_name":"AIXerum/AI-Telegram-Assistant","owner":"AIXerum","description":"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! 🤖✨","archived":false,"fork":false,"pushed_at":"2024-10-17T07:36:56.000Z","size":82,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T00:41:37.497Z","etag":null,"topics":["ai","assistant","calendar","email","langgraph","multiagent","notion","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AIXerum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T06:45:08.000Z","updated_at":"2025-03-15T12:51:21.000Z","dependencies_parsed_at":"2024-10-19T10:19:12.566Z","dependency_job_id":null,"html_url":"https://github.com/AIXerum/AI-Telegram-Assistant","commit_stats":null,"previous_names":["aixerum/ai-telegram-assistant"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIXerum%2FAI-Telegram-Assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIXerum%2FAI-Telegram-Assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIXerum%2FAI-Telegram-Assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIXerum%2FAI-Telegram-Assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AIXerum","download_url":"https://codeload.github.com/AIXerum/AI-Telegram-Assistant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333162,"owners_count":21086193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","assistant","calendar","email","langgraph","multiagent","notion","telegram-bot"],"created_at":"2024-10-20T01:14:48.562Z","updated_at":"2025-04-11T02:52:32.152Z","avatar_url":"https://github.com/AIXerum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram AI Agent\n\n**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! 🤖✨**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/1ccf688b-ad96-495b-9ba8-0dc8dee9773b\" alt=\"Telegram agent\"\u003e\n\u003c/p\u003e\n\nThis 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.\n\n## Overview\n\n### Main Agent: Telegram Assistant Manager\n\nThe Telegram Assistant Manager is your personal assistant that orchestrates the tasks and communication between you and the sub-agents. The manager is responsible for:\n\n- Receiving and analyzing your Telegram messages.\n- Delegating tasks to the appropriate sub-agent (Email, Calendar, or Notion).\n- Communicating updates, messages, and any queries back to you via Telegram.\n\n### Sub-Agents\n\nThe project includes three specialized sub-agents:\n\n1. **Email Agent:** can handle all your email-related tasks, including sending emails, retrieving specific emails, and checking for important messages from your contacts list.\n\n2. **Calendar Agent:** can manage your calendar by creating new events and retrieving and checking your scheduled events.\n\n3. **Notion Agent:** can manage your to-do list in Notion, helping you add, remove, or check tasks as needed\n\nAll the sub-agents report back to the Telegram Assistant Manager after completing their respective tasks.\n\n## System Flowchart\n\nThis is the detailed flow of the assistant:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/c38f1e65-05ca-4ed5-97da-283983348a63\" alt=\"AI Telegram agent\"\u003e\n\u003c/p\u003e\n\n## Tech Stack\n\n- **LangGraph \u0026 LangChain**: Frameworks used for building the AI agents and interacting with LLMs (GPT4, LLAMA3, GEMINI)\n- **LangSmith**: For monitoring the different LLM calls and AI agents interactions.\n- **Google APIs**: Provides access to Google services like Calendar, Contacts, and Gmail.\n- **Notion Client**: Interface for interacting with Notion to manage and update to-do lists.\n\n## How to Run\n\n### Prerequisites\n\n- Python 3.9+\n- Google API credentials (for Calendar, Contacts, and Gmail access)\n- Notion API key\n- Groq API key (for Llama3)\n- Google Gemini API key (for using the Gemini model)\n- Create a Telegram Bot\n- Necessary Python libraries (listed in `requirements.txt`)\n\n### Setup\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/AIXerum/AI-Telegram-Assistant.git\n   cd AI-Telegram-Assistant\n   ```\n\n2. **Create and activate a virtual environment:**\n\n   ```sh\n   python -m venv venv\n   source venv/bin/activate # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. **Install the required packages:**\n\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n4. **Set up environment variables:**\n\n   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.\n\n5. **Configure Google API credentials:**\n\n   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.\n\n6. **Create a Telegram Bot:**\n\nTo 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.\n\n7. **Run the project**:\n\n   ```bash\n   python main.py\n   ```\n\n### Usage\n\n- **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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faixerum%2Fai-telegram-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faixerum%2Fai-telegram-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faixerum%2Fai-telegram-assistant/lists"}