finds.dev← search

// the find

MH4GF/pi-chat-sdk

★ 3 · TypeScript · MIT · updated Sep 2026

Run pi (the minimal coding agent) as a Slack / Discord / Telegram bot with Chat SDK. One thread = one pi session.

A thin adapter that lets pi (a minimal coding agent) run as a Slack, Discord, or Telegram bot via Vercel's Chat SDK, mapping each chat thread to a persistent, resumable pi session. Aimed at developers who already use pi's CLI/TUI and want the same session accessible from a chat client without building their own bot scaffolding.

The core design choice is sound: it reuses pi's own session files and cwd-based config (AGENTS.md, MCP servers, models.json) instead of inventing a parallel config system, so a chat session is a real pi session you can open with `pi --resume`. The 'Things that bit us' section reads like genuine production experience rather than marketing copy — it calls out Slack's edit rate limits, Chat SDK's default 'drop' concurrency silently discarding messages, and extensions needing `bindExtensions` or their UI prompts resolve to false/undefined. Testability was clearly designed in: `createSession` can be swapped for a fake, and there's a real test suite (attach.test.ts, pi-session.test.ts, stream.test.ts) rather than just a demo. The alternatives table is unusually honest about overlapping projects and when you'd pick a tmux/VM-based extension instead of this.

This is a 3-star, single-push-day project — only the Slack example is marked 'Runs in production,' Discord and Telegram are explicitly flagged untested by the author. It's built on two fast-moving, pre-1.0 dependencies (pi's SDK and Chat SDK), and the README itself warns pi's SDK changes between minors, which means you're pinning versions and babysitting upgrades. Default state (`createMemoryState`) loses thread subscriptions on restart, so anything beyond simple DMs/mentions needs the user to bring their own persistent state adapter — not included. There's no retry/backoff or persistence story for failed turns beyond posting an error string into the thread; a crash mid-turn just leaves the session file as pi left it, with no bot-level recovery.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →