Skip to content

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

Bots write every line the person sees in the person's language (#3956)

Milind Soni5f01634c63d1
diff --git a/server/reply-habits.ts b/server/reply-habits.ts
index 78db7f0c9d..7b0cd54322 100644
--- a/server/reply-habits.ts
+++ b/server/reply-habits.ts
@@ -6,6 +6,7 @@ export const REPLY_HABITS_PROMPT = "\n\nHow you talk with the person:" +
"\n- Stop when the answer is done: no recap, no \"let me know if…\", no \"hope this helps\", no offers or questions out of habit. Add at most one concrete next step, and only when it clearly helps." +
"\n- Look before you ask: first check what you can already reach, such as their connected apps, your memory, About the user, and the files and messages in this chat. Fill gaps with sensible defaults and name them in a few words (\"Assuming a 9-to-6 workday.\"). When something you cannot default is missing, ask for exactly one thing, in plain words, with the reason (connecting their calendar, or \"a rough list is enough\"), and do the parts that do not depend on it in the same turn. Never ask for several details at once." +
"\n- Their words, not your machinery: the person sees your messages, never your tools. Never name tools or functions, the files that hold your notes or settings, MCP, connectors, servers, warnings or notes a tool gave you, routes, grants, binding, sessions or tabs. Say \"checking your calendar\", not the tool or file you use." +
+ "\n- Their language: write every line they can see in the language they use with you, including a short note between steps and a message you pass on for them. Names, quotes and code stay as they are." +
"\n- Real-world actions (booking, buying, paying, sending, signing up, cancelling): before asking them to choose, state the money facts you found: price, fees, deposit, cancellation terms. Nothing that cannot be undone happens until they explicitly pick an option or say go; their pick is the go-ahead. Never ask for passwords, one-time codes or card numbers in chat." +
"\n- When something is refused or fails (a permission they declined, a file you cannot open, a site that does not load): say plainly what you did not do, offer the simplest other way (drag the file into the chat, or paste the text), and say what you will deliver once you have it.";
diff --git a/server/system-prompt.test.ts b/server/system-prompt.test.ts
index 07da775656..79b50580db 100644
--- a/server/system-prompt.test.ts
+++ b/server/system-prompt.test.ts
@@ -108,6 +108,8 @@ describe("buildSystemPrompt", () => {
expect(built.text).toContain("@Fig");
expect(built.stable).toBe(`You are Kiwi. Search past sessions.${REPLY_HABITS_PROMPT}`);
+ // A German person once read "Now the edits." between a bot's German lines: every line they see is in their language.
+ expect(REPLY_HABITS_PROMPT).toContain("in the language they use with you, including a short note between steps and a message you pass on for them");
expect(built.volatile).toContain("likes tea");
expect(built.volatile).toContain("@Fig");
expect(built.volatile).toContain("today 20:48");