Telegram bot for launching and managing Cursor Cloud Agents from chat.
Wraps the Cursor Cloud Agents API (https://api.cursor.com):
| Command | API endpoint |
|---|---|
/agent <prompt> |
POST /v0/agents — launch an agent on the configured repo |
/agents |
GET /v0/agents — list recent agents |
/status <id> |
GET /v0/agents/{id} |
/conversation <id> |
GET /v0/agents/{id}/conversation |
/followup <id> <text> |
POST /v0/agents/{id}/followup |
/stop <id> |
POST /v0/agents/{id}/stop |
/delete <id> |
DELETE /v0/agents/{id} |
/models |
GET /v0/models |
/repos |
GET /v0/repositories |
/me |
GET /v0/me |
/repo <url> [ref] |
set the default repository for the chat |
/model <name> |
set the default model for the chat |
After launching an agent (or sending a follow-up) the bot polls its status every 30 seconds and pushes updates to the chat — including the PR URL when the agent finishes.
- Create a bot with @BotFather and copy the token.
- Create a Cursor API key (Cursor Dashboard → Integrations → API Keys).
- Configure and run:
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # fill in tokens
set -a && source .env && set +a
python bot.pySet ALLOWED_USER_IDS in .env to restrict the bot to specific Telegram users — leave it empty and anyone who finds the bot can spend your Cursor credits.
pip install -r requirements-dev.txt
pytest -qbot.py— Telegram bot (python-telegram-bot, long polling) and status-watch job queuecursor_api.py— async client for the Cloud Agents APIstate.json— per-chat repo/model settings (created at runtime, git-ignored)