Table of Contents
The new Cursor Cloud Telegram Connector allows developers to run and manage Cursor Cloud Agents directly from the Telegram messaging app. This open-source Python service bridges a custom Telegram bot with the Cursor Cloud Agents API, enabling users to create AI agents, receive their responses, and send follow-up instructions without leaving their chat interface. By integrating GitHub workflows directly into the messaging platform, developers can inspect pull requests and merge code on the go.
Designed specifically for software engineers, DevOps teams, and technical leads, this tool transforms Telegram into a mobile command center for AI-assisted coding. Instead of constantly switching contexts between an IDE, a browser, and a terminal, developers can now monitor automated tasks, review code diffs, and approve changes asynchronously. This capability significantly streamlines remote workflows and keeps teams updated on agent progress in real-time.
Core Functionalities and GitHub Integration
The connector offers a robust set of features designed to replicate the desktop Cursor experience within a mobile-friendly chat environment. Users can create and manage agents directly from Telegram using a guided wizard, send follow-up messages to active agents, and monitor unread updates from multiple agents with configurable notification behaviors. Furthermore, the service supports a threaded mode, routing different agent conversations into dedicated Telegram threads or topics to keep workspaces organized.
For teams utilizing GitHub, the connector provides deep integration when an optional GitHub token is configured. Users can inspect pull request statuses, view code diffs directly within Telegram code blocks, mark pull requests as ready for review, and even execute merge operations (supporting merge, squash, or rebase methods). All session states, including unread tracking and wizard progress, are persistently stored in a local SQLite database.
Setup Guide and Prerequisites
Deploying the service requires a few essential components. You must have Python 3.12 or higher installed, a Telegram Bot Token generated via the @BotFather bot, your numeric Telegram User ID obtained from the @userinfobot, and a Cursor API Key from the Cursor Dashboard. If you intend to use the pull request features, a GitHub Fine-grained Personal Access Token (PAT) with read and write permissions for pull requests and contents is highly recommended.
The configuration process involves setting up environment variables. Here are the required steps to get the service running:
- Create a Telegram bot: Search for @BotFather in Telegram, send the
/newbotcommand, and save the provided token asTELEGRAM_BOT_TOKEN. - Get your User ID: Send
/startto @userinfobot and save the numeric ID asTELEGRAM_ALLOWED_USER_IDto restrict bot access. - Create a Cursor API key: Generate a new key in the Cursor Dashboard and save it as
CURSOR_API_KEY. - Create a GitHub token (Optional): Generate a Fine-grained PAT in GitHub Developer settings and save it as
GITHUB_TOKEN. - Configure the service: Copy the
.env.examplefile to.envand input your saved variables. - Run the application: Execute the service locally using a Python virtual environment or deploy it via Docker, ensuring you mount the
/datavolume for SQLite persistence.
Comprehensive Bot Commands
Once deployed, the bot operates entirely through Telegram commands. The service polls the Cursor API every 10 seconds to fetch updates and delivers unread assistant messages with full Markdown rendering converted to Telegram HTML. Below is the complete list of supported commands:
- /current: Show info about the active agent (name, status, repo, branches, PR link).
- /history <count>: Replay the last N conversation messages for the current agent.
- /agents: List running and finished agents; tap to select or open threads.
- /focus: Show clickable options to choose the active agent.
- /configure_unread: Set unread message behavior to full, count, or none.
- /unfocus: Clear the currently selected active agent.
- /stop: Stop the running agent and clear the active selection.
- /clear: Mark all unread messages as read for the active agent.
- /close: Close the bound Telegram thread without deleting the agent.
- /threadmode: Toggle per-agent Telegram thread routing on or off.
- /newagent: Launch a 4-step wizard to create a new agent (model, repo, branch, prompt).
- /pr: Show the active agent PR status and action buttons.
- /diff: Show the active agent PR diff in a Telegram code block.
- /ready: Mark the active agent PR ready for review.
- /merge: Merge the active agent PR.
- /cancel: Abort the in-progress /newagent wizard.
- /resetdb: Wipe and reinitialize the local SQLite state.
- /help: Show available commands.
My Take
The release of the Cursor Cloud Telegram Connector highlights a growing trend toward asynchronous, mobile-first developer operations. By utilizing a lightweight SQLite database for state management and a configurable 10-second polling interval, the developer has created a highly responsive tool that doesn't overwhelm system resources. The decision to include a threaded mode specifically leverages Telegram's advanced group features, preventing notification fatigue when managing multiple AI agents simultaneously. This tool effectively bridges the gap between automated code generation and human oversight, proving that complex DevOps tasks can be securely and efficiently managed from a smartphone.
Frequently Asked Questions
Do I need a GitHub token to use the Telegram bot?
No, the GitHub token is entirely optional. However, without it, you will only be able to view the pull request link. You need the token to view code diffs, mark pull requests as ready, or merge them directly from Telegram.
How does the bot handle messages from multiple AI agents?
The bot uses a configurable unread system. By default, it sends a summary count of unread messages. If you enable threaded mode via the /threadmode command, the bot will route each agent's conversation into its own dedicated Telegram topic.
Is my data secure when using this connector?
Yes, the service is designed to be self-hosted. By restricting access using the TELEGRAM_ALLOWED_USER_ID variable, only your specific Telegram account can interact with the bot and issue commands to your Cursor API.