# tg — Telegram access for AI agents

> Read, search and automate Telegram with a small local runtime and the full Telethon API.

tg — Telegram access for AI agents is a free AI agent skill on Agensi by Sergei Ivanov, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Sergei Ivanov](https://www.agensi.io/creators/sergei-ivanov)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-05
- Security: scan passed (2026-10-05); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/tg-telegram-access-for-ai-agents
- Tags: automation, ai-agents, telegram, python

## About this skill

A small, authenticated Telegram runtime for agents and humans. Read and search chats, work with media, and run ordinary Python against Telethon's client methods and raw Telegram API.

This download contains the agent skill, setup documentation and original MIT license. Install the separate `tg-harness` runtime and complete Telegram login locally before use. Requires Python 3.12+ and macOS or Linux.

The runtime is not a sandbox: scripts have the permissions of the selected Telegram account, including sending, editing and deleting. The skill instructs the agent to check the user's request and target before externally visible actions. Credentials and session files remain on the user's machine and are not included in this download.

Source: https://github.com/speech115/tg
License: MIT; original license included. This listing does not replace the open-source license.

## Requires

- Python

## Known limitations

Not a sandbox or a permission-enforcement layer. Requires local setup and Telegram login. Session locking does not coordinate rate limits across separate sessions. Respect Telegram FloodWait restrictions.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the tg — Telegram access for AI agents skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific Telegram capabilities does this skill add to my AI agent?

This skill allows AI agents to interact with Telegram via the Telethon API, enabling them to read message history, search specific chats, download media, and automate responses using a local authenticated session.

### What is included in this purchase versus what needs to be installed separately?

This download includes the agent skill logic, setup documentation, and the MIT license; however, you must separately install the `tg-harness` runtime and complete a local Telegram login to generate your own session files.

### What are the system requirements and supported agent platforms?

The skill requires Python 3.12 or higher and is compatible with macOS and Linux systems; it is designed to work with any AI agent capable of executing local Python scripts through a runtime harness.

### How does the skill handle security and account permissions?

The skill operates with the full permissions of your Telegram account, though it includes built-in instructions for the agent to verify targets and requests before performing destructive actions like deleting or editing messages.

### Are my Telegram API credentials or session data shared with the skill provider?

No, your Telegram credentials and session files are stored locally on your machine and are never included in the skill download or transmitted to the marketplace.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
