54.8 MB
3,662 files
Updated 2 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| scripts | 2 items | ||
| render.yaml | 464 Bytes xet | f295c5d0 | |
| entrypoint.sh | 761 Bytes xet | b31dd491 | |
| SETUP.md | 2.58 kB xet | 3a259057 | |
| README.md | 2.26 kB xet | 9dd24cb7 | |
| Dockerfile | 752 Bytes xet | 221bd69c | |
| .env.example | 444 Bytes xet | c9f8f83d |
Pi 24/7 Telegram Agent on Render
Running Pi coding agent as a background service with Telegram interface.
Architecture
Render Free Tier (ephemeral)
├── Pi (headless RPC mode, --no-session)
│ └── pi-telegram-connect extension
├── Telegram Bot (via extension)
└── No persistent storage
Note: Render free tier has no persistent storage. Sessions reset on restart. This is fine for a 24/7 agent - it keeps general context in the system prompt, not session history.
Prerequisites
- Render Account - https://render.com
- Telegram Bot Token - From @BotFather
- Pi API Key - From your LLM provider (Anthropic/OpenAI)
- GitHub Repo - To deploy from
Quick Deploy
1. Fork/Clone This Repo
git clone https://github.com/yourusername/pi-telegram-247.git
cd pi-telegram-247
2. Set Environment Variables in Render
| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN |
Bot token from @BotFather |
ANTHROPIC_API_KEY |
Or OPENAI_API_KEY |
PI_PROVIDER |
anthropic or openai |
PI_MODEL |
e.g., claude-sonnet-4-20250514 |
3. Deploy to Render
- Connect GitHub repo
- Select Background Worker type
- Use
render.yamlfor auto-config - Deploy
Local Development
# Install dependencies
./scripts/setup.sh
# Configure
cp .env.example .env
# Edit .env with your keys
# Run
./scripts/run.sh
How It Works
Pi runs in RPC mode (headless) with the pi-telegram-connect extension:
- Pi starts with
pi --mode rpc - Extension connects to Telegram via long polling
- Messages flow: Telegram → Extension → Pi → Response → Telegram
- Session persists in
/data/pi-sessions/
Telegram Commands
/start- Show help/new- New session/stop- Abort current turn/status- Show bot status
SCRAPER TODO
- Channel scraper using Telethon
- AI-ready JSON output
- Resume capability
- Media download support
References
- Total size
- 54.8 MB
- Files
- 3,662
- Last updated
- Aug 27
- Pre-warmed CDN
- US EU US EU