Quasa
Use QUASA App
Join the pioneer of Web3 crypto freelancing today!
Open
Technology

Telegram Just Launched Real Serverless for Bots — And It’s Built for AI Agents

|Author: Viacheslav Vasipenok|4 min read| 81
Telegram Just Launched Real Serverless for Bots — And It’s Built for AI Agents

Telegram has quietly rolled out something much more interesting than another round of Stars or sticker packs: Serverless Bots. You can now run the backend logic for your bots (and even Mini Apps) directly inside Telegram’s own cloud — no external servers, VPS, or cloud functions required.

The feature is already live and documented at core.telegram.org/bots/serverless. It represents a significant step toward making bot development dramatically simpler and more accessible, especially for AI-assisted workflows.


How It Works

You write plain JavaScript modules. Deployment is done with a simple CLI command (`npx tgcloud push`). Your code runs in isolated V8 sandboxes right next to Telegram’s Bot API and comes with a built-in SQLite database.

Telegram Just Launched Real Serverless for Bots — And It’s Built for AI AgentsKey technical points:

  • Execution environment: Lightweight V8 isolates with extremely low latency to the Bot API.
  • Database: Built-in SQLite with a clean schema definition (`schema.js`) and a fluent query builder (inspired by Drizzle).
  • Project structure: Clean separation with `handlers/` (one file per update type), `lib/` for shared code, and `schema.js` for the database.
  • Management: You can create, edit, and manage projects directly from your phone via BotFather, in addition to the `tgcloud` CLI.

The platform automatically handles webhooks, scaling, and infrastructure — you just write the logic.


Important Limitations

Telegram Just Launched Real Serverless for Bots — And It’s Built for AI AgentsAs with any new serverless offering, there are constraints:

  • No npm packages — only the official SDK and your own modules.
  • No filesystem access.
  • No foreign keys in SQLite (`PRAGMA foreign_keys` is disabled).
  • HTTP responses are capped at 32 MB; binary payloads are not supported.
  • File upload/download from handlers is not yet available (you work with `file_id` instead).

These limitations keep the runtime lightweight, secure, and predictable.


The Killer Feature: AI-Native Development

What makes Telegram Serverless stand out is how deliberately it was designed for AI coding agents.

Telegram Just Launched Real Serverless for Bots — And It’s Built for AI AgentsEvery new project is automatically scaffolded with:

  • `AGENTS.md` — detailed instructions for AI assistants on project structure, conventions, imports, and best practices.
  • `docs/tgcloud-sdk.md` — full SDK reference.

Tools like Claude Code, Cursor, or any other AI coding assistant can read these files and immediately understand the environment. The goal is explicit: an AI agent should be able to build a complete, working bot from a natural language description.

Example workflow:

  1. Create a new project with `npm create @tgcloud/bot my-bot`;
  2. Tell Claude or Cursor: “Build a bot that tracks to-do lists per user with reminders”;
  3. The AI reads `AGENTS.md` + SDK docs, generates the schema and handlers;
  4. You test locally with `npx tgcloud run`;
  5. Deploy with one command.

This is a genuine shift. Instead of fighting with deployment, environment variables, and infrastructure, developers (and AI agents) can focus purely on the bot’s logic.


Who This Is For

  • Developers who want to prototype or run small-to-medium bots without managing servers.
  • Teams that want fast iteration and zero-ops deployment.
  • AI enthusiasts and “vibe coders” who want to describe what they want and have an agent build it end-to-end.
  • Anyone tired of setting up webhooks, databases, and scaling for Telegram bots.

It’s not meant to replace heavy backend systems with complex requirements, but for the vast majority of Telegram bots, it removes a huge amount of friction.


Bottom Line

Telegram Just Launched Real Serverless for Bots — And It’s Built for AI AgentsTelegram Serverless isn’t just another hosting option — it’s a full opinionated platform that brings the backend into Telegram itself. By combining isolated V8 execution, a built-in database, excellent CLI tooling, mobile management via BotFather, and first-class support for AI coding assistants through `AGENTS.md`, Telegram has created something genuinely useful.

For many bot developers, this could become the default way to build and ship Telegram bots going forward. The infrastructure is finally getting out of the way.

If you’ve been waiting for a low-friction way to build bots (especially with AI help), this is worth trying right now.

---

Telegram Just Launched Real Serverless for Bots — And It’s Built for AI AgentsAlso read:

---

Thank you!

Share:

Subscribe to our newsletter

Get the latest Web3, AI, and crypto news delivered straight to your inbox.

0