pi-durable-bot 0.3.3 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +46 -21
- package/dist/agent/agent.js +433 -13
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/children.js +254 -0
- package/dist/agent/children.js.map +1 -0
- package/dist/agent/memory.js +573 -0
- package/dist/agent/memory.js.map +1 -0
- package/dist/agent/screen.js +220 -0
- package/dist/agent/screen.js.map +1 -0
- package/dist/bot/bot.js +162 -27
- package/dist/bot/bot.js.map +1 -1
- package/dist/bot/definition.js +30 -3
- package/dist/bot/definition.js.map +1 -1
- package/dist/bot/machine.js +6 -6
- package/dist/bot/machine.js.map +1 -1
- package/dist/bot/memory.js +186 -0
- package/dist/bot/memory.js.map +1 -0
- package/dist/bot/prompt.js +304 -35
- package/dist/bot/prompt.js.map +1 -1
- package/dist/channels/slack/index.js +24 -0
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/channels/test/index.js +9 -2
- package/dist/channels/test/index.js.map +1 -1
- package/dist/cli/agent.js +14 -1
- package/dist/cli/agent.js.map +1 -1
- package/dist/cli/ai.js +101 -11
- package/dist/cli/ai.js.map +1 -1
- package/dist/cli/bots.js +1 -1
- package/dist/cli/bots.js.map +1 -1
- package/dist/cli/commands.js +10 -5
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/init.js +11 -7
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/trace.js +87 -15
- package/dist/cli/trace.js.map +1 -1
- package/dist/core/channel.js +2 -0
- package/dist/core/channel.js.map +1 -1
- package/dist/core/home.js +2 -0
- package/dist/core/home.js.map +1 -1
- package/dist/core/time.js +18 -0
- package/dist/core/time.js.map +1 -0
- package/dist/core/version.js +4 -0
- package/dist/core/version.js.map +1 -0
- package/dist/gateway/config.js.map +1 -1
- package/dist/gateway/files.js +245 -0
- package/dist/gateway/files.js.map +1 -0
- package/dist/gateway/gateway.js +21 -3
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/log.js +7 -2
- package/dist/gateway/log.js.map +1 -1
- package/dist/gateway/tracing.js +1 -3
- package/dist/gateway/tracing.js.map +1 -1
- package/dist/gateway/waker.js +88 -8
- package/dist/gateway/waker.js.map +1 -1
- package/docs/for-agents.md +6 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of pi-durable-bot (Pots). To upgrade, run `npm install -g pi-durable-bot@latest`, then `pots service restart`.
|
|
4
4
|
|
|
5
|
+
## 0.4.1 (2026-11-05)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **`pots init` asks who decides on group messages that do not mention the bot:** the bot itself (the default: every such message wakes it), Jev from TypeSafe with your TypeSafe API key, or a judge model you already set up in pi. Pots tries the judge with one message before it makes the bot. `--judge` gives the answer without the question.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **A mention or a DM wakes the bot at once.** The bot used to wait 3 seconds after the last message of a place, also when someone was waiting for it. Now a mention or a DM wakes it when it comes, with the messages of that place that were waiting; what comes after reaches it while it works there. In our test on Slack, a DM "ping" got its reply in about 10 seconds instead of about 33. Other messages are grouped as before.
|
|
12
|
+
|
|
13
|
+
## 0.4.0 (2026-11-04)
|
|
14
|
+
|
|
15
|
+
A bot that works like a coworker: it hands longer work to helpers in the background, remembers by itself as Claude Code does, sees each new message in its wake, and keeps the start of its requests the same, so the provider's prompt cache serves most of them.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Children: helpers for longer work.** With its new `task` tool the bot starts children: agents that work in the background with `read`, `write`, `edit`, `bash` and `screen`, on a brief the bot writes. The bot answers the person first and stays free to talk. A child's final message comes back to the bot once, also across crashes and restarts. The bot chooses each child's thinking level: `high`, `xhigh` or `max`. New in `bot.json`: `childModel`, `childThinking` (`xhigh` by default) and `settings.maxChildren` (50 by default). `pots children` lists the children and stops them, and `pots status` shows how many work.
|
|
19
|
+
- **Automatic memory, as in Claude Code.** Each bot has a `memory/` folder of markdown files with a `MEMORY.md` index, and the bots of one computer share `~/.pots/memory/`. The bot sees the indexes at the start of every page and saves what is worth keeping. After each piece of work, a pass in the background, continuing the same conversation, saves what it missed; once a day, after 5 changes, a dream tidies the memory up. Code lets these passes change nothing but the memory files. `"settings": {"autoMemory": false}` in `bot.json` turns the memory off.
|
|
20
|
+
- **The `screen` tool.** `screen` runs commands as `bash` does, with the screen's environment, and holds the screen for one agent at a time; another agent learns who has it and since when. On Linux, plain `bash` no longer gets `DISPLAY`, `XAUTHORITY` or `WAYLAND_DISPLAY`. On macOS and Windows the screen does not need those variables, so there only the prompt keeps agents to `screen`. A bot that sets up its own desktop writes it into `screen` in its `bot.json`.
|
|
21
|
+
- **Wakes carry the messages.** Each wake has the text of each new message (and whether it was edited or deleted), the start of its thread, and its files. Pots downloads a message's files when the message comes, up to 10 MB each, into `files/tmp/` in the bot's folder, and deletes them there 30 days later. A larger file, or one not saved within 10 seconds, is given by its URL. The message log keeps the URL of every file, so the bot can download it again.
|
|
22
|
+
- **`pots trace` and `pots context` show the prompt cache:** how much of the input the provider's cache served, and what the requests that missed it cost.
|
|
23
|
+
- `thinking` in `bot.json` also takes `max`. A level the model does not have becomes the nearest one it has, as in pi.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- **The judge is `off` by default.** A bot whose `bot.json` has no `judge` now gets every message that does not mention it, and decides itself. It used to be `main`. To keep that, set `"judge": "main"`, or use a fast classifier such as `typesafe/jev-latest`.
|
|
27
|
+
- **The start of each request stays the same.** The bot's own prompt sections keep their text for the whole page: a change, such as a new `settings` value, shows after the page turns, after pi compacts, or once after an upgrade. The bot's address in each channel is now in the wake, and the bot runs `sudo -n true` itself to learn whether sudo needs a password.
|
|
28
|
+
- **The messages of one place reach the bot in the order they came,** also when an earlier one waits for its files.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
- **A sign-in opens the page with `$BROWSER` when it is set, on macOS and Windows too.** On macOS it is read as xdg-open reads it, a list of commands split by `:`; on Windows as one program; on Linux xdg-open reads it, as before. The tests set it, so they no longer open real browser tabs on a Mac.
|
|
32
|
+
- **`pots init` ends when it is done, also after a browser sign-in.** It printed "Start the gateway with pots start" and then did not end for minutes: pi's sign-in server left open a connection the browser had opened ahead of time. Now a `pots` command ends when its work is done and its output is written. `pots start`, `pots chat` and `pots service logs --follow` run as before.
|
|
33
|
+
|
|
5
34
|
## 0.3.3 (2026-11-03)
|
|
6
35
|
|
|
7
36
|
A bot whose model fails says so in the chat, and the local server step of `pots init` writes where pi reads.
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ It is woken in three ways, the same three ways a person notices work:
|
|
|
55
55
|
| | Like a coworker who... | How |
|
|
56
56
|
|---|---|---|
|
|
57
57
|
| **Someone asks** | gets a message or an @ | A mention or a DM wakes it at once (after a short pause, so you can finish typing) |
|
|
58
|
-
| **It notices** | overhears something that is their job |
|
|
58
|
+
| **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 |
|
|
59
59
|
| **It checks in** | looks around now and then, and keeps promises | It sets its own timed wakes: "check Acme's pricing every Monday", "follow up at 5 pm". If it has none, it looks around every two hours |
|
|
60
60
|
|
|
61
61
|
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.
|
|
@@ -64,7 +64,17 @@ Being woken is not the same as speaking. Each time, the agent reads the log and
|
|
|
64
64
|
|
|
65
65
|
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.
|
|
66
66
|
|
|
67
|
-
This is **code mode**: the agent gets a few general tools (`read`, `write`, `edit`, `bash`) plus three channel actions (`send`, `react`, `call`), and builds the rest itself.
|
|
67
|
+
This is **code mode**: the agent gets a few general tools (`read`, `write`, `edit`, `bash`, `screen`) plus three channel actions (`send`, `react`, `call`), and builds the rest itself. One more tool, `task`, hands work to its helpers (below).
|
|
68
|
+
|
|
69
|
+
`screen` is `bash` with the screen's environment, such as `DISPLAY`; `bash` does not have it. A screen runs one task at a time, as a person's desktop does: the first `screen` command of an agent takes the screen until its work ends, also across bots and the Pots processes of the same user on the machine. Another agent that tries then learns who has it, since when, and when it frees, and decides itself what to do. A bot that sets up its own desktop, such as an Xvfb display, writes its environment into `screen` in its `bot.json`.
|
|
70
|
+
|
|
71
|
+
One agent at a time per screen is enforced only on Linux, where plain `bash` has no `DISPLAY` or `WAYLAND_DISPLAY` and so cannot reach the screen. On macOS and Windows the screen does not depend on those variables, so `bash` can still use it; there the agents use the `screen` tool because the prompt tells them to.
|
|
72
|
+
|
|
73
|
+
### 👥 Its own helpers
|
|
74
|
+
|
|
75
|
+
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` and `screen`, without the channel actions and `task`, 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. A child starts from an empty conversation and its brief, so the bot's own context stays small; it sees the bot's memory index as it was when it started. When a child ends, done, failed or with a question for a person, its final message comes back to the bot as a wake, exactly once, also across crashes and restarts; the bot passes on what matters, and sends the child the answer to its question. While a child works for a place, new messages there go to the bot, so it can pass them on. Its timed and fallback wakes list the children that work and how long each has run. A stopped child reports nothing and does nothing more, also when the process dies in the middle of the stop.
|
|
76
|
+
|
|
77
|
+
Children use the bot's model, or the `childModel` of `bot.json`; a change counts for new children and those that exist, also when `childModel` is taken out. The bot chooses each child's thinking level when it starts it: `high`, `xhigh` or `max`, and without a choice the `childThinking` of `bot.json` (`xhigh` by default). A child keeps its level for its whole life, so a new `childThinking` counts for new children only; a level the model does not have becomes the nearest one it has, as in pi. `settings.maxChildren` (50 by default) caps how many work at once. `pots children` lists them, and `pots children --stop <id>` or `--stop-all` stops them.
|
|
68
78
|
|
|
69
79
|
It works like a [pi](https://github.com/earendil-works/pi) session: it reads `AGENTS.md` and uses [Agent Skills](https://agentskills.io) 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.
|
|
70
80
|
|
|
@@ -78,7 +88,9 @@ It promises to come back, and it does. Timed wakes live in the same database as
|
|
|
78
88
|
|
|
79
89
|
### 📓 Its own memory
|
|
80
90
|
|
|
81
|
-
Each bot has one long conversation, across every channel.
|
|
91
|
+
Each bot has one long conversation, across every channel. Its **memory** works as Claude Code's automatic memory: 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. The bot saves what is worth keeping (preferences, rules, facts about people and the work, decisions) when it sees it, and after each piece of work its own model, continuing the same conversation in the background, saves what it missed. That pass never sends a message or holds up a reply, its request starts as the bot's last one did, so the provider's prompt cache serves most of it, and code lets it change nothing but the memory. Once a day, after enough changes, a dream tidies the memory up the same way. The bot's next wake says what a pass or a dream changed; as in Claude Code, a restart before that wake loses the note, not the memory. A memory file read two days or more after it changed says how old it is. 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, as in Claude Code. `"settings": {"autoMemory": false}` in `bot.json` turns the memory off.
|
|
92
|
+
|
|
93
|
+
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.
|
|
82
94
|
|
|
83
95
|
### 🛟 Durable by design
|
|
84
96
|
|
|
@@ -93,7 +105,7 @@ Grok Bot, dots, Muse and Claude Duet are closed products. They run on someone el
|
|
|
93
105
|
| Source code | Closed | Open, MIT |
|
|
94
106
|
| Where it runs | The vendor's cloud | Your server, your VM, your office box |
|
|
95
107
|
| Model | The vendor's | Your subscription login, any of 40+ providers, or a local model |
|
|
96
|
-
| Your data | Sent to the vendor | Stays on your machine in
|
|
108
|
+
| Your data | Sent to the vendor | Stays on your machine, in each bot's folder |
|
|
97
109
|
| Channels | The ones the vendor supports | Any channel with a [Chat SDK](https://chat-sdk.dev) adapter |
|
|
98
110
|
| Custom work | What the vendor allows | Anything. Change the code, add tools, connect your own systems |
|
|
99
111
|
|
|
@@ -115,11 +127,12 @@ npm install -g pi-durable-bot
|
|
|
115
127
|
pots init
|
|
116
128
|
```
|
|
117
129
|
|
|
118
|
-
`pots init` asks
|
|
130
|
+
`pots init` asks four things:
|
|
119
131
|
|
|
120
132
|
1. **Your bot's name.**
|
|
121
133
|
2. **Its AI.** Sign in with a subscription you already pay for (ChatGPT, Claude, GitHub Copilot, Grok, Kimi and more), use an API key, or point it at a local server (Ollama, LM Studio, llama.cpp).
|
|
122
|
-
3. **
|
|
134
|
+
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.
|
|
135
|
+
4. **In one sentence, what it is for.** Optional. The bot writes its own persona and responsibilities from it.
|
|
123
136
|
|
|
124
137
|
Then the gateway starts as a background service (it starts again at login) and you are talking to your bot in the terminal. It 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 asks you only for what it cannot do, like signing in to Slack or approving the app. Leave with Ctrl+C; come back with `pots chat`.
|
|
125
138
|
|
|
@@ -133,20 +146,24 @@ It joins only the places it is invited to, like a new hire who is added to the r
|
|
|
133
146
|
| `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 |
|
|
134
147
|
| `pots start` | Run the gateway in this terminal instead |
|
|
135
148
|
| `pots bot new \| list` | Create and list bots |
|
|
136
|
-
| `pots trace` | What a bot did: its last wakes, or one wake from the events to its run and the messages it sent |
|
|
149
|
+
| `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 |
|
|
150
|
+
| `pots children [--stop <id> \| --stop-all]` | The children a bot started for longer work, with each one's thinking level, or stop them |
|
|
137
151
|
|
|
138
152
|
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.
|
|
139
153
|
|
|
140
154
|
### Choose the models
|
|
141
155
|
|
|
142
|
-
`pots init` sets up the model. Each bot's `bot.json` names
|
|
156
|
+
`pots init` sets up the model. 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](https://github.com/earendil-works/pi) command line, if you use it, shares them.
|
|
143
157
|
|
|
144
158
|
| Field | What it does | Values |
|
|
145
159
|
|---|---|---|
|
|
146
160
|
| `model` | The agent that reads, thinks and acts | Any pi model as `provider/modelId`, for example `openai/gpt-6.1-sol` or `anthropic/claude-opus-5-5` |
|
|
147
|
-
| `
|
|
161
|
+
| `thinking` | How hard the agent thinks. A level the model does not have becomes the nearest one it has, as in pi | `off`, `minimal`, `low`, `medium` (default), `high`, `xhigh`, `max` |
|
|
162
|
+
| `childModel` | The model of the children that do longer work in the background | Unset (default): the bot's `model` |
|
|
163
|
+
| `childThinking` | The thinking level of a child the bot starts without choosing one | As `thinking`; `xhigh` (default) |
|
|
164
|
+
| `judge` | Decides which messages that do not mention the bot should wake it | `off` (default): every message wakes the bot, and the agent decides<br>`provider/modelId` of a classifier: `typesafe/jev-latest`, `openrouter/typesafe/jev-1.14`, `opencode/jev-1.13-free`, or a llama.cpp model<br>`main`: the bot's own model judges, no extra account, but slower |
|
|
148
165
|
|
|
149
|
-
A fast classifier is cheaper and quicker than the main model: Jev answers in about 0.3 seconds. With `main`, each group of messages costs one short request to the main model.
|
|
166
|
+
With `off`, each group of messages is a wake of the main model, which then decides. A fast classifier keeps the messages that are not for the bot away from it, and is cheaper and quicker than the main model: Jev answers in about 0.3 seconds. With `main`, each group of messages costs one short request to the main model before the bot hears of it.
|
|
150
167
|
|
|
151
168
|
**OpenAI-compatible and local endpoints** (Ollama, LM Studio, vLLM, a proxy): `pots init` adds them for you. By hand, they go in pi's `~/.pi/agent/models.json` ([fields](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/models.md)):
|
|
152
169
|
|
|
@@ -179,18 +196,18 @@ flowchart LR
|
|
|
179
196
|
E[New event] --> L[(Message log)]
|
|
180
197
|
E --> M{Mention or DM?}
|
|
181
198
|
M -- yes --> W[Wake the agent]
|
|
182
|
-
M -- no --> J{Judge
|
|
199
|
+
M -- no --> J{Judge, if set:<br/>about me?<br/>need to respond?}
|
|
183
200
|
J -- yes --> W
|
|
184
201
|
J -- no --> Q[Stay quiet, remember it]
|
|
185
202
|
T[Its own timers] --> W
|
|
186
|
-
W --> A{Agent reads the
|
|
203
|
+
W --> A{Agent reads the wake<br/>and decides}
|
|
187
204
|
A --> S[Speak, react or act]
|
|
188
205
|
A --> N[Do nothing]
|
|
189
206
|
```
|
|
190
207
|
|
|
191
|
-
-
|
|
192
|
-
- If it is already working in a place, new messages there are handed to it as it works, so it can change course.
|
|
193
|
-
- The wake message says
|
|
208
|
+
- 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.
|
|
209
|
+
- 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.
|
|
210
|
+
- The wake message says where, who, why and when, and gives each new message's text, the start of its thread when it is a reply, and its files. The gateway downloads files as soon as a message comes, into the bot's `files/tmp/`, so the wake gives their paths on the machine; it deletes them 30 days later, and the log keeps each file's name, type, size and URL, so the bot can download it again. A file over 10 MB is not downloaded, and a download that passes 10 MB, when the channel gave no size, stops and is deleted; the wake waits for the other downloads at most 10 seconds past the moment it would go out without them; for a file that is not saved, it gives the URL, and the bot downloads it itself if it needs it. Earlier messages and other details are in the log.
|
|
194
211
|
|
|
195
212
|
## How it works
|
|
196
213
|
|
|
@@ -208,7 +225,9 @@ flowchart LR
|
|
|
208
225
|
end
|
|
209
226
|
subgraph Bot[Bot]
|
|
210
227
|
P[Persona, responsibilities, notes, timers]
|
|
211
|
-
A[pi-durable agent<br/>read write edit bash<br/>send react call]
|
|
228
|
+
A[pi-durable agent<br/>read write edit bash screen<br/>send react call task]
|
|
229
|
+
C[Children<br/>read write edit bash screen]
|
|
230
|
+
A --> C
|
|
212
231
|
end
|
|
213
232
|
S --> I
|
|
214
233
|
T --> I
|
|
@@ -227,19 +246,23 @@ flowchart LR
|
|
|
227
246
|
| Bot | Identity, persona, responsibilities, notes, timers, workspace and one long conversation. |
|
|
228
247
|
| Agent | [pi-durable](https://github.com/earendil-works/pi): runs the model, journals every step, owns the tools. |
|
|
229
248
|
|
|
230
|
-
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 gateway's output in `logs/` on macOS and Windows (on Linux, `pots service logs` reads the journal). Each bot folder holds:
|
|
249
|
+
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). Each bot folder holds:
|
|
231
250
|
|
|
232
251
|
| File | What it is |
|
|
233
252
|
|---|---|
|
|
234
|
-
| `bot.json` | Name, model, judge, channel accounts, settings. Edits apply within seconds. |
|
|
253
|
+
| `bot.json` | Name, model, children's model, judge, channel accounts, its screen, settings. Edits apply within seconds. |
|
|
235
254
|
| `AGENTS.md` | Personality and voice, read the way pi reads AGENTS.md. The bot maintains it. |
|
|
236
255
|
| `responsibilities.md` | What it is responsible for. The judge reads it. The bot maintains it. |
|
|
237
|
-
| `notes.md` |
|
|
256
|
+
| `notes.md` | Its handoff to the next page: what it is doing and what it promised. |
|
|
238
257
|
| `workspace/` | Its working directory. |
|
|
258
|
+
| `files/` | Files people sent in messages, in `files/tmp/`: one folder per message, and in it one numbered folder per file. Pots deletes them 30 days after they were saved, and nothing else in the bot folder; the bot moves or copies out of `files/tmp/` what it keeps. |
|
|
239
259
|
| `terminal/` | Its terminal channel: what you and the bot say in `pots chat`. |
|
|
260
|
+
| `memory/` | Its memory: one markdown file per memory, and `MEMORY.md`, their index. The bot maintains it. |
|
|
240
261
|
| `bot.sqlite` | Message log, timers and the agent's journal in one file. |
|
|
241
262
|
|
|
242
|
-
The same `pots` command gives the bot (and its scripts and cron jobs) its actions from a shell: `pots send`, `pots react`, `pots call`, `pots wake`, `pots context`, `pots turn-page`. Tokens stay inside the running gateway; the agent never sees them.
|
|
263
|
+
The same `pots` command gives the bot (and its scripts and cron jobs) its actions from a shell: `pots send`, `pots react`, `pots call`, `pots wake`, `pots context`, `pots turn-page`, `pots children`. Tokens stay inside the running gateway; the agent never sees them.
|
|
264
|
+
|
|
265
|
+
The bot sends its whole conversation with each model request, so the provider's prompt cache matters: a request whose start the provider has cached costs a fraction. The system prompt holds only facts that stay the same, and the bot's own parts of it, its memory too, keep their text for the whole page; a change, such as a new `settings` value in `bot.json`, shows after the page turns, after pi compacts, or after an upgrade. What changes from one wake to the next, such as the time, the context use and the bot's own address in a channel, is in the wake. `pots trace` and `pots context` show how much of the input the cache served and what the requests that missed it cost.
|
|
243
266
|
|
|
244
267
|
## Status
|
|
245
268
|
|
|
@@ -249,11 +272,13 @@ pi-durable-bot runs every day as a teammate in a real workspace. What works toda
|
|
|
249
272
|
- [x] Mention, DM, judge and timer wakes, grouping, and steering
|
|
250
273
|
- [x] Code mode on its own machine, `pots` command line
|
|
251
274
|
- [x] Turning the page with notes, compaction as a fallback
|
|
275
|
+
- [x] Memory it keeps by itself after each piece of work, its own and one shared about you
|
|
252
276
|
- [x] Crash-safe inbox and outbox, tested with a forced crash mid-send
|
|
253
277
|
- [x] Several bots per machine
|
|
254
|
-
- [x] `pots init`: name, AI and one sentence, then the bot sets up its own chat apps from the terminal
|
|
278
|
+
- [x] `pots init`: name, AI, judge and one sentence, then the bot sets up its own chat apps from the terminal
|
|
255
279
|
- [x] macOS, Linux and Windows, as a background service of the user
|
|
256
280
|
- [x] The screen, mouse and keyboard of its computer, used like a person (computer use), or no screen on a server
|
|
281
|
+
- [x] Children for longer work in the background, reported back once, also across restarts
|
|
257
282
|
- [x] Any model pi can use: subscription logins, API keys, OpenAI-compatible endpoints, local models
|
|
258
283
|
- [x] A judge you choose: the bot's own model, Jev or another classifier, a local llama.cpp model, or none
|
|
259
284
|
- [x] `AGENTS.md`, Agent Skills and images as in a pi session
|