Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Docs: list the relay's four requests and the inbox data flow

Ousmane Touréd0871756423f
diff --git a/docs/cloud-pro.md b/docs/cloud-pro.md
index 242336e707..a6f1327aee 100644
--- a/docs/cloud-pro.md
+++ b/docs/cloud-pro.md
@@ -1408,16 +1408,24 @@ computers belong to this machine on every request.
`OMB_ELEVENLABS_API` or `decider.baseUrl` when set, for development and
tests, else Boat's, ElevenLabs' and Jev's own APIs) and an included token
only to its relay, whatever those settings say.
-- **The decision relay takes two requests, and the app sends it nothing
- else.** Through the included token the app sends only room routing's
- request (one question `answer`, a choice with the fixed instructions in
- `server/decider/room-routing.ts`, and state keys `room`, `humans_in_room`,
- `bots_in_room`, `new_message` and, when there are recent lines,
- `recent_messages`) and the Settings key check's fixed request, within the
- relay's caps (a body of at most 64 KiB, a state of at most 24,000 bytes as
- JSON). `server/decider/relay.ts` checks each request before it is sent; one
- that does not fit is not sent, and the room falls back as for any other
- decision-model failure. Any other decision job, now or added later, uses
+- **The decision relay takes four requests, and the app sends it nothing
+ else.** Through the included token the app sends only:
+ - room routing's request: one question `answer`, a choice with the fixed
+ instructions in `server/decider/room-routing.ts`, and state keys `room`,
+ `humans_in_room`, `bots_in_room`, `new_message` and, when there are recent
+ lines, `recent_messages`;
+ - inbox triage's request: one choice with the fixed instructions and
+ options in `server/decider/inbox-triage.ts`, and state keys `email`
+ (`from`, `subject`, `preview`), `details` (each value at most 300
+ characters) and `dismissed_senders` (at most 20);
+ - a bot's own `decide` call: 1 to 8 questions within `BOT_DECIDE_LIMITS`;
+ - the Settings key check's fixed request.
+
+ Each stays within the relay's caps (a body of at most 64 KiB, a state of at
+ most 24,000 bytes as JSON). `server/decider/relay.ts` checks each request
+ before it is sent, and Cloud's Admin runs the same checks from
+ `server/decider/fixtures/relay-seams.json`. One that does not fit is not
+ sent, and the job falls back as for any other decision-model failure. Any other decision job, now or added later, uses
only a key of the person's own (Jev, Workers AI or OpenRouter) until the
relay accepts it too. The relay speaks Jev's API only: included decisions
are Jev's. An own Jev or Workers AI key comes before them; an OpenRouter key
diff --git a/docs/decision-model.md b/docs/decision-model.md
index 001cb77476..3eb428e785 100644
--- a/docs/decision-model.md
+++ b/docs/decision-model.md
@@ -170,7 +170,8 @@ The log stays on this machine: workspace backups leave it out.
- **Cloud Pro:** decisions are included, with no key to paste. With no key of
the person's own, the Cloud home uses its relay token
(`OMB_CLOUD_DECIDER_TOKEN`), sent only to the Admin's relay, never to Jev
- or `baseUrl`, and only for room routing and the key check (other jobs need
+ or `baseUrl`, and only for the requests the relay accepts: room routing,
+ inbox triage, a bot's own `decide` call and the key check (other jobs need
a key of the person's own). Settings says **Included with your Cloud plan**, and
the master switch is on until someone switches it off. A Jev or Workers AI
key saved here wins; clearing it falls back to the included decisions. The
@@ -194,14 +195,21 @@ recent room lines and the new message) and the bots' descriptions to the
provider whose key decides (see the key order above). With Workers AI that is
Cloudflare, or the server `workersAiBaseUrl` points to, which also receives the
token. With OpenRouter that is OpenRouter and the host it routes the model to,
-under OpenRouter's privacy settings and your account's data policy;
+under OpenRouter's privacy settings and your account's data policy, or the
+server `openrouterBaseUrl` points to, which also receives the key;
OpenMausBot does not set a data-collection preference.
-Inbox triage sends each new email's sender, subject and preview twice: to the
-provider whose key decides, and first to the one that reads it, the first of
-your own Workers AI key, Cloud's included relay, then OpenRouter (a Jev key is
-not used for reading). Leave a job off when its data must not leave the
-machine.
+Inbox triage first has each new email read, when a reading provider is set:
+the first of your own Workers AI key (Clairic and Clef-flash each get the
+email), Cloud's included relay, then OpenRouter. A Jev key is not used for
+reading. The provider whose key decides then gets the email's sender, subject
+and preview, the details that were read (such as an ask or a deadline) and up
+to 20 recently dismissed senders.
+
+Switching inbox triage off does not keep mail on the machine: the inbox watch
+can then sort mail with the bot's own engine. Pause the watch to stop that
+(see [proactive-routines.md](proactive-routines.md)). Switch room routing off
+for rooms whose lines must not leave the machine.
## Turning it off