{
  "id": 10004816,
  "title": "I Built a Telegram AI Agent That Can Actually Use Tools O.O",
  "url": "https://urgent.news/2026/09/26/i-built-a-telegram-ai-agent-that-can-actually-use-tools-o-o",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-26T15:17:03.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hexzonetwork/i-built-a-telegram-ai-agent-that-can-actually-use-tools-oo-2cgc"
  },
  "original_language": "en",
  "account": "I have built Hexzie, an innovative AI Telegram assistant that goes beyond simple text exchange. This cutting-edge tool allows the AI to use various tools, inspect files, execute commands, search the web, and interact directly with Telegram.\n\nHexzie is constructed using Telegraf as the Telegram framework, coupled with Node.js. For the tool execution side, I utilized Go, which manages tasks such as shell commands, file manipulation, web searches, screenshot capturing, system information retrieval, and more.\n\nThe AI makes use of an OpenAI compatible API, which enables it to determine when it needs to invoke tools. Here's a simplified view of its architecture: Telegram ─► Telegraf ─► Authentication ─► Prompt / Context Builder ─► Agent Loop ──► AI API (tool_calls) ─► Go Tool Runner (shell, files, web, screenshots, calculator, sysinfo) ─► Telegram Tools (send/receive messages, photos, documents, buttons, edit/delete, forward/pin, chat actions, get_chat).\n\nOne fascinating feature is the agentic loop. The loop allows the AI to interact with the environment through structured tools. For example, when a user asks the model to check a website and identify its server, the AI sends a web_check() tool request. The Go tool runner then retrieves HTTP/server/technology information. The AI subsequently analyzes this result and responds accordingly.\n\nTo provide a more natural user experience, Hexzie maintains a single progress message throughout the tool execution. As the AI streams its reasoning, the progress message updates with action descriptions, status updates, and rotating tips. This method makes tool execution feel more transparent and engaging.\n\nHexzie also addresses the issue of multiple requests in a chat by keeping track of the newest request. If an older request becomes stale, it is aborted, preventing outdated responses. The bot also features multi-API failover, allowing it to use various endpoints and automatically switch to a backup if the primary one fails.\n\nThe assistant retains two layers of conversation context for efficient memory management. Recent messages are kept directly in memory, while older conversations are summarized by the model. It also includes Telegram-native tools, enabling the AI to perform actions specific to Telegram, such as sending messages, documents, photos, and editing or deleting messages.",
  "summary": "I've been building Hexzie (HexTelegram) a Telegram-based AI assistant that goes beyond just sending text back and forth. The idea was simple: What if an AI assistant inside Telegram could actually use tools, inspect files, execute commands, search the web, and interact with Telegram itself? So I built it. HexZoNetwork / HexTelegram Hexzie HexTelegram (HTG) — AI Telegram bot by HexzoNetwork ⚠️…",
  "key_points": [
    "Hexzie AI Telegram assistant can use tools like web search, file manipulation, and system info.",
    "Built with Telegraf, Node.js, and Go for tool execution and Telegram integration."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}