Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Rewrite the core requirements and stop calling a Bot one Session

Fei241107e37e035058
diff --git a/AGENTS.md b/AGENTS.md
index da9d3377..e3beb7c6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,7 +11,7 @@ DS Bot is a team of long-lived Bots, built on DeepSeek Harness (DSH). It has two
The Bot team:
-- Every Bot is a DSH Session and runs through the normal DSH agent loop, tools and model routes.
+- Every Bot is a long-lived identity whose work runs in DSH Sessions: one for its own chat, one for each group it is in, and a fresh one when the context fills up (earlier ones stay readable). Every turn runs through the normal DSH agent loop, tools and model routes.
- The team works together: Bots message each other, share group chats and can see what the other Bots are doing. Each Bot still runs on its own and does not disturb the others.
- Bots have clear, different roles. A Main Bot has the highest rights: it creates, changes and removes other Bots. Other Bots do not get these rights. There can be more than one Main Bot.
- Users customize each Bot (name, role label, instructions, model, character).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b9ea203c..53487774 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -11,7 +11,7 @@ Collaborators of this repository push branches here and open pull requests into
## The rules that matter most
1. **Build on DSH; never patch it.** The Bot features are a DSH plugin: use the plugin APIs that DSH documents (Cordis services, the plugin client entry, profile patches). The desktop app starts DSH only through the entry points that DSH documents (`@deepseek-ai/dsh/profile-boot`, the `dsh` command). Do not patch DeepSeek Harness, and do not depend on files inside a DSH install. When a feature needs something that DSH does not offer, open an issue here first; the fix can belong in DSH.
-2. **Every Bot is a DSH Session.** Bot work runs through the normal DSH agent loop, tools and model routes. Do not add a second agent runtime.
+2. **Bots run in DSH Sessions.** A Bot keeps its identity while its work runs in DSH Sessions: one for its own chat, one for each group, a fresh one when the context fills up. Every turn goes through the normal DSH agent loop, tools and model routes. Do not add a second agent runtime.
3. **No real secrets anywhere.** Do not commit API keys, tokens, cookies, `DSH_HOME` folders, logs or screenshots with personal data. The tests and the test bench use a scripted mock model and need no key.
4. **Only original material.** Do not copy code, text, icons, logos or other graphics from other products or websites. Code under a license compatible with Apache 2.0 is the only exception: say where it comes from and add its notice to a `NOTICE` file.
5. **Every change is tested.** Run the unit tests and the client check for every change (see [Test a change](#test-a-change)).
diff --git a/CONTRIBUTING.zh.md b/CONTRIBUTING.zh.md
index 72e28ccd..00736076 100644
--- a/CONTRIBUTING.zh.md
+++ b/CONTRIBUTING.zh.md
@@ -11,7 +11,7 @@
## 最重要的规则
1. **基于 DSH 构建,不改 DSH。** Bot 功能是 DSH 插件:只用 DSH 有文档的插件接口(Cordis 服务、插件客户端入口、profile patch)。桌面应用只通过 DSH 有文档的入口启动 DSH(`@deepseek-ai/dsh/profile-boot`、`dsh` 命令)。不修改 DeepSeek Harness,不依赖 DSH 安装目录里的文件。功能需要 DSH 没有提供的能力时,先在这里开 Issue;修复可能应该放在 DSH 里。
-2. **每个 Bot 都是一个 DSH Session。** Bot 的工作走 DSH 正常的 agent 循环、工具和模型路由。不要另加一套 agent 运行时。
+2. **Bot 的工作跑在 DSH Session 里。** Bot 的身份不变,工作跑在 DSH Session 里:私聊一条、每个群各一条,上下文快满时换一条新的。每个回合都走 DSH 正常的 agent 循环、工具和模型路由。不要另加一套 agent 运行时。
3. **任何地方都不放真实密钥。** 不要提交 API key、token、cookie、`DSH_HOME` 目录、日志,或带个人信息的截图。测试和测试台用脚本化的模拟模型,不需要密钥。
4. **只用原创素材。** 不要从其他产品或网站复制代码、文字、图标、logo 或其他图形。唯一例外是与 Apache 2.0 兼容许可的代码:注明出处,并把它的声明加进 `NOTICE` 文件。
5. **每个改动都要测试。** 每个改动都要跑单元测试和客户端检查(见[测试改动](#测试改动))。
diff --git a/README.md b/README.md
index 95f177e4..f79b332b 100644
--- a/README.md
+++ b/README.md
@@ -84,7 +84,7 @@ The plugin source is in [`ds-bot/`](ds-bot/). For options and internals, see [`d
## Acknowledgments
-- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): DS Bot is built on the DSH plugin system. Every bot is a DSH session and uses the DSH tools and models.
+- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): DS Bot is built on the DSH plugin system. Every bot works in DSH sessions and uses the DSH tools and models.
- [esbuild](https://esbuild.github.io/): bundles the plugin's interface code.
- Thanks to these projects for the ideas they published. DS Bot learned from their designs and does not contain their code:
- [AgentMemoryRepo](https://github.com/AgentMemoryRepo/agentmemoryrepo): the Markdown format of Bot memory.
diff --git a/README.zh.md b/README.zh.md
index b005c703..f20201c7 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -84,7 +84,7 @@ ds bot 拥有群聊功能。群聊是非常好的多 bot 协作方式,但它
## 致谢
-- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):ds bot 建在 dsh 的插件系统上。每个 bot 都是一个 dsh 会话,用的是 dsh 的工具和模型。
+- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):ds bot 建在 dsh 的插件系统上。每个 bot 都在 dsh 会话里工作,用的是 dsh 的工具和模型。
- [esbuild](https://esbuild.github.io/):用来打包插件的界面代码。
- 感谢下面这些项目公开的设计思路。ds bot 参考了它们的思路,没有使用它们的代码:
- [AgentMemoryRepo](https://github.com/AgentMemoryRepo/agentmemoryrepo):bot 记忆的 Markdown 格式。
diff --git a/docs/vision.md b/docs/vision.md
index 2e2f6ef2..913fe881 100644
--- a/docs/vision.md
+++ b/docs/vision.md
@@ -2,47 +2,40 @@
English | [中文](vision.zh.md)
-This file says what DS Bot is meant to be, why, and what it does not do. For how to use it, see the [README](../README.md); for the designs that are decided, see [docs/plans/](plans/) (written in Chinese); for how to take part, see [CONTRIBUTING](../CONTRIBUTING.md).
+This file says what DS Bot is meant to be and why. For how to use it, see the [README](../README.md); for the designs that are decided, see [docs/plans/](plans/) (written in Chinese); for how to take part, see [CONTRIBUTING](../CONTRIBUTING.md).
## What DS Bot is
-DS Bot is a team of long-lived Bots, built on [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). It is open source under the Apache 2.0 license. The user does not chat with one assistant but leads a team with clear roles: one or more Main Bots organize the work, the other Bots each do their own part and talk to each other, and the user can see at any time who is doing what.
+DS Bot is a persistent team of Bots, built on [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). It is open source under the Apache 2.0 license. The user can chat with one Bot, or work with a team with clear roles: one or more Main Bots organize the work, every Bot does its own part and talks to the others, and the user can see at any time who is doing what. Bots keep working over time and have a long-term memory.
## Two forms
| Form | What it is |
|---|---|
| The `ds-bot` plugin | A standard DSH plugin for DSH Desktop and DSH Web. All the Bot features are here |
-| The DS Bot desktop app | Opens straight into DS Bot. It brings a pinned DSH, its own profile and its own data folder, imports a team the user already has in DSH, and installs DSH-compatible plugins, so that DS Bot grows its own plugin ecosystem. The plugin can still be used on its own |
+| The DS Bot desktop app | Opens straight into DS Bot itself. It brings a pinned DSH, its own profile and its own data folder, imports a team the user already has in DSH, and installs DSH-compatible plugins, so that DS Bot grows its own plugin ecosystem. The plugin can still be used on its own |
Both forms run the same `ds-bot` plugin. The point of the app is that DS Bot controls its own profile and interface, free of the limits of DSH's general interface and global settings (see the [DSH concessions](plans/2026-10-13-dsh-concessions.md)).
## Ten core requirements
-1. **Built on DSH.** Every Bot is a DSH Session and runs through the normal DSH agent loop, tools and model routes. DS Bot follows DSH's plugin model and uses only documented interfaces. It does not patch DSH and does not add a second agent runtime.
-2. **The team comes first.** The point is many Bots working together, not one Bot. Bots message each other and share group chats. A Main Bot has the highest rights: it creates, changes and removes other Bots, and there can be more than one. Other Bots do not get these rights.
-3. **Clear roles.** Each Bot has its own role; a team is not a set of Bots that all do the same thing.
-4. **A polished interface with careful motion.** Motion is smooth and has a cause: a change of state has a transition, an action has feedback, nothing moves for its own sake.
-5. **Independent, and visible to each other.** Each Bot works on its own and does not disturb the others; when it needs to, it can see what the others are doing.
-6. **One Bot, one continuous conversation.** The user sees one continuous chat. When the context fills up, the Bot moves on to a new part (a new DSH Session) and the old part goes into a searchable index, instead of compacting again and again and losing detail.
-7. **Active memory.** Bots have a memory and look things up in it themselves, not only through what is injected.
-8. **Reliable.** Bots stay aligned with the goal, act on evidence, stay inside their task, and their results can be checked. When unsure, a Bot looks it up or asks instead of guessing.
-9. **Customizable.** Users customize each Bot: name, role label, instructions, model, character; later also the system prompt and even the harness each Bot runs on.
-10. **Other local agents can join.** Later, other agents on the same computer (for example through their command line) can join the team.
+1. **Built on DSH, independent of each other.** Every Bot is built on DSH, and the Bots are independent of each other.
+2. **Reliable.** Bots work reliably: they stay aligned with the goal, act on evidence, stay inside their task, and their results can be checked. Bots will also be able to improve themselves (planned).
+3. **Memory and persistence.** Bots keep working over time, that is, they have a long-term memory. A Bot can read the other Bots' memories but not change them (only a Main Bot can change another Bot's memory). A Bot manages its own memory, and the user can manage each Bot's memory too. A group chat shares one memory.
+4. **Levels of rights.** A Main Bot has the highest rights: it creates and changes other Bots. Other Bots do not have these rights, and only the user deletes a Bot. There can be more than one Main Bot. Every Bot can call on every other Bot.
+5. **Group chats.** Group chats are the core form of Bots working together in DS Bot. Bots in a group call on each other, and a group can have an admin Bot. The admin manages the group, adds and removes members, and by default answers the user's messages.
+6. **Working folders.** Each Bot can have its own working folder, and a group chat can set one folder for all its members. A Bot can set its own working folder, so one sentence from the user is enough.
+7. **Browser.** Each Bot has its own browser, and the browsers do not affect each other. Importing cookies is planned.
+8. **Interface and motion.** DS Bot has a polished interface with smooth motion.
+9. **A standalone app.** DS Bot is meant to be a standalone app and does not make too many concessions to DSH.
+10. **Local agents.** DS Bot can bring local agent CLIs in as Bots that call on each other (planned).
## Principles for trade-offs
- **Correct Bot behavior comes first.** Where a DSH mode or limit does not fit Bots, DS Bot does not pile up complexity to stay compatible. Concessions that cannot be avoided go into the [DSH concessions](plans/2026-10-13-dsh-concessions.md), to be removed once the app controls its own profile.
-- **Data stays on the user's computer.** Teams, chats and memory live in the local DSH data folder.
-- **Only original material.** No code, text, icons or graphics copied from other products.
+- **Data stays on the user's computer.** Teams, chats and memory live in DS Bot's data folder on the user's computer.
- **Done means checked.** Behavior is covered by tests; interface changes are looked at for real.
-## What DS Bot does not do
-
-- It does not patch DSH or depend on internal files of a DSH install.
-- It does not add its own agent runtime or go around DSH's tools and permissions.
-- It is not a hosted service: DS Bot runs in the user's own DSH.
-
## Who sets the direction
The maintainer decides the direction of the product, changes to decided designs, the rules for working together, releases and the architecture. Anyone can do the rest of the work; see [CONTRIBUTING](../CONTRIBUTING.md#how-we-work).
diff --git a/docs/vision.zh.md b/docs/vision.zh.md
index 6727a23a..6e62dd67 100644
--- a/docs/vision.zh.md
+++ b/docs/vision.zh.md
@@ -2,47 +2,40 @@
[English](vision.md) | 中文
-本文写 DS Bot 要做成什么、为什么这样做,以及不做什么。功能怎么用,见 [README](../README.zh.md);已定的具体设计,见 [docs/plans/](plans/);怎么参与开发,见 [CONTRIBUTING](../CONTRIBUTING.zh.md)。
+本文写 DS Bot 要做成什么、为什么这样做。功能怎么用,见 [README](../README.zh.md);已定的具体设计,见 [docs/plans/](plans/);怎么参与开发,见 [CONTRIBUTING](../CONTRIBUTING.zh.md)。
## DS Bot 是什么
-DS Bot 是一支长期在线的 Bot 团队,基于 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)构建,开源,使用 Apache 2.0 许可。用户不是和一个助手聊天,而是带一支有分工的团队:一个或几个 Main Bot 负责组织,其他 Bot 各做各的事,互相沟通,用户随时能看到谁在做什么。
+DS Bot 是一支持久化的 Bot 团队,基于 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)构建,开源,使用 Apache 2.0 许可。用户可以和一个 Bot 聊天,也可以和一支有分工的团队工作:一个或几个 Main Bot 负责组织,每个 Bot 各做各的事,互相沟通,用户随时能看到谁在做什么。Bot 应该有持久化的工作能力,有长期记忆。
## 两种形态
| 形态 | 是什么 |
|---|---|
| `ds-bot` 插件 | 标准的 DSH 插件,装进 DSH Desktop 或 DSH Web 使用。Bot 的全部功能都在这里 |
-| DS Bot 桌面应用 | 一打开就是 DS Bot。自带锁定版本的 DSH、自己的 profile 和数据目录,能导入用户在 DSH 里已有的团队,也能安装与 DSH 兼容的插件,逐步形成 DS Bot 自己的插件生态。插件仍然可以单独用 |
+| DS Bot 桌面应用 | 一打开就是 DS Bot 本体。自带锁定版本的 DSH、自己的 profile 和数据目录,能导入用户在 DSH 里已有的团队,也能安装与 DSH 兼容的插件,逐步形成 DS Bot 自己的插件生态。插件仍然可以单独用 |
两种形态用的是同一份 `ds-bot` 插件。桌面应用的意义在于:DS Bot 自己掌握 profile 和界面,不再受 DSH 通用界面和全局配置的限制(见 [DSH 让步总账](plans/2026-10-13-dsh-concessions.md))。
## 十条核心要求
-1. **基于 DSH 构建。** 每个 Bot 都是一个 DSH Session,走 DSH 正常的 agent 循环、工具和模型路由。按 DSH 的插件规范来做,只用 DSH 有文档的接口,不修改 DSH,也不另造一套 agent 运行时。
-2. **团队协作优先。** 重点是多个 Bot 一起工作,而不是一个 Bot。Bot 之间能互发消息、共用群聊。Main Bot 权限最高:能创建、修改、删除其他 Bot,可以有多个 Main Bot;普通 Bot 不授予这些权限。
-3. **分工明确。** 每个 Bot 有自己的角色,团队里不应该是一群做同样事情的 Bot。
-4. **界面精致,动效讲究。** 动效流畅、有因果:状态变化有过渡,操作有反馈,不为动而动。
-5. **独立运行,互相可见。** 每个 Bot 单独工作,互不打扰;需要时能知道别的 Bot 在做什么。
-6. **一个 Bot,一条连续的对话。** 用户看到的是一条连续的聊天。上下文快满时换到新的一段(新的 DSH Session),旧内容进索引、可以搜索,而不是一遍遍压缩把细节丢掉。
-7. **主动的记忆。** Bot 有记忆系统,并且会主动去查,不只靠被动注入。
-8. **可靠。** 思路对齐、做事有依据、目标有约束、结果可验证。Bot 拿不准时去查、去问,而不是猜。
-9. **可定制。** 用户能定制每个 Bot:名字、角色标签、指令、模型、形象;以后扩展到系统提示词,乃至每个 Bot 用哪套 harness。
-10. **能接入其他本地 Agent。** 以后可以把本机的其他 Agent(例如通过命令行)接进团队。
+1. **基于 DSH,互相独立。** 每个 Bot 都基于 DSH 构建,互相独立。
+2. **可靠。** Bot 工作应该可靠:思路要对齐、做事要有依据、目标有约束、结果可以验证。Bot 要有自我改进能力(待做)。
+3. **记忆与持久化。** Bot 应该有持久化的工作能力,即有长期记忆。Bot 之间的记忆互相只读(仅 Main Bot 可以修改别的 Bot 的记忆)。Bot 可以管理自己的记忆,用户也可以单独管理每个 Bot 的记忆。群聊的记忆共享。
+4. **权限分级。** Main Bot 有最高权限,可以创建、修改其他 Bot。其他 Bot 没有这些权限(删除必须由用户手动)。可以有多个 Main Bot。每个 Bot 可以互相调用。
+5. **群聊。** 群聊是 DS Bot 多 Bot 协作的核心形式,群聊中的 Bot 可以互相调用,可以有管理员 Bot。管理员在群聊中承担管理角色,可以添加、移除成员,默认由管理员回复用户消息。
+6. **工作区。** 每个 Bot 可以单独设置工作区,群聊可以设置统一工作区。Bot 应该可以自己设置自己的工作区,即用户一句话即可。
+7. **浏览器。** 每个 Bot 有独立的浏览器,互不影响。要支持导入 cookie(后续做)。
+8. **界面与动效。** DS Bot 应该有精致的前端界面,要有丝滑的动效。
+9. **独立应用。** DS Bot 应该是独立 App,不为 DSH 做过多让步。
+10. **接入本地 Agent。** DS Bot 可以把本地的 Agent CLI 接入为 Bot,可以互相调用(待做)。
## 取舍原则
- **Bot 的正确行为优先。** DSH 某些模式或限制和 Bot 不兼容时,不为了兼容无限增加复杂度。不得不让步的地方,记进 [DSH 让步总账](plans/2026-10-13-dsh-concessions.md),等桌面应用掌握 profile 后清理。
-- **数据留在用户自己的电脑上。** 团队、聊天、记忆都存在本机的 DSH 数据目录里。
-- **只用原创素材。** 代码、文字、图标、图形都不从其他产品复制。
+- **数据留在用户自己的电脑上。** 团队、聊天、记忆都存在本机的 DS Bot 的数据目录里。
- **能验证才算完成。** 行为要有测试覆盖,界面改动要实际看过。
-## 不做什么
-
-- 不修改 DSH,不依赖 DSH 安装目录里的内部文件。
-- 不另造 agent 运行时,不绕开 DSH 的工具和权限。
-- 不做云端托管的团队:DS Bot 跑在用户自己的 DSH 里。
-
## 谁来定方向
产品方向、已定设计的改动、协作规则、发版和架构由维护者决定。其他工作谁都可以做,流程见 [CONTRIBUTING](../CONTRIBUTING.zh.md#协作方式)。