Back to feed
Dev.to
Dev.to
7/12/2026
Building a Telegram AI Agent for Personal Use

Building a Telegram AI Agent for Personal Use

Short summary

A software engineer details building a personal Telegram AI agent with zero infrastructure using Bun, Telegraf, OpenAI SDK, and Composio. The architecture uses polling instead of webhooks, SQLite for storage, and Web Workers for scheduling—all running in a single process on a $5 VPS. The article covers the tech stack choices, security model, and trade-offs made to avoid cloud dependencies.

  • Single-process architecture on Bun with Telegraf polling, OpenAI SDK, and Composio for 200+ integrations
  • Polling mode eliminates need for public URLs, SSL certs, or always-on servers
  • SQLite via bun:sqlite with WAL mode handles storage with no ORM or migrations framework
  • Manual tool-call loop management gives full control over AI function calling

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more