{"id":24171268,"url":"https://github.com/anlaki-py/akibot","last_synced_at":"2026-06-13T07:32:10.449Z","repository":{"id":272167714,"uuid":"915716061","full_name":"anlaki-py/AkiBot","owner":"anlaki-py","description":"AkiBot - The Ultimate Telegram AI Assistant","archived":false,"fork":false,"pushed_at":"2025-06-01T19:54:09.000Z","size":294,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T05:50:19.234Z","etag":null,"topics":["ai","assistant-chat-bots","gemini","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://anlaki-py.github.io/AkiBot/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anlaki-py.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-01-12T16:08:24.000Z","updated_at":"2025-06-01T19:51:29.000Z","dependencies_parsed_at":"2025-02-17T12:26:28.006Z","dependency_job_id":"37b75520-130f-479c-98b9-2e05339d6491","html_url":"https://github.com/anlaki-py/AkiBot","commit_stats":null,"previous_names":["anlaki-py/public-aki-tg-bot","anlaki-py/akibot"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/anlaki-py/AkiBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlaki-py%2FAkiBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlaki-py%2FAkiBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlaki-py%2FAkiBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlaki-py%2FAkiBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anlaki-py","download_url":"https://codeload.github.com/anlaki-py/AkiBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anlaki-py%2FAkiBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34276501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-chat-bots","gemini","telegram","telegram-bot"],"created_at":"2025-01-13T00:35:36.393Z","updated_at":"2026-06-13T07:32:10.444Z","avatar_url":"https://github.com/anlaki-py.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AkiBot (v1.0.8a) - The Ultimate Telegram AI Assistant\n\nThis is a Telegram bot powered by the Gemini AI model, designed to interact with users through various media types and provide helpful responses.\n\n## Functionality\n\nThe bot is capable of:\n\n-   **Text Interaction:** Engaging in conversational text-based chats, maintaining context throughout the conversation.\n-   **Image Understanding:** Processing images sent by users, allowing for vision-based queries.\n-   **Document Analysis:** Reading and understanding text-based documents.\n-   **Audio Processing:** Handling audio messages and files.\n-   **Instagram Media Downloading:** Downloading photos and videos from Instagram links.\n-   **YouTube to MP3 Conversion:** Converting YouTube videos to MP3 audio files.\n-   **Webpage to Markdown Conversion:** Converting webpages to Markdown format.\n-   **YouTube Transcript Extraction**: Extracting transcripts from YouTube videos.\n-   **Enhanced Context Handling**: Uses message replies and context to understand user's intent better.\n\n## Features\n\n-   **User Access Control:** Only allows access to users specified in the configuration.\n-   **Chat History:** Maintains chat history for each user, allowing for contextual conversations.\n-   **File Handling:** Processes various file types, including images, documents, and audio files.\n-   **Instagram Downloader:** Downloads Instagram posts and reels, with options to send as compressed media or files.\n-   **YouTube Downloader:** Downloads audio from YouTube videos as MP3 files, including metadata and cover art.\n-   **Web to Markdown Converter:** Converts webpages into markdown format for easy reading and sharing.\n-   **Error Handling:** Includes robust error handling and retry mechanisms for network issues and API rate limits.\n-   **Configuration:** Utilizes a configuration file for easy customization of bot settings, including allowed users, AI model, and safety settings.\n-   **User Logging:** Logs user data including first and last seen dates, chat type, and more.\n-  **Config Editor:** Built-in web based configuration editor to modify the bot settings and system prompts.\n-  **Markdown Toggle**: Allows users to toggle between plain text and rendered markdown for bot responses.\n-  **Enhanced Reply Context**: The bot can now understand and process replies to previous messages, including images, documents, and audio.\n-  **Improved Media Handling**: Improved handling for audio and voice messages, including metadata and file sizes.\n-  **Token Management**: Manages chat history token count to prevent exceeding API limits by removing the oldest messages.\n-  **Detailed Reasoning**: The `/think` command provides detailed reasoning for the AI bot's responses.\n\n## Commands\n\n-   `/start`: Starts the bot and provides a welcome message.\n-   `/help`: Displays a list of available commands.\n-   `/clear`: Clears the chat history for the current user.\n-   `/insta \u003curl\u003e`: Downloads Instagram media from the provided URL as compressed media.\n-   `/instaFile \u003curl\u003e`: Downloads Instagram media from the provided URL as uncompressed files.\n-   `/ytb2mp3 \u003curl\u003e`: Downloads the audio from a YouTube video as an MP3 file.\n-   `/web2md \u003curl\u003e`: Converts a webpage to a markdown file.\n-   `/ytb2transcript`: Extracts the transcript from a YouTube video by letting user to choose the language and the transcript format (with/without timestamps)\n-   `/jailbreak` Inject jailbreak prompt into the current chat.\n-   `/think \u003cquery\u003e`:  Provides a detailed reasoning for the AI bot's response to the query.\n    \u003e The Think command is a standalone function and not related to the main model or context and the generated responses are not saved in the context history.\n\n## Setup\n\n0.  **Recommended:**\n    - Recommended to use Python version 3.11\n    ```bash\n    apt update\n    apt install python3.11\n    ```    \n    \n1.  **Initial Setup:**\n    - Create and enter the virtual environment\n    ```bash\n    python -m venv venv\n    source venv/bin/activitie\n    ```\n    - Install the requirements\n    ```bash\n    pip install -r requirements.txt\n    ```\n2.  **Install ffmpeg:**\n    - Ensure you have `ffmpeg` installed on your system. This is required for YouTube to MP3 conversion.\n3.  **Environment Variables:**\n    -   Set the `TELEGRAM_TOKEN_KEY` environment variable with your Telegram bot token.\n    -   Set the `GEMINI_API_KEY` environment variable with your Gemini API key.\n4. **First Time Run:**\n    -   Execute the `run.sh` script:\n        ```bash\n        ./run.sh\n        ```\n        This will start the bot and the configuration editor, allowing you to set up the bot's configuration.\n        The config editor will be available at `http://127.0.0.1:8080`.\n        After configuring the bot, you can close the editor.\n5.  **Run the Bot:**\n    -   After the first time run, you can start the bot directly by running:\n        ```bash\n        python main.py\n        ```\n        \n   \n**Note:** After the first run using `run.sh`, you can run the bot directly with `python main.py`. The `run.sh` script is mainly for creating the initial config file.\n\n## License\n\nThis project is licensed under the [MIT](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanlaki-py%2Fakibot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanlaki-py%2Fakibot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanlaki-py%2Fakibot/lists"}