Skip to content

Commit 9ff9fd9

Browse files
author
linyuan.yang
committed
readme
1 parent 767cf9f commit 9ff9fd9

35 files changed

Lines changed: 797 additions & 3062 deletions

‎.github/workflows/deploy-docs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- 'packages/landing/**'
7+
- 'packages/docs-site/**'
88
- '.github/workflows/deploy-docs.yml'
99
workflow_dispatch:
1010

@@ -30,7 +30,7 @@ jobs:
3030
node-version: 20
3131
cache: pnpm
3232
- run: pnpm install --frozen-lockfile
33-
- run: pnpm --filter sbot-landing run build
33+
- run: pnpm --filter sbot-docs run build
3434
- uses: actions/configure-pages@v5
3535
- uses: actions/upload-pages-artifact@v3
3636
with:

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"debug:ios": "pnpm run assets && pnpm --filter @sbot/app run ios:dev",
3838
"build:ios": "pnpm run build:deps && pnpm run assets && pnpm --filter @sbot/app run ios:build",
3939

40-
"debug:landing": "pnpm --filter sbot-landing run dev",
41-
"build:landing": "pnpm --filter sbot-landing run build",
40+
"debug:docs": "pnpm --filter sbot-docs run dev",
41+
"build:docs": "pnpm --filter sbot-docs run build",
4242

4343
"docker:sbot": "pnpm run build:sbot && node packages/sbot/scripts/docker.js build && node packages/sbot/scripts/docker.js save",
4444
"docker:sbot:publish": "pnpm run build:sbot && node packages/sbot/scripts/docker.js build && node packages/sbot/scripts/docker.js publish"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: 'sbot',
5+
description: 'Self-hosted AI Agent Server',
6+
outDir: '../../docs',
7+
base: '/sbot/',
8+
head: [
9+
['link', { rel: 'icon', href: '/sbot/logo.svg' }],
10+
],
11+
themeConfig: {
12+
logo: '/logo.svg',
13+
nav: [
14+
{ text: 'Guide', link: '/guide/getting-started' },
15+
{ text: 'GitHub', link: 'https://github.com/while-coder/sbot' },
16+
],
17+
sidebar: [
18+
{
19+
text: 'Introduction',
20+
items: [
21+
{ text: 'Getting Started', link: '/guide/getting-started' },
22+
{ text: 'Features', link: '/guide/features' },
23+
],
24+
},
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' },
31+
],
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' },
40+
],
41+
},
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' },
48+
],
49+
},
50+
{
51+
text: 'Channels & Runtime',
52+
items: [
53+
{ text: 'Channels', link: '/guide/channels' },
54+
{ text: 'Heartbeat', link: '/guide/heartbeat' },
55+
],
56+
},
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',
67+
},
68+
},
69+
})

packages/landing/.vitepress/theme/Home.vue renamed to packages/docs-site/.vitepress/theme/Home.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
<h1 class="home-title">sbot</h1>
66
<p class="home-tagline">Self-hosted AI Agent Server</p>
77
<p class="home-desc">
8-
Open-source, modular AI agent framework. Models, memory, tools, and channels
9-
are independent building blocks you mix and match — no vendor lock-in.
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.
1012
</p>
1113
<div class="home-install" @click="copyInstall">
1214
<code>{{ installCmd }}</code>
1315
<span class="home-copy-hint">{{ copied ? '✓ Copied' : 'Click to copy' }}</span>
1416
</div>
1517
<div class="home-actions">
16-
<a href="/guide/getting-started" class="home-btn home-btn-primary">Get Started →</a>
18+
<a href="/sbot/guide/getting-started" class="home-btn home-btn-primary">Get Started →</a>
1719
<a href="https://github.com/while-coder/sbot" target="_blank" class="home-btn home-btn-secondary">GitHub</a>
1820
<a href="https://www.npmjs.com/package/@qingfeng346/sbot" target="_blank" class="home-btn home-btn-secondary">npm</a>
1921
</div>
@@ -23,6 +25,13 @@
2325
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node.js" />
2426
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License" />
2527
</div>
28+
<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>
34+
</ul>
2635
</div>
2736
</div>
2837
</template>
File renamed without changes.

packages/landing/.vitepress/theme/style.css renamed to packages/docs-site/.vitepress/theme/style.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,36 @@
111111
.home-badges img {
112112
height: 20px;
113113
}
114+
115+
.home-highlights {
116+
list-style: none;
117+
padding: 0;
118+
margin: 1.75rem auto 0;
119+
text-align: left;
120+
max-width: 560px;
121+
display: grid;
122+
gap: 0.55rem;
123+
}
124+
125+
.home-highlights li {
126+
font-size: 0.95rem;
127+
color: var(--vp-c-text-2);
128+
line-height: 1.5;
129+
padding-left: 1.1rem;
130+
position: relative;
131+
}
132+
133+
.home-highlights li::before {
134+
content: '◆';
135+
position: absolute;
136+
left: 0;
137+
top: 0;
138+
color: #764ba2;
139+
font-size: 0.7rem;
140+
line-height: 1.7;
141+
}
142+
143+
.home-highlights strong {
144+
color: var(--vp-c-text-1);
145+
font-weight: 600;
146+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Agent Store
2+
3+
Sidebar → **Agent Store**
4+
5+
The Agent Store lets you browse and one-click install pre-packaged agents from configurable registries. Each package bundles model selection, system prompt, skills, and MCP server configuration — saving the manual setup walkthrough.
6+
7+
## Installing
8+
9+
1. Open **Agent Store** in the sidebar
10+
2. Browse / search packages
11+
3. Click **Install** — sbot:
12+
- Adds the agent to **Agent Management**
13+
- Pulls in any required [skills](./skills) it doesn't already have
14+
- Adds any [MCP servers](./mcp) it depends on (with placeholders for missing API keys)
15+
4. Open the installed agent and fill in any missing credentials (API keys, MCP env vars)
16+
17+
Installed agents are normal agents — you can edit, fork, or delete them like any hand-built one.
18+
19+
## Adding Custom Registries
20+
21+
Sidebar → **Settings** → Agent Store registries
22+
23+
Add custom registry URLs to pull from your own catalog (team-internal agents, private bundles).
24+
25+
A registry is a JSON manifest listing available packages, served over HTTPS. The exact schema is documented in the project repo.
26+
27+
## Authoring a Package
28+
29+
A package is a JSON document with:
30+
31+
- Display metadata (name, description, icon, tags)
32+
- Default model + system prompt
33+
- Required / suggested skills
34+
- Required MCP servers + env-var placeholders
35+
36+
Once published to a registry, anyone pointing sbot at that registry can install it with one click.

‎packages/docs-site/guide/agents.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Agents
2+
3+
Sidebar → **Agent Management** → New
4+
5+
An agent bundles a model, a system prompt, and the tools / skills / knowledge it can reach. You then assign the agent to chat sessions or channels.
6+
7+
## Agent Modes
8+
9+
### Single
10+
11+
Pick a model, write a system prompt, optionally attach MCP tools and skills. The default mode for focused single-purpose assistants.
12+
13+
### ReAct
14+
15+
Pick a **think model**, then add sub-agents (each with an id and description for task dispatch). The think model decomposes user requests and dispatches sub-tasks recursively; each sub-agent has read-only access to shared memory.
16+
17+
Use ReAct when:
18+
- The task is open-ended ("plan and execute X end-to-end")
19+
- You want the orchestrator to choose specialists dynamically
20+
21+
### Generative
22+
23+
Pick a multimodal model for mixed text + image content generation.
24+
25+
## Configuration
26+
27+
| Section | Purpose |
28+
|---------|---------|
29+
| Model | Primary LLM for this agent |
30+
| System prompt | Persona, capabilities, response style |
31+
| MCP tools | Per-agent enable list of [MCP servers](./mcp) |
32+
| Skills | Per-agent [skill](./skills) selection (empty = load all) |
33+
| Memory | Default [notes/memory](./note) for sessions using this agent |
34+
| Wiki | Default [wiki/knowledge base](./wiki) for sessions |
35+
| Insight | Per-agent silent post-turn extractor — see [Insight](./insight) |
36+
| Heartbeat | Periodic self-activation — see [Heartbeat](./heartbeat) |
37+
38+
## Pre-Built Agents
39+
40+
Want to skip the manual setup? Browse the [Agent Store](./agent-store) for ready-to-install bundles (model + prompt + tools + skills + MCP servers).
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Channels
2+
3+
Sidebar → **Channels** → New
4+
5+
Select the channel type and fill in the credentials, then assign agent + saver + memory. Every user/group chat is isolated automatically.
6+
7+
## Supported Channels
8+
9+
| Type | Required fields |
10+
|------|----------------|
11+
| Lark / Feishu | App ID, App Secret |
12+
| Slack | Bot Token (`xoxb-...`), App Token (`xapp-...`) |
13+
| WeCom | Bot ID, Secret |
14+
| WeChat | QR code login (credentials auto-populated) |
15+
| OneBot (QQ) | WS Host, WS Port, optional Access Token |
16+
| XiaoAI | Mi account ID, Password, Device name |
17+
18+
## Lark / Feishu
19+
20+
1. Create a bot app in the [Feishu Developer Console](https://open.feishu.cn) (or the [Lark Developer Console](https://open.larksuite.com/) for international)
21+
2. Enable **Bot** capability
22+
3. Grant the following permissions under **Permissions & Scopes** (or use **Batch Import** with the JSON below):
23+
24+
| Permission | Description |
25+
|------------|-------------|
26+
| `im:message:send_as_bot` | Send messages as bot |
27+
| `im:message.p2p_msg:readonly` | Receive direct messages |
28+
| `im:message.group_at_msg:readonly` | Receive group @bot messages |
29+
| `im:message.group_msg` | Receive all group messages |
30+
| `im:message:readonly` | Read message content |
31+
| `im:chat:readonly` | Read chat/group info |
32+
| `im:resource` | Read files and images in messages |
33+
| `contact:user.base:readonly` | Read basic user info |
34+
| `contact:contact.base:readonly` | Read basic contact info |
35+
36+
::: details Batch import JSON
37+
```json
38+
{
39+
"scopes": {
40+
"tenant": [
41+
"contact:contact.base:readonly",
42+
"contact:user.base:readonly",
43+
"im:chat:readonly",
44+
"im:message.group_at_msg:readonly",
45+
"im:message.group_msg",
46+
"im:message.p2p_msg:readonly",
47+
"im:message:readonly",
48+
"im:message:send_as_bot",
49+
"im:resource"
50+
],
51+
"user": []
52+
}
53+
}
54+
```
55+
:::
56+
57+
4. Under **Events & Callbacks**, set the subscription mode to **Long Connection**
58+
5. In Web UI → **Channels**, create a Lark channel and fill in **App ID** and **App Secret**
59+
60+
Supports event deduplication, interactive cards, per-user context isolation, and file/image send and receive.
61+
62+
## Slack
63+
64+
1. Create a Slack app at [api.slack.com/apps](https://api.slack.com/apps)
65+
2. Enable **Socket Mode** and generate an App-Level Token (`xapp-...`) with the `connections:write` scope
66+
3. Add bot scopes: `chat:write`, `im:history`, `im:read`, `app_mentions:read`, `channels:history`, `groups:history`, `files:read`
67+
4. Install the app to your workspace and copy the **Bot User OAuth Token** (`xoxb-...`)
68+
5. In Web UI → **Channels**, create a Slack channel and fill in both tokens
69+
70+
## WeCom
71+
72+
1. Create an AI app in the [WeCom Admin Console](https://work.weixin.qq.com) and obtain the **Bot ID** and **Secret**
73+
2. In Web UI → **Channels**, create a WeCom channel and fill in Bot ID and Secret
74+
75+
Connects via WebSocket for real-time messaging, with file and image support.
76+
77+
## WeChat
78+
79+
1. In Web UI → **Channels**, create a WeChat channel
80+
2. Click QR login and scan the code with WeChat to authenticate
81+
3. Credentials are saved automatically once authenticated, and the channel goes live immediately
82+
83+
WeChat integration connects via the iLink Bot API, with file and image support.
84+
85+
## OneBot (QQ / Telegram bridges / etc.)
86+
87+
OneBot is the standard reverse-WS protocol used by [NapCat](https://napneko.github.io/), [Lagrange](https://lagrangedev.github.io/), and other QQ adapters.
88+
89+
1. In Web UI → **Channels**, create a OneBot channel and configure:
90+
91+
| Field | Description | Default |
92+
|-------|-------------|---------|
93+
| WS Host | WebSocket server bind host | `0.0.0.0` |
94+
| WS Port | WebSocket server port | `6700` |
95+
| Access Token | Optional token for authentication | empty |
96+
| Require @mention in groups | Only respond when @bot in group chats | `true` |
97+
98+
2. Configure the OneBot client (NapCat / Lagrange / etc.) to connect via reverse WS to `ws://<sbot-host>:<wsPort>` with the same access token
99+
100+
## XiaoAI
101+
102+
Talk to your XiaoAi smart speaker as a sbot channel.
103+
104+
1. In Web UI → **Channels**, create a XiaoAI channel and fill in:
105+
106+
| Field | Description |
107+
|-------|-------------|
108+
| 小米 ID | Your Mi account ID |
109+
| 密码 | Mi account password |
110+
| 设备名称 | Target device name (matches a device in your account) |
111+
112+
2. The bot logs in to Mi Cloud, listens for voice messages on the device, and replies via TTS through the speaker

0 commit comments

Comments
 (0)