docs: update for worker mode (tori server / tori worker)

This commit is contained in:
2026-04-06 12:56:50 +01:00
parent e4ba385112
commit b5cecec485
4 changed files with 37 additions and 3 deletions

View File

@@ -2,12 +2,29 @@
AI agent 驱动的工作流管理 Web 应用。描述需求AI 规划agent 执行,随时通过 comment 反馈。
## 架构
```
Frontend <--> Server (REST + WS) <--> Worker (agent loop + LLM + exec)
|
SQLite
```
- **Server** (`tori server`): API 网关 + DB 持久化 + WebSocket 广播 + 派发调度
- **Worker** (`tori worker`): 完整 agent 执行引擎LLM 调用 + 脚本执行 + 工具),必须在线才能跑 workflow
## 快速开始
```bash
# 开发模式(前后端同时启动)
make dev
# 启动 worker连接本地 server
cargo run -- worker
# 启动 worker连接远程 server
cargo run -- worker --server wss://tori.euphon.cloud/ws/tori/workers --name my-worker
# 构建生产版本
make build
@@ -28,4 +45,4 @@ cp config.yaml.example config.yaml
- **前端**: Vite + Vue 3 + TypeScript
- **LLM**: OpenAI 兼容 APIRequesty.ai 网关)
- **实时通信**: WebSocket
- **远程执行**: SSH
- **Worker**: `tori server` / `tori worker` 子命令