Skip to content

About

The open-source Grok Bot, without the app. The full personal agent, right inside the chat apps you already use, on the AI subscription you already pay for.

Topics

Resources

Contributing

Stars

333 stars

Watchers

0 watching

Forks

Repository files navigation

Pots logo

pi-durable-bot (Pots)

The open-source Grok Bot, without the app.

The full personal agent, right inside the chat apps you already use,
on the AI subscription you already pay for.

Demo · Compare · Channels · Quick start · How it decides · How it works

Star pi-durable-bot on GitHub npm Platforms: macOS, Linux, Windows License: MIT Built on pi-durable Node 24+

⭐ If Pots is useful to you, a star helps other people find it.

Tip

Setting this up with Claude Code, Codex or Cursor? Have it read docs/for-agents.md first. The agent installs Pots and makes the bot, you sign in with pots login, and the bot connects your chat apps itself.

On Telegram, someone texts their Pots bot Juno: mouse just died, find me one I can grab tonight. On their PC, Juno checks two shops and finds one in stock 10 minutes away, $148, down from $270. They reply: grabbing it, set it up on my PC? Juno installs the mouse software and says it is ready when they get home.

Real chats of Colin, who builds Pots, redrawn with made-up names. Watch the whole 42-second film with sound

Send it a job

Ask from your phone. It does the legwork on its own computer and tells you what it found. 10+ companies use it too.

The chat apps you already use

Slack, Discord, Telegram, Feishu/Lark and WeChat, with Microsoft Teams and WhatsApp as previews; QQ is next. What works where.

Tell it which app. It sets itself up there: Slack, Discord, Telegram, Feishu/Lark, WeChat, Teams (preview) and WhatsApp (preview). One bot in several apps at once, one memory across all of them.

The AI you already pay for

Sign in with the subscription you have, or use an API key or a local model. Choose the models.

Already pay for ChatGPT or Claude? It runs on that. Your subscription: ChatGPT, Claude, Google AI Pro, GitHub Copilot, Grok, Kimi and more. Or an API key from 40+ providers, or any OpenAI-compatible endpoint. Or a local model on your own machine: Ollama, LM Studio, llama.cpp. Sign in once with pots login, or from your phone on a link it sends.

When it needs you, it texts you a link

When it hits a step only you can do, like a code sent to your phone or a captcha, it texts you a link. Open it and you're on its screen. Do the step, tap Done, and it takes it from there. Passwords and API keys get a one-time page of their own, so they stay out of the chat.

A real recording on a phone: the bot texts a link because Acme wants a 6-digit code. The phone opens the link and shows the bot's screen at Acme's two-step verification. The code is typed on the phone, Acme signs in, the person taps Done, hands back to the bot, and the bot sends last month's invoice.
A real recording of Pots 0.9 on a demo site.

It works in group chats

Give each bot its own job. With a judge set, a busy room barely touches your limits. On Slack, Discord and Feishu/Lark the bots also hear each other.

A Slack channel with two people and two bots, Rex for dev and Ivy for marketing. Maya says signup is broken on mobile: that wakes Rex, who fixes and deploys it. Leo asks about lunch: that wakes no one. Leo asks for a changelog post: that wakes Ivy, who drafts it and waits for an OK. Beside it: a small, fast model reads each message and wakes only the bot it's for; one of our bots, in one week, 54 of 58 messages never woke it.

It keeps going

When its model hits a usage limit, it says when it'll be back and carries on by itself. Kill it mid-task, and it picks up where it stopped. When a job needs paying, it waits for your OK.

Left: the bot says I am stuck: my model's usage limit is reached. I will carry on by myself at about 15:00 (GMT+11). After 15:00 it sends the weekly report. Right: at a $5.00 API top-up with Visa ending 4242, the bot asks OK to pay?, the person says ok, go, and it is paid after the OK.

It works on a locked Windows PC too.

Got a Windows PC? Leave it locked and go out. 1: it unlocks it with your PIN. 2: it does the job, here installing an app. 3: it locks it again. Windows asks for admin once, at install, and its screen on your phone works there too.

Open and yours

Grok Bot, OpenAI dots, Claude Duet, Claude Tag and Meta Muse are closed products. They run on someone else's computer, with someone else's model, inside the apps they chose. pi-durable-bot is MIT-licensed and runs where you put it.

pi-durable-bot Grok Bot (SpaceXSI) dots (OpenAI) Claude Duet (Anthropic) Claude Tag (Anthropic) Muse (Meta)
Source code Open, MIT Closed Closed Closed Closed Closed
Where it runs Your server, your VM, your office box SpaceXSI's cloud OpenAI's cloud Anthropic's cloud Anthropic's cloud Meta's cloud
Model Any: your subscription login, 40+ providers, or a local model Grok OpenAI's Claude Claude Meta's
Where you talk to it Slack, Discord, Telegram, Feishu and Lark, personal WeChat, Microsoft Teams and WhatsApp (previews); QQ next (Channels) Desktop and mobile apps, X; Slack and Teams for team bots ChatGPT, Slack, Teams Its own app Slack Web, mobile app, WhatsApp
Your data Stays on your machine, in each bot's folder Sent to SpaceXSI Sent to OpenAI Sent to Anthropic Sent to Anthropic Sent to Meta
Custom work Anything. Change the code, add tools, connect your own systems What the vendor allows What the vendor allows What the vendor allows What the vendor allows What the vendor allows

The other products as their makers described them in public, November 2026 (Grok Bot's maker and where you talk to it, December 2026); they may have changed since. Grok Bot, dots, Claude Duet, Claude Tag and Muse are products of SpaceXSI (formerly xAI), OpenAI, Anthropic and Meta. pi-durable-bot is not affiliated with any of them.

Any model. Log in once with a subscription you already pay for, use an API key from any of the 40+ providers pi supports, point it at any OpenAI-compatible endpoint (vLLM, SGLang, a proxy), or run a local model with Ollama, LM Studio or llama.cpp. The bot uses pi's own model layer, so every model pi can use, the bot can use. With a local model for the agent and the judge, nothing leaves your machine. You are not locked to one model vendor.

Any channel. The core speaks in five plain words: channel, place, thread, message, person. Platform details stay inside one adapter per platform. Slack, Discord, Telegram, Feishu and Lark, and personal WeChat work today, and Microsoft Teams and WhatsApp as previews; a new platform is one more adapter, not a rewrite. One bot can be in many channels and stays the same person everywhere. What works where.

Your business. Give it your own tools, data and workflows. It can run several bots on one machine, each with its own name, persona, responsibilities and memory. A bot can even edit its own definition, or create a new bot.

Compared with a chat bot

Most AI bots are a command line with a chat bubble. You @ them, they answer, they forget. pi-durable-bot works differently.

A chat bot pi-durable-bot
What it sees The message that mentions it Messages, edits and reactions in the places it was invited to, and the inboxes and pages it watches
When it acts When you @ it When it decides it should. It can also answer when you @ it
What it remembers This thread, maybe One long memory across every channel, kept on disk
How it works Calls the tools someone wired in Writes and runs its own code on its own computer
What happens later Nothing It sets its own reminders and comes back
After a crash Starts over, or sends twice Picks up where it stopped. Never sends the same message twice on Slack. A crash at the moment of a send can send it twice on Telegram, Teams, WeChat and WhatsApp, on Discord when the bot is back more than a few minutes later, and on Feishu and Lark more than an hour later (see why)

What it does

📥 Its own inbox

Every message in every place you invite it to lands in one inbox: channel messages that never mention it, edits, deletions, reactions, people joining, and its own messages. It keeps all of it in a local SQLite log and reads that log with SQL whenever it needs context. Nothing is thrown away when a conversation gets long.

🧠 Its own judgment

It is woken in three ways, the same three ways a person notices work:

Like a coworker who... How
Someone asks gets a message or an @ A mention or a DM wakes it at once
It notices overhears something that is their job Every message that does not mention it comes to it too, and it decides itself whether it is about its work. You can also set a judge that reads these messages first and asks two questions: is this about me? and should I respond? It sees the bot's own list of responsibilities. The judge is a fast classifier such as TypeSafe's Jev, a local model, or the bot's own model
It looks around looks around now and then, unasked, and keeps promises A few times a day a helper of its own looks for what you would want to know or have done, with its memory, the message log and its tools, and tells the bot only when it finds something. The bot also sets its own timed wakes and routines: "check Acme's pricing every Monday", "follow up at 5 pm"

Being woken is not the same as speaking. Each time, the agent reads the log and decides if it should say anything, where, and when. Most of the time the right answer is to stay quiet.

💻 Its own computer

It has a real machine with a shell, files, the internet, and a screen it uses like a person: the browser and the apps on it, with the mouse and keyboard. It does not wait for a plugin. It writes the script it needs, runs it, fixes it, and keeps the useful ones. That covers research, spreadsheets, reports, monitoring a web page, filling a form, or booking a flight, and also code.

This is code mode: the agent gets a few general tools (read, write, edit, bash, grep, find, screen) plus three channel actions (send, react, call), and builds the rest itself. One more tool, task, hands work to its helpers (below). With codemode, pi's code mode, it writes a JavaScript script that calls these tools and the tools of MCP servers in a sandbox; only what the script returns comes back to it.

More in docs/computer.md: grep and find, the screen and who holds it, masked secrets, Windows' administrator commands and lock screen, and a systemd scope per command on Linux.

👥 Its own helpers

Longer work does not keep it from talking. With its task tool the bot starts children: agents that work in the background with read, write, edit, bash, grep, find, screen, codemode and task, without the channel actions, on a brief it writes for them. It answers the person first, hands the work to a child, and stays free for the next message.

It works like a pi session: it reads AGENTS.md and uses Agent Skills from the same places pi does, so the skills you give pi, the bot can use too. Screenshots and photos are shrunk to fit the model, as in pi.

More in docs/helpers.md: what a child keeps and reports, children of children, wait, and how the bot chooses each child's model.

💬 Its own voice

When it speaks, it speaks like a teammate: in the right channel or thread, in its own words, with the file attached. It can reply in a thread, start a new message, DM a person, add a reaction, edit its own message, or call any other platform API.

🪟 Its own pages

Some things do not fit in a chat message. For a plan, a report or a dashboard, the bot writes a web page and sends a link. Each page gets its own layout and look, made for who reads it and what they do with it. The bot picks the best form for each piece of information (a chart, a calendar, a table to sort and search, a calculator, a map), uses the width of a computer and one column on a phone, and looks at the page before it sends it. A page can ask, too: people choose, comment, fill in, approve or reject on it, and each answer wakes the bot at once.

  • Buttons and forms in the chat. On Slack and Discord the bot sends the platform's own buttons, menus and forms; on Telegram, inline buttons; on Teams, Adaptive Cards; on Feishu and Lark, cards with buttons and forms.
  • A password page for secrets. When the bot needs an API key from you, it sends a one-time link to a page of Pots' own. You type the key there. It goes into a file in the secrets folder, never into the chat, the log or a trace.
  • A desktop page for the steps only you can do. When a sign-in, a CAPTCHA or an approval needs you, the bot sends a one-time link. On your phone or computer you see its whole screen, do the step, and press Done; the bot is woken with your note and carries on.
  • A login page for models. When a model login expires, or you want another model or a judge, the bot sends a one-time link.
  • No public address needed. The first link starts a Cloudflare Quick Tunnel, so pages work from a laptop behind a home router.

More in docs/pages.md: the desktop page on a phone, the login page, and a fixed address for the links.

⏰ Its own schedule

It promises to come back, and it does. A timed wake (pots wake) wakes it once, at a time it chooses. A routine (pots routine) repeats: every 30 minutes, say, or on a cron schedule in the computer's time zone. Both live in the same database as everything else, so they survive restarts. It can also add normal cron jobs on its machine.

More in docs/schedule.md: the pots routine command, runs that fail, and look, the routine each bot gets at its first start.

📓 Its own memory

Each bot has one long conversation, across every channel. Its memory is plain markdown files, one per memory, and an index, MEMORY.md, that the bot sees at the start of every page and that points to them. Each bot has its own memory, in memory/ in its folder, and the bots of one computer share one more, in ~/.pots/memory/, for facts about you. "Remember this" and "forget that" work by talking to it; to forget is to delete the file.

When the context gets full, the bot decides when to turn the page: it writes notes for itself, starts a fresh context, and the notes and the memory come with it. The full message log stays on disk, so nothing is lost. Its AGENTS.md, its responsibilities and its notes are plain files it edits itself.

More in docs/memory.md: what a memory file holds, the tidy, and the extraction pass.

🛟 Durable by design

Built on pi-durable, every step is journaled. Kill the process in the middle of a task and it continues after restart. Every incoming event is written to disk before it is acknowledged. Every outgoing message carries a send ID, and after a crash the bot checks whether the message already went out before it sends again, where the platform lets it (Slack; Discord, Feishu and Lark for a while; see Status). Messages to one place go out in the order the bot sent them, each once the one before it is posted, so a reply in several messages reads in order; sends to other places do not wait.

When the model cannot answer

The network drops, the provider is slow or overloaded, or a usage limit is reached. The bot's work does not end there: the run waits and asks its model again, 2, 4, 8 … 256 seconds apart, then every 5 minutes, and goes on where it stopped once the model answers. The messages, timed wakes and child reports that come meanwhile wait behind it, and none is used up. Children wait the same way. Each failed try is in the conversation's journal, so the waiting goes on across restarts.

More in docs/when-the-model-cannot-answer.md: a wait time that the provider names, when a run stops, what people see, and the lines Pots posts for the bot, also in its people's language.

Channels

One bot can be in several chat apps at once, with one memory. Tell it which app to join; it sets itself up there and asks you only for what it cannot do.

Best for a team: Slack, Discord, and Feishu and Lark. There the bot reads every message of a group, anyone on the team can talk to it, and bots hear each other, so several can work together in one group. Telegram works for groups, but its bots hear each other only once Telegram's Bot-to-Bot Communication Mode is on. Personal WeChat is for one person and one bot. WhatsApp is a business number that each person talks with apart.

The bot also talks with you in the terminal of its computer (pots chat). QQ is next. Want another app? Open an issue. Each app is one adapter in src/channels/; the core stays the same.

Every app side by side, with what each one cannot do and how it connects: docs/channels.md.

Quick start

Important

The bot gets full control of the computer it runs on, with no approval step. Give it a computer or VM of its own.

You need Node.js 24 or newer, on macOS, Linux or Windows (with Git for Windows).

npm install -g pi-durable-bot
pots init

On Windows, run them in cmd, or in PowerShell as npm.cmd and pots.cmd: PowerShell's default policy refuses the .ps1 scripts that npm makes for them.

pots init asks four things:

  1. Your bot's name.
  2. Its AI. Sign in with a subscription you already pay for (ChatGPT, Claude, Google AI Pro or Ultra, GitHub Copilot, Grok, Kimi and more), use an API key, or point it at a local server (Ollama, LM Studio, llama.cpp).
  3. Who decides on group messages that do not mention it. By default the bot itself: every such message wakes it. Or Jev, a fast judge from TypeSafe, with your TypeSafe API key, or a judge model you already set up in pi; the bot then wakes only for the messages about its work.
  4. In one sentence, what it is for. Optional. The bot writes its own persona and responsibilities from it.

Then the gateway starts as a background service (it starts again at login) and you are talking to your bot in the terminal. On Windows, Windows asks once whether to let Pots make changes: with Yes, the bot runs administrator commands without a prompt each time, as sudo without a password does on Linux. The bot first checks that it can use the computer's screen and walks you through any permission it needs, such as Screen Recording and Accessibility on a Mac. On a server with no desktop, it works without a screen and asks you before it sets one up. Tell it which chat apps to join. It sets them up itself on its computer and signs in with what the computer has, such as your accounts in its browser and your password manager. It asks you only for what it cannot do, like a code that comes to your phone or an admin's approval. Leave with Ctrl+C; come back with pots chat.

It works in the places it is in, like a new hire who is added to the right channels. On Slack it can also join public channels and create channels itself; a private channel needs an invite.

To add another bot, ask a bot you have to make one, or run pots bot new <name> --about "<what it is for>". The new bot sets itself up the same way, and when another bot already uses the screen, it offers to set up one of its own (Add another bot).

Command What it does
pots init Set up your first bot, or another one
pots login Sign in to models and judges, or add API keys or local servers, one after another, for every bot on this computer; --list shows what can be used; --link prints a link to a login page instead, for a person on any device
pots mcp add | remove | list | login | logout The MCP servers of every bot on this computer, and sign-ins to them
pots chat Talk to a bot in this terminal
pots status The gateway, the service and each bot
pots service install | uninstall | restart | logs The gateway as a background service: launchd on macOS, systemd on Linux (--system for a server), Task Scheduler on Windows. restart waits until the new gateway runs, then says its version and which bots run
pots start Run the gateway in this terminal instead
pots bot new | list Create and list bots
pots trace What a bot did: its last wakes, or one wake from the events to its run, the runs of the children it started, and the messages it sent, with how much of each model request the provider's prompt cache served
pots admin <command> Windows: run a command as administrator without Windows' prompt; --check says whether it works, --setup asks Windows for it once
pots children [--stop <id> | --stop-all] The children a bot started for longer work, with each one's thinking level, the model the bot chose for it, and what each one that works does now, or stop them

To upgrade, run npm install -g pi-durable-bot@latest, then pots service restart. To remove it, run pots service uninstall, then npm uninstall -g pi-durable-bot. The bots stay in ~/.pots/ until you delete that folder.

Choose the models

pots init sets up the model, and pots login signs in to others or adds keys, one after another, for every bot on the computer. Each bot's bot.json names its model and, if you want one, a judge, and you can change them at any time; edits apply within seconds. Logins, API keys and local endpoints are stored in pi's files in ~/.pi/agent/, so the pi command line, if you use it, shares them.

The bot's children, which do its longer work, have the bot's model unless it chooses another one for a child, by the work, with Pots' notes on the models signed in. At its first start it asks you which models you want for which work, and your answer comes first; sign in to those with pots login too.

More in docs/models.md: the fields of bot.json and the judges, a proxy, OpenAI-compatible and local endpoints, llama.cpp, providers from pi extensions, Gemini on a Google AI Pro or Ultra subscription, and images.

MCP servers

The bot uses MCP servers through pi's own MCP support. They are set in pi's files: ~/.pi/agent/mcp.json for every bot on the computer and the pi command line, and .pi/mcp.json in a bot's workspace/ for that bot alone.

More in docs/computer.md: the pots mcp commands and sign-ins.

How it decides to act

flowchart LR
  E[New event] --> L[(Message log)]
  E --> F{On its channel's<br/>wakeFrom, if set?}
  F -- no --> X[Only logged:<br/>who, where, when]
  F -- yes --> M{Mention or DM?}
  M -- yes --> W[Wake the agent]
  M -- no --> J{Judge, if set:<br/>about me?<br/>need to respond?}
  J -- yes --> W
  J -- no --> Q[Stay quiet, remember it]
  T[Its own timers] --> W
  W --> A{Agent reads the wake<br/>and decides}
  A --> S[Speak, react or act]
  A --> N[Do nothing]
Loading
  • A mention or a DM wakes it at once, with the messages of that place that were waiting. Other messages that arrive close together are grouped: it waits 3 seconds after the last one (20 seconds at most) before it decides.
  • If it is already working in a place, itself or with a child, new messages there are handed to it as it works, so it can change course.

More in docs/how-it-works.md: who may wake it (wakeFrom), when people see it typing, and what a wake gives the bot.

How it works

flowchart LR
  subgraph Adapters[Channel adapters]
    S[Slack]
    D[Discord]
    TG[Telegram]
    MT[Teams]
    FS[Feishu / Lark]
    WX[WeChat]
    WA[WhatsApp]
    T[Terminal]
  end
  subgraph Gateway[Gateway core, one per bot]
    I[Inbox] --> G[(Message log)]
    G --> K[Waker]
    O[Outbox]
  end
  subgraph Bot[Bot]
    P[Persona, responsibilities, notes, timers]
    A[pi-durable agent<br/>read write edit bash screen<br/>send react call task codemode]
    C[Children<br/>read write edit bash screen codemode]
    A --> C
  end
  S --> I
  D --> I
  TG --> I
  MT --> I
  FS --> I
  WX --> I
  WA --> I
  T --> I
  K --> A
  A --> O
  O --> S
  O --> D
  O --> TG
  O --> MT
  O --> FS
  O --> WX
  O --> WA
  O --> T
Loading
Layer Job
Channel adapter One per channel account. Translates events in and actions out, backfills what it missed. Platform concepts never leave this layer.
Gateway core Inbox, message log, waker and outbox. The same for every platform.
Bot Identity, persona, responsibilities, notes, timers, workspace and one long conversation.
Agent pi-durable: runs the model, journals every step, owns the tools.

One gateway process runs every bot on the machine. Everything lives in ~/.pots/ (or $POTS_HOME): one folder per bot in bots/, channel tokens in secrets/, the memory the bots share about you in memory/, the gateway's output in logs/ on macOS and Windows (on Linux, pots service logs reads the journal).

More in docs/how-it-works.md: the bot's folder, the pots commands the bot uses, and the prompt cache.

Status

pi-durable-bot runs every day as a teammate in a real workspace.

What works today, app by app, and what is next: docs/status.md.

Develop

git clone https://github.com/Crokily/pi-durable-bot && cd pi-durable-bot
npm install
npm run pots -- status    # the pots command, straight from src/ (Node 24 runs TypeScript)
npm run check             # type check
npm test                  # tests, including a real gateway with a fake model
npm run tla               # the TLA+ models of the inbox, outbox, waker and a model that fails (needs Java and tla2tools.jar)

npm run build writes the JavaScript that the npm package ships to dist/. Set POTS_HOME to try things without touching ~/.pots/. With OTEL_EXPORTER_OTLP_ENDPOINT set, the gateway also sends its traces to any OpenTelemetry tool (Jaeger, Grafana Tempo, Honeycomb). Tests, the TLA+ models and traces in detail: docs/development.md. Coding agents: read AGENTS.md; to open an issue or a pull request, also CONTRIBUTING.md. Agents that set Pots up for someone: read docs/for-agents.md.

Star history

Star history of pi-durable-bot

As seen on Open Source Alternatives

Built on

  • pi-durable for the durable agent runtime
  • Chat SDK for channel adapters
  • pi's model layer for logins, providers and local models
  • Effect for the gateway core and the pots command line
  • TypeSafe AI's Jev, one of the judges you can choose

Official accounts

Warning

Heads up: Pots has no coin, token or airdrop, and never will. Accounts impersonating Pots (such as @potsdotsh on X) are promoting a "$POTS" coin. It is not ours; please don't get scammed. Official accounts: @PotsSh and @Crokily_.

Sponsoring Colin on GitHub Sponsors is the only official way to support Pots.

License

MIT. The demo video, music, sky images and logo in docs/media were made for this project and use the same license.

On Windows, Pots downloads UltraVNC 1.8.3.2 (GPL-3.0) from uvnc.eu the first time a bot needs it; Pots does not ship it.

The desktop page bundles noVNC 1.7.0 in kit/desktop/novnc.js, under the MPL 2.0, with the MIT-licensed pako in it; their license texts are in kit/desktop/novnc/. node scripts/vendor-novnc.ts builds that file from noVNC's release.

About

The open-source Grok Bot, without the app. The full personal agent, right inside the chat apps you already use, on the AI subscription you already pay for.

Topics

Resources

Contributing

Stars

333 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages