Skip to content

Commit bd4519a

Browse files
author
linyuan.yang
committed
doc 支持中文
1 parent a78dee0 commit bd4519a

17 files changed

Lines changed: 868 additions & 61 deletions

File tree

‎packages/docs-site/.vitepress/config.ts‎

Lines changed: 150 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,60 +10,164 @@ export default defineConfig({
1010
],
1111
themeConfig: {
1212
logo: '/logo.svg',
13-
nav: [
14-
{ text: 'Guide', link: '/guide/getting-started' },
15-
{ text: 'GitHub', link: 'https://github.com/while-coder/sbot' },
13+
socialLinks: [
14+
{ icon: 'github', link: 'https://github.com/while-coder/sbot' },
1615
],
17-
sidebar: [
18-
{
19-
text: 'Introduction',
20-
items: [
21-
{ text: 'Getting Started', link: '/guide/getting-started' },
22-
{ text: 'Features', link: '/guide/features' },
23-
],
16+
search: {
17+
provider: 'local',
18+
options: {
19+
locales: {
20+
zh: {
21+
translations: {
22+
button: {
23+
buttonText: '搜索文档',
24+
buttonAriaLabel: '搜索文档',
25+
},
26+
modal: {
27+
noResultsText: '无法找到相关结果',
28+
resetButtonTitle: '清除查询条件',
29+
footer: {
30+
selectText: '选择',
31+
navigateText: '切换',
32+
closeText: '关闭',
33+
},
34+
},
35+
},
36+
},
37+
},
2438
},
25-
{
26-
text: 'Models & Agents',
27-
items: [
28-
{ text: 'Models', link: '/guide/models' },
29-
{ text: 'Agents', link: '/guide/agents' },
30-
{ text: 'Agent Store', link: '/guide/agent-store' },
39+
},
40+
},
41+
locales: {
42+
root: {
43+
label: 'English',
44+
lang: 'en-US',
45+
title: 'sbot',
46+
description: 'Self-hosted AI Agent Server',
47+
themeConfig: {
48+
nav: [
49+
{ text: 'Guide', link: '/guide/getting-started' },
50+
{ text: 'GitHub', link: 'https://github.com/while-coder/sbot' },
3151
],
32-
},
33-
{
34-
text: 'Storage & Knowledge',
35-
items: [
36-
{ text: 'Savers', link: '/guide/savers' },
37-
{ text: 'Notes (Memory)', link: '/guide/note' },
38-
{ text: 'Wiki', link: '/guide/wiki' },
39-
{ text: 'Insight', link: '/guide/insight' },
52+
sidebar: [
53+
{
54+
text: 'Introduction',
55+
items: [
56+
{ text: 'Getting Started', link: '/guide/getting-started' },
57+
{ text: 'Features', link: '/guide/features' },
58+
],
59+
},
60+
{
61+
text: 'Models & Agents',
62+
items: [
63+
{ text: 'Models', link: '/guide/models' },
64+
{ text: 'Agents', link: '/guide/agents' },
65+
{ text: 'Agent Store', link: '/guide/agent-store' },
66+
],
67+
},
68+
{
69+
text: 'Storage & Knowledge',
70+
items: [
71+
{ text: 'Savers', link: '/guide/savers' },
72+
{ text: 'Notes (Memory)', link: '/guide/note' },
73+
{ text: 'Wiki', link: '/guide/wiki' },
74+
{ text: 'Insight', link: '/guide/insight' },
75+
],
76+
},
77+
{
78+
text: 'Tools & Skills',
79+
items: [
80+
{ text: 'Built-in Tools', link: '/guide/tools' },
81+
{ text: 'MCP Tools', link: '/guide/mcp' },
82+
{ text: 'Skills', link: '/guide/skills' },
83+
],
84+
},
85+
{
86+
text: 'Channels & Runtime',
87+
items: [
88+
{ text: 'Channels', link: '/guide/channels' },
89+
{ text: 'Heartbeat', link: '/guide/heartbeat' },
90+
],
91+
},
4092
],
93+
footer: {
94+
message: 'Released under the MIT License.',
95+
copyright: 'Copyright © sbot contributors',
96+
},
4197
},
42-
{
43-
text: 'Tools & Skills',
44-
items: [
45-
{ text: 'Built-in Tools', link: '/guide/tools' },
46-
{ text: 'MCP Tools', link: '/guide/mcp' },
47-
{ text: 'Skills', link: '/guide/skills' },
98+
},
99+
zh: {
100+
label: '简体中文',
101+
lang: 'zh-CN',
102+
title: 'sbot',
103+
description: '自托管 AI Agent 服务',
104+
themeConfig: {
105+
nav: [
106+
{ text: '指南', link: '/zh/guide/getting-started' },
107+
{ text: 'GitHub', link: 'https://github.com/while-coder/sbot' },
48108
],
49-
},
50-
{
51-
text: 'Channels & Runtime',
52-
items: [
53-
{ text: 'Channels', link: '/guide/channels' },
54-
{ text: 'Heartbeat', link: '/guide/heartbeat' },
109+
sidebar: [
110+
{
111+
text: '介绍',
112+
items: [
113+
{ text: '快速开始', link: '/zh/guide/getting-started' },
114+
{ text: '核心特性', link: '/zh/guide/features' },
115+
],
116+
},
117+
{
118+
text: '模型与 Agent',
119+
items: [
120+
{ text: '模型', link: '/zh/guide/models' },
121+
{ text: 'Agent', link: '/zh/guide/agents' },
122+
{ text: 'Agent 商店', link: '/zh/guide/agent-store' },
123+
],
124+
},
125+
{
126+
text: '存储与知识',
127+
items: [
128+
{ text: '存储 (Savers)', link: '/zh/guide/savers' },
129+
{ text: '记忆 (Notes)', link: '/zh/guide/note' },
130+
{ text: '知识库 (Wiki)', link: '/zh/guide/wiki' },
131+
{ text: 'Insight 洞察', link: '/zh/guide/insight' },
132+
],
133+
},
134+
{
135+
text: '工具与技能',
136+
items: [
137+
{ text: '内置工具', link: '/zh/guide/tools' },
138+
{ text: 'MCP 工具', link: '/zh/guide/mcp' },
139+
{ text: '技能', link: '/zh/guide/skills' },
140+
],
141+
},
142+
{
143+
text: '渠道与运行时',
144+
items: [
145+
{ text: '渠道', link: '/zh/guide/channels' },
146+
{ text: '心跳唤醒', link: '/zh/guide/heartbeat' },
147+
],
148+
},
55149
],
150+
docFooter: {
151+
prev: '上一页',
152+
next: '下一页',
153+
},
154+
outline: {
155+
label: '本页目录',
156+
},
157+
lastUpdated: {
158+
text: '最后更新于',
159+
},
160+
darkModeSwitchLabel: '主题',
161+
lightModeSwitchTitle: '切换到浅色模式',
162+
darkModeSwitchTitle: '切换到深色模式',
163+
sidebarMenuLabel: '菜单',
164+
returnToTopLabel: '回到顶部',
165+
langMenuLabel: '切换语言',
166+
footer: {
167+
message: '基于 MIT 许可证发布。',
168+
copyright: 'Copyright © sbot contributors',
169+
},
56170
},
57-
],
58-
socialLinks: [
59-
{ icon: 'github', link: 'https://github.com/while-coder/sbot' },
60-
],
61-
footer: {
62-
message: 'Released under the MIT License.',
63-
copyright: 'Copyright © sbot contributors',
64-
},
65-
search: {
66-
provider: 'local',
67171
},
68172
},
69173
})

‎packages/docs-site/.vitepress/theme/Home.vue‎

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,14 @@
33
<div class="home-card">
44
<img src="/logo.svg" alt="sbot" class="home-logo" />
55
<h1 class="home-title">sbot</h1>
6-
<p class="home-tagline">Self-hosted AI Agent Server</p>
7-
<p class="home-desc">
8-
Open-source, modular AI agent framework. Models, memory, tools, channels,
9-
and skills are independent building blocks you mix and match — run on your
10-
own server with multi-channel integrations, MCP/ACP support, and a built-in
11-
Web UI. No vendor lock-in.
12-
</p>
6+
<p class="home-tagline">{{ t.tagline }}</p>
7+
<p class="home-desc">{{ t.desc }}</p>
138
<div class="home-install" @click="copyInstall">
149
<code>{{ installCmd }}</code>
15-
<span class="home-copy-hint">{{ copied ? '✓ Copied' : 'Click to copy' }}</span>
10+
<span class="home-copy-hint">{{ copied ? t.copied : t.copyHint }}</span>
1611
</div>
1712
<div class="home-actions">
18-
<a href="/sbot/guide/getting-started" class="home-btn home-btn-primary">Get Started →</a>
13+
<a :href="t.getStartedLink" class="home-btn home-btn-primary">{{ t.getStarted }}</a>
1914
<a href="https://github.com/while-coder/sbot" target="_blank" class="home-btn home-btn-secondary">GitHub</a>
2015
<a href="https://www.npmjs.com/package/@qingfeng346/sbot" target="_blank" class="home-btn home-btn-secondary">npm</a>
2116
</div>
@@ -26,22 +21,56 @@
2621
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License" />
2722
</div>
2823
<ul class="home-highlights">
29-
<li><strong>Multi-provider</strong> — OpenAI · Claude · Gemini · Ollama · any OpenAI-compatible API</li>
30-
<li><strong>Multi-channel</strong> — Web · CLI · Lark · Slack · WeCom · WeChat · OneBot · XiaoAI · REST · WS</li>
31-
<li><strong>Multi-mode agents</strong> — Single · ReAct · Generative, plus ACP integration</li>
32-
<li><strong>Long-term recall</strong> — Notes (vector) · Wiki (hybrid keyword + semantic) · Insight</li>
33-
<li><strong>Proactive runtime</strong> — Heartbeat · cron Scheduler · Todo · Ask</li>
24+
<li v-for="(item, i) in t.highlights" :key="i" v-html="item"></li>
3425
</ul>
3526
</div>
3627
</div>
3728
</template>
3829

3930
<script setup lang="ts">
40-
import { ref } from 'vue'
31+
import { ref, computed } from 'vue'
32+
import { useData } from 'vitepress'
4133
4234
const installCmd = 'npm install -g @qingfeng346/sbot'
4335
const copied = ref(false)
4436
37+
const { lang } = useData()
38+
39+
const messages = {
40+
'en-US': {
41+
tagline: 'Self-hosted AI Agent Server',
42+
desc: 'Open-source, modular AI agent framework. Models, memory, tools, channels, and skills are independent building blocks you mix and match — run on your own server with multi-channel integrations, MCP/ACP support, and a built-in Web UI. No vendor lock-in.',
43+
copyHint: 'Click to copy',
44+
copied: '✓ Copied',
45+
getStarted: 'Get Started →',
46+
getStartedLink: '/sbot/guide/getting-started',
47+
highlights: [
48+
'<strong>Multi-provider</strong> — OpenAI · Claude · Gemini · Ollama · any OpenAI-compatible API',
49+
'<strong>Multi-channel</strong> — Web · CLI · Lark · Slack · WeCom · WeChat · OneBot · XiaoAI · REST · WS',
50+
'<strong>Multi-mode agents</strong> — Single · ReAct · Generative, plus ACP integration',
51+
'<strong>Long-term recall</strong> — Notes (vector) · Wiki (hybrid keyword + semantic) · Insight',
52+
'<strong>Proactive runtime</strong> — Heartbeat · cron Scheduler · Todo · Ask',
53+
],
54+
},
55+
'zh-CN': {
56+
tagline: '自托管 AI Agent 服务',
57+
desc: '开源、模块化的 AI Agent 框架。模型、记忆、工具、渠道、技能均为独立模块,自由组合 —— 在自己的服务器上运行,支持多渠道接入、MCP/ACP 协议和内置 Web UI,无供应商绑定。',
58+
copyHint: '点击复制',
59+
copied: '✓ 已复制',
60+
getStarted: '快速开始 →',
61+
getStartedLink: '/sbot/zh/guide/getting-started',
62+
highlights: [
63+
'<strong>多供应商</strong> — OpenAI · Claude · Gemini · Ollama · 任意 OpenAI 兼容接口',
64+
'<strong>多渠道</strong> — Web · CLI · 飞书 · Slack · 企业微信 · 微信 · OneBot · 小爱 · REST · WS',
65+
'<strong>多模式 Agent</strong> — Single · ReAct · Generative,外加 ACP 集成',
66+
'<strong>长期记忆</strong> — Notes(向量)· Wiki(关键词 + 语义混合)· Insight',
67+
'<strong>主动运行时</strong> — 心跳 · cron 调度器 · 待办 · 提问',
68+
],
69+
},
70+
}
71+
72+
const t = computed(() => messages[lang.value as keyof typeof messages] || messages['en-US'])
73+
4574
function copyInstall() {
4675
navigator.clipboard.writeText(installCmd)
4776
copied.value = true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Agent 商店
2+
3+
侧栏 → **Agent 商店**
4+
5+
Agent 商店让你从可配置的注册源浏览并一键安装预打包 Agent。每个安装包包含模型选择、系统提示词、技能与 MCP 服务器配置,免去手动配置流程。
6+
7+
## 安装
8+
9+
1. 打开侧栏中的 **Agent 商店**
10+
2. 浏览 / 搜索安装包
11+
3. 点击 **安装** —— sbot 将:
12+
- 把该 Agent 添加到 **Agent 管理**
13+
- 拉取所需的 [技能](./skills)(已存在则跳过)
14+
- 添加所需的 [MCP 服务器](./mcp)(缺失的 API Key 会保留占位符)
15+
4. 打开已安装的 Agent,补齐缺失的凭据(API Key、MCP 环境变量)
16+
17+
安装好的 Agent 与手动创建的 Agent 完全等价 —— 你可以照常编辑、复制或删除。
18+
19+
## 添加自定义注册源
20+
21+
侧栏 → **设置** → Agent 商店注册源
22+
23+
添加自定义注册源 URL,可拉取自有目录(团队内部 Agent、私有安装包)。
24+
25+
注册源是通过 HTTPS 提供的 JSON 清单,列出可用安装包。具体 schema 可参考项目仓库文档。
26+
27+
## 编写安装包
28+
29+
一个安装包是一个 JSON 文档,包含:
30+
31+
- 展示元信息(名称、描述、图标、标签)
32+
- 默认模型 + 系统提示词
33+
- 必需 / 推荐技能
34+
- 必需 MCP 服务器 + 环境变量占位符
35+
36+
发布到注册源后,凡是把 sbot 指向该注册源的人都可以一键安装。
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Agent
2+
3+
侧栏 → **Agent 管理** → 新建
4+
5+
一个 Agent 把模型、系统提示词,以及它能调用的工具 / 技能 / 知识打包在一起,然后被分配给聊天会话或渠道使用。
6+
7+
## Agent 模式
8+
9+
### Single
10+
11+
选择一个模型、写系统提示词,可选挂载 MCP 工具与技能。这是最常用的单一职能助手模式。
12+
13+
### ReAct
14+
15+
选择一个 **Think 模型**,然后添加子 Agent(每个子 Agent 需要 id 和描述用于任务调度)。Think 模型递归拆解用户请求并分发子任务;每个子 Agent 对共享记忆只读。
16+
17+
适合在以下场景使用 ReAct:
18+
- 任务开放("端到端规划并执行 X")
19+
- 希望由调度模型动态选择专家 Agent
20+
21+
### Generative
22+
23+
选择多模态模型,用于文本 + 图像混合内容生成。
24+
25+
## 配置项
26+
27+
| 区块 | 用途 |
28+
|---------|---------|
29+
| 模型 | 该 Agent 的主 LLM |
30+
| 系统提示词 | 角色、能力、回复风格 |
31+
| MCP 工具 | Agent 级启用的 [MCP 服务器](./mcp) 列表 |
32+
| 技能 | Agent 级 [技能](./skills) 选择(留空表示加载全部) |
33+
| 记忆 | 使用此 Agent 的会话默认 [notes / 记忆](./note) |
34+
| Wiki | 会话默认的 [wiki / 知识库](./wiki) |
35+
| Insight | Agent 级静默后置提取器 —— 详见 [Insight](./insight) |
36+
| 心跳 | 周期性自激活 —— 详见 [Heartbeat](./heartbeat) |
37+
38+
## 预制 Agent
39+
40+
不想手动配置?可前往 [Agent 商店](./agent-store) 浏览即装即用的整套包(模型 + 提示词 + 工具 + 技能 + MCP 服务器)。

0 commit comments

Comments
 (0)