Right-Hand Assistant — Private Intelligent Agent Mini Program Design for Executives
Version: v1.0
Date: 2026-06-16
Status: Final Draft
1. Core Concept
The mini program = the executive's pocket intelligent agent.
Centered around the Content Digital Employee, it integrates the most commonly used digital employees (Procurement, BOM, Health, Approval), enabling executives to solve enterprise issues anytime, anywhere via voice. All digital employee behaviors and rules are configured on the web端, while the mini program端 is solely responsible for "interaction" and "display", maintaining lightness, speed, and ease of use.
"The executive doesn't need to open a computer; just take out the phone, speak a command, and the digital employee gets it done."
2. Overall Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ 左帮右臂 微信小程序(老板端) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ 智脑 │ │ 内容工坊 │ │ 任务 │ │ 我的 │ │
│ │ 语音交互 │ │ 一键生成 │ │ 待办确认 │ │ 配置跳转 │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────────────────┘
│
HTTPS + WebSocket
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 左帮右臂 后端(私有化部署) │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ 意图识别引擎(规则引擎 + LLM) │ │
│ │ Identify → Create → Repair → Optimize → Compare → Generate (六大能力) │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │采购智能体│ │BOM智能体 │ │内容智能体│ │健康/审批智能体 │ │
│ │DS-PROC │ │DS-BOM │ │DS-CONTENT│ │DS-HEALTH/DS-ECR │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ 规则引擎(2,306+ 条规则,可热更新) │ │
│ │ SQLite 私有库 / WebSocket 推送 │ │
│ └─────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
│ 配置同步
▼
┌─────────────────────────────────────────────────────────────────────┐
│ 网页端配置中心(PC/平板) │
│ - 数字员工启停、参数配置 │
│ - 规则模板编辑、提示词(Prompt)定制 │
│ - 内容模板:品牌语气、排版风格、签名档 │
│ - 企业私有库:SQLite 对象管理、导入导出 │
└─────────────────────────────────────────────────────────────────────┘
2.1 核心原则
| 原则 | 说明 |
|------|------|
| Mini Program — Lightweight | Handles only "listening, speaking, viewing"; no complex computations |
| Backend — Powerful | All business logic executes on the privatized backend, ensuring data security and control |
| Web端 — Management | Responsible for "configuration"; the mini program is for "use" — clear separation of duties |
3. Mini Program Page Structure (4 Tabs)
| Tab | Name | Function | Scenario |
|---|---|---|---|
| 1 | Intelligent Brain | Voice/text conversational interaction, calls all digital employees | Daily office tasks, resolved with a single command |
| 2 | Content Workshop | Exclusive entry for the Content Digital Employee, to generate/view/publish content | Content creation, brand communication |
| 3 | Tasks | Lists for pending confirmation, in-progress, and completed tasks | Approval confirmations, task tracking |
| 4 | Mine | Enterprise info, digital employee configuration entry, statistics | Settings and management |
4. Tab 1: Intelligent Brain (Core Interaction Page)
4.1 Page Layout
┌─────────────────────────────────────────────────────────────────────┐
│ ? 左帮右臂 ? ? │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ?️ 按住说话 ? 附件 │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ 推荐指令 │
│ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │采购 │ │Generate │ │今天 │ │库存 │ │质量 │ │
│ │100套 │ │BOM │ │谁生日│ │预警 │ │周报 │ │
│ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ? 我:采购100套电机,月底前到,预算5万 │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ? 小智:已向3家供应商发送询价... │ │
│ │ 收到2家报价,正在比价... │ │
│ │ ✅ 推荐:宏达电机厂,单价¥4,750 │ │
│ │ ? [查看决策卡片] │ │
│ └──────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
4.2 语音交互流程
老板按住录音
│
▼
微信语音识别(wx.startRecord + 腾讯云语音识别)
│
▼
文本发送到后端 /api/chat/voice
│
▼
规则引擎 + LLM 识别意图
│
├──→ 采购意图 → 调用 采购智能体 (DS-PROC-001)
├──→ BOM意图 → 调用 BOM智能体 (DS-BOM-001)
├──→ 健康意图 → 调用 健康管家 (DS-HEALTH-001)
├──→ 内容意图 → 调用 内容智能体 (DS-CONTENT-001)
├──→ 审批意图 → 调用 审批智能体 (DS-ECR-001)
└──→ 通用问题 → 调用 LLM 直接回答
│
▼
数字员工执行任务链
│
▼
WebSocket 实时推送进度
"正在询价..." → "已发送3家" → "收到2家报价" → "比价中"
│
▼
小程序对话气泡动态更新
│
▼
需要老板确认?
├── 是 → 弹出决策卡片 → 老板确认/修改 → 继续执行
└── 否 → 直接完成
│
▼
最终结果展示
4.3 技术实现要点
#### 4.3.1 语音识别
// 微信原生录音
wx.startRecord({
success: (res) => {
const tempFilePath = res.tempFilePath
// 方案A:微信语音识别插件
plugin.voiceToText({ file: tempFilePath })
// 方案B:腾讯云语音识别(更准)
wx.uploadFile({
url: `${API_BASE}/api/asr/recognize`,
filePath: tempFilePath,
success: (r) => {
const text = JSON.parse(r.data).text
sendToBrain(text)
}
})
}
})
#### 4.3.2 后端 API 对接
| Interface | Method | Description | Current Status |
|------|------|------|---------|
| /api/chat/voice | POST | Send voice text, return task ID | Reuses /api/ai-agent/chat |
| /api/task/ws | WebSocket | Real-time task progress push | Currently simulated via polling, needs to be changed to real WS |
| /api/task/status/{id} | GET | Poll task status (fallback) | Reuses /api/digital-staff/logs |
| /api/decision/{id} | POST | Boss confirms decision | Reuses /api/digital-staff/confirm |
| /api/content/generate | POST | Content generation | Reuses /api/ai-agent/chat |
| /api/content/publish | POST | Publish to specified channel | Needs to be added |
#### 4.3.3 Mapping of Six Core Capabilities
| Capability | Trigger Scenario | Corresponding Backend Module | Status |
|------|---------|-------------|------|
| Recognition | "What part is this?" | Rule Engine + AML Query | ✅ Existing |
| Creation | "Help me create an ECO" | Digital Staff DS-ECR-001 | ✅ Existing |
| Fix | "Fix Supplier Data" | Digital Worker + SCSAI Update | ✅ Existing |
| Optimize | "Optimize BOM Cost" | Digital Worker DS-COST-001 | ✅ Existing |
| Compare | "Compare BOM Version Differences" | LLM + Rule Engine | ✅ Existing |
| Generate | "Write a Quality Weekly Report" | Content Digital Worker | ⚠️ To be created DS-CONTENT-001 |
5. Tab 2: Content Workshop (Dedicated Page for Content Digital Workers)
5.1 Page Layout
┌─────────────────────────────────────────────────────────────────────┐
│ 内容工坊 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ 快速生成 │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │产品公告│ │质量周报│ │变更通知│ │营销文案│ │经营日报│ │ │
│ │ └────────┘ └────────┘ └────────┘ └────────┘ └────────┘ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ 最近生成 │ │
│ │ ┌────────────────────────────────────────────────────────┐ │ │
│ │ │ ? 智能音箱BOM变更公告 2026-06-15 │ │ │
│ │ │ [查看] [重新生成] [发布] │ │ │
│ │ └────────────────────────────────────────────────────────┘ │ │
│ │ ┌────────────────────────────────────────────────────────┐ │ │
│ │ │ ? 第23周质量简报 2026-06-14 │ │ │
│ │ │ [查看] [重新生成] [发布] │ │ │
│ │ └────────────────────────────────────────────────────────┘ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ?️ 语音生成 │ │
│ │ [按住说话,描述你想要的内容...] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
5.2 内容类型矩阵
| 内容类型 | 数据来源 | 输出格式 | 发布渠道 | 六大能力 |
|---------|---------|---------|---------|---------|
| Product Announcement | BOM Change Records | Markdown/HTML | Official Account, Website | Generate |
| Quality Weekly Report | SPC Data, Inspection Records | Graphic Card | Lark, WeCom | Generate, Recognize |
| Change Notification | ECR/ECO Form | Email Body | Email, Supplier Portal | Generate, Compare |
| Marketing Copy | Product Materials | Multi-version Copy | E-commerce Detail Page | Generate, Optimize |
| Daily Business Report | Orders, Profit, Inventory | Report + Summary | Lark Push | Recognize, Generate |
5.3 Content Digital Worker (New)
A new DS-CONTENT-001 digital worker needs to be added to the backend. This is the most important new employee in this plan.
DS-CONTENT-001 配置:
name: "内容助手"
prompt: "你是一位企业内容创作专家..."
capabilities: ["生成公告", "生成周报", "生成通知", "生成文案"]
schedule: "manual"
output_formats: ["markdown", "html", "plain"]
publish_channels: ["wechat_article", "feishu_doc", "email"]
六、Tab 3:任务(待办与历史)
6.1 页面布局
┌─────────────────────────────────────────────────────────────────────┐
│ 任务 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ? 待确认(2) │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ? 采购决策:宏达电机厂 ¥4,750,交期20天 刚刚 │ │
│ │ [✅ 同意] [❌ 拒绝] [✏️ 修改] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ? 内容审核:《智能音箱BOM变更公告》 2小时前 │ │
│ │ [?️ 预览] [? 发布] [✏️ 编辑] │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ? 进行中(1) │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ? 供应商询价进行中... 10分钟前 │ │
│ │ 已向3家供应商发送询价,等待回复... │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ✅ 已完成(查看全部) │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ✅ 库存预警处理 昨天 │ │
│ │ ✅ BOM成本优化报告 昨天 │ │
│ └──────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
6.2 Tab切换逻辑
| 子Tab | 条件 | 数据来源 | 操作 |
|-------|------|---------|------|
| Pending Confirmation | Task Status = pending_confirm | digital-staff/tasks + digital-staff/confirm | Confirm/Reject/Modify |
| In Progress | Task Status = in_progress | digital-staff/logs (last 24h) | View Progress |
| Completed | Task Status = completed | digital-staff/runs | View Details |
VII. Tab 4: My (Settings & Navigation)
7.1 Page Layout
┌─────────────────────────────────────────────────────────────────────┐
│ 我的 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ? 张三(老板) ⚙️ │
│ 企业:智塑工坊科技有限公司 │
│ │
│ ? 数字员工配置 (点击跳转网页端) │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ ? 采购智能体 DS-PROC-001 ✅ 已启用 │ │
│ │ ? BOM智能体 DS-BOM-001 ✅ 已启用 │ │
│ │ ? 内容智能体 DS-CONTENT-001 ✅ 已启用 │ │
│ │ ? 健康管家 DS-HEALTH-001 ✅ 已启用 │ │
│ │ ? 更多配置 → 前往网页版 ➡️ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ? 本月统计 │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ 完成任务 │ │ 节省时间 │ │ 生成内容 │ │
│ │ 28 │ │ 12小时 │ │ 15篇 │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ? 联系客服 | ? 使用指南 | ? 退出登录 │
│ │
└─────────────────────────────────────────────────────────────────────┘
7.2 数字员工卡片在"我的"页的展示逻辑
从后端 /api/digital-staff/list 获取配置,筛选 enabled=true 的员工,按优先级排序展示。
The configuration status is fetched via /api/digital-staff/status, displaying online/offline in real-time.
VIII. Web-based Configuration Center (Advanced Configuration)
The web platform (PC/tablet) handles advanced configuration; the mini-program only consumes the configuration results.
8.1 Digital Staff Configuration Table
| Configuration Item | Description | Default Value |
|---|---|---|
| Enable/Disable Switch | Whether to display this staff member in the mini-program | Enabled |
| Display Name | Card name shown in the mini-program | "Procurement Agent" |
| Icon | Emoji displayed in the mini-program | "?" |
| Voice Wake Words | Trigger keywords spoken by the boss | "Procurement", "Buy for me" |
| Default Parameters | Default supplier list, default budget | Empty |
| Approval Threshold | Amount requiring boss confirmation | 50,000 |
| Push Channel | Where results are pushed to | |
| Prompt Template | System prompt for AI behavior | Default Template |
8.2 Content Template Customization
| Configuration Item | Description | Default Value |
|---|---|---|
| Brand Tone | Formal/Casual/Friendly | Formal |
| Layout Style | Official Account/Feishu/Email | Official Account |
| Signature | Company Logo, Contact Information | Empty |
| Remove AI Flavor | Automatically replace formulaic expressions | Off |
| Image Style | Illustration/Photo/No Image | No Image |
8.3 Rule Engine Management
- View/Edit 2,306+ rules
- Custom condition scripts (JavaScript)
- Custom action scripts
- Drag-and-drop rule priority sorting
- Rule import/export (JSON)
8.4 Private Library Management
- Enterprise SQLite object viewer
- AML/JSON import/export
- Object version comparison
- Object repair tool
9. Comparison with the existing bossagents-miniapp
9.1 Tab Mapping
| Design Tab | Existing Tab | Gap | Implementation Difficulty |
|---|---|---|---|
| AI Brain | ai-chat/index | ✅ Core implemented, needs voice entry | Low |
| Content Workshop | ❌ Does not exist | Need to create pages/content/index | Medium |
| Tasks | workbench/index | Existing is BOM/Change Workbench, not a task center | Medium |
| My | profile/index | ✅ Existing, requires minor display adjustments | Low |
9.2 Functional Gap Analysis
| Function Point | Status | Description |
|---|---|---|
| Voice Input | ❌ Missing | Requires wx.startRecord + speech recognition |
| Tool call auto-execution | ✅ Existing | Completed in Sprint 1 |
| SSE real-time logs | ⚠️ Simulated via polling | Needs to be changed to real WebSocket |
| Confirmation card | ✅ Existing | Completed in Sprint 1 |
| Content Workshop | ❌ Missing | Requires new page + DS-CONTENT-001 |
| Task Center | ⚠️ Partially available | Requires three sub-tabs: To be confirmed/In progress/Completed |
| Digital Employee configuration entry | ⚠️ Available on "My" page | Needs to add a one-click jump to the web version |
| Recommended commands | ✅ Existing | QuickActions from Sprint 1 |
| Full coverage of six core capabilities | ✅ Backend existing | Frontend needs to add corresponding trigger methods |
9.3 New Page List
| Page | Path | Description |
|------|------|------|
| Content Workshop | pages/content/index.vue | Dedicated page for content digital employees, quick generation + history list |
| Content Detail | pages/content/detail.vue | Preview/edit/publish generated content |
Task Center | pages/task/index.vue | Three sub-tabs: Pending Confirmation/In Progress/Completed
Voice Component | components/VoiceInput.vue | Voice recording + speech-to-text component
9.4 Existing Files to Modify
File | Modification Content
|------|---------|
pages.json | Update Tab names, add new page routes
manifest.json | Update project name/description to "Left Hand Right Hand"
api/miniapp.js | Add speech recognition, content generation, and task APIs
pages/ai-chat/index.vue | Add voice input button
pages/profile/index.vue | Change to "Left Hand Right Hand" brand style
pages/index/index.vue | Change to "AI Brain" Tab (but the current homepage can also remain as a dashboard)
Ten. Implementation Roadmap
Phase 1(当前 Sprint) ── 基础设施
├── 更新 pages.json:Tab 更名为 智脑/内容工坊/任务/我的
├── 新建内容工坊页面(快速生成+历史列表)
├── 新建任务中心页面(待确认/进行中/已完成)
└── 语音输入组件(VoiceInput.vue)
Phase 2 ── Content Digital Staff
├── 后端新建 DS-CONTENT-001 Digital Staff
├── 内容模板系统(网页端配置)
├── 内容生成 API /api/content/generate
└── 内容发布 API /api/content/publish
Phase 3 ── 体验升级
├── WebSocket 替换轮询(真实时推送)
├── 品牌换肤:全域改为"左帮右臂"
├── 语音识别深度优化(腾讯云)
└── 小程序体验版分发方案
Phase 4 ── 多租户
├── 每个企业/老板独立体验版
├── 二维码绑定
└── 企业私有化服务器指向
十一、关键设计决策
| 决策 | 选择 | 理由 |
|------|------|------|
Voice Solution | WeChat Native Recording + Tencent Cloud Speech Recognition | WeChat native offers better real-time performance, Tencent Cloud provides higher accuracy, with fallback capability
Real-time Communication | WebSocket (transition from current polling first) | WS has lower latency and better user experience
Number of Tabs | 4 | The optimal user experience for WeChat bottom tabs is 4
Content Workshop | Independent Tab | Content creation is a high-frequency, independent scenario requiring a dedicated space
| Task Center | Independent Tab | To-dos synchronized with conversations require independent management |
| Web Configuration | Redirect to PC Browser | Mini-programs are not suitable for complex form configuration |
12. Summary
| Dimension | Mini-program Responsibilities | Web-side Responsibilities |
|------|-----------|-----------|
| AI Brain | Voice/text interaction, result display, decision confirmation | Configure digital employees, rules, Prompt templates |
| Content Workshop | One-click generation, view, preview, publish | Customize content templates, brand tone, scheduling style |
| Tasks | Pending/In Progress/Completed, click to operate | None (or audit log viewing) |
| My Profile | Basic info, employee display, statistics, redirection | Deep configuration, private library management, rule editing |
Core Principles:
- Mini-program: lightweight — only handles interaction and display
- Backend: powerful — six major capabilities + rule engine + digital employee scheduling
- Web: configurable — template customization + rule management + private library
Left and right assistants = the boss's pocket intelligent agent.
Take out your phone, say a word, and the task is done.
This solution is designed based on the existing capabilities of the bossagents project (Vue 3 Web + uni-app mini-program + Node.js backend + digital employee system), fully leveraging the six major capabilities (recognition, creation, repair, optimization, comparison, generation) to ensure maximum user experience improvement with minimal modification cost.
BossAgents