BossAgents · GOAI New Intelligence Base Track Deployment and Operation Guide

BossAgents · GOAI New Intelligence Base Track Deployment and Operation Guide

Environment Requirements

  • Node.js >= 18 (20 LTS recommended)
  • npm >= 9
  • Operating System: Linux / macOS / Windows 10+
  • Memory: >= 512MB (SQLite loads 13000+ object models)
  • Network access (LLM API endpoint)
  • Port 3006 available

Quick Start

# 1. 安装依赖
npm install

# 2. 配置环境变量
# .env 已预配置,无需修改
# 如需自定义LLM,参考以下配置:
# LLM_ENDPOINT=https://api.sensenova.com/v1/chat/completions
# LLM_API_KEY=your_api_key_here
# LLM_MODEL=deepseek-v4-flash
# LLM_TIMEOUT=120000
# PORT=3006

# 3. 启动服务器
node server.js

# 4. 验证
curl https://ylxt.chat/api/health
# 预期: {"status":"ok",...}

演示验证

1. 查看可用岗位

curl https://ylxt.chat/api/goai-demo/positions

预期返回3个岗位:POS-GOAI / POS-PROCURE-CHAIN / POS-INSPECT-LOOP

2. Scenario 1: Workshop Composite Instruction

curl -X POST https://ylxt.chat/api/goai-demo/collaboration/goai \
  -H "Content-Type: application/json" \
  -d '{"instruction":"3号泵备件库存不足,当前仅剩2件安全库存10件,同时3号离心泵保养即将到期需要安排定期保养"}'

预期:3个Agent串行执行,约18.4秒完成(实测)

3. Scenario 2: Procurement Closed Loop

curl -X POST https://ylxt.chat/api/goai-demo/collaboration/procure \
  -H "Content-Type: application/json" \
  -d '{"instruction":"采购伺服电机SM-750A 50台,预算90万,15天内到货"}'

预期:4个Agent串行执行,约22.1秒完成(实测)

4. Scenario 3: Inspection and Repair Closed Loop

curl -X POST https://ylxt.chat/api/goai-demo/collaboration/inspect \
  -H "Content-Type: application/json" \
  -d '{"instruction":"检查Part数据质量,发现并修复问题"}'

预期:3个Agent串行执行,约12.5秒完成(实测)

5. Agent Interface Verification

# 任务分发
curl -X POST https://ylxt.chat/api/agents/dispatch \
  -H "Content-Type: application/json" \
  -d '{"customer_id":"test","task":"查询库存","agent_card":{"agent_id":"test-001","name":"TestAgent","capabilities":["test"],"endpoint":"https://test.com"}}'

# 结果回传(替换trace_id)
curl -X POST https://ylxt.chat/api/agents/callback \
  -H "Content-Type: application/json" \
  -d '{"trace_id":"替换为上一步返回的trace_id","agent_id":"test-001","result":{"ok":true},"span":1}'

# 审计查询(替换trace_id)
curl https://ylxt.chat/api/agents/audit/替换为trace_id

6. 审计日志查询

curl https://ylxt.chat/api/goai-demo/audit-logs

7. 开放平台验证

# 申请API Key
curl -X POST https://ylxt.chat/api/open/keys \
  -H "Content-Type: application/json" \
  -d '{"customer_id":"test","name":"测试Key","plan":"free"}'

# 带Key查询71个数字员工
curl https://ylxt.chat/api/digital-staff/list \
  -H "X-API-Key: ba_demo_key_00000000_00000000_00000000"

# 带Key触发员工执行
curl -X POST https://ylxt.chat/api/digital-staff/run \
  -H "X-API-Key: ba_demo_key_00000000_00000000_00000000" \
  -H "Content-Type: application/json" \
  -d '{"staffId":"DS-SYS-001","intent":"","parameters":{},"skip_mtclaw":true}'

# 在线API文档(浏览器打开)
# https://ylxt.chat/api/open/docs

# OpenAPI 3.0规范
curl https://ylxt.chat/api/open/spec

# 查询调用统计
curl "https://ylxt.chat/api/open/usage?days=7" \
  -H "X-API-Key: ba_demo_key_00000000_00000000_00000000"

8. 跨岗位编队验证

# 发起编队(需人工审批)
curl -X POST https://ylxt.chat/api/digital-staff/taskforce/adhoc \
  -H "Content-Type: application/json" \
  -d '{"title":"采购-成本-质量闭环","members":["DS-PROC-001","DS-COST-001","DS-VEN-001"],"sharedBlackboard":{"partNo":"P-1001","qty":50},"requireHumanApproval":true}'

# 查询待审批编队
curl https://ylxt.chat/api/digital-staff/taskforce/pending

# 事件总线触发器
curl https://ylxt.chat/api/digital-staff/event/triggers

故障排查

| 问题 | 原因 | 解决 |

|------|------|------|

| Server fails to start | Port occupied | netstat -ano | findstr 3006 to find and terminate the occupying process |

| LLM timeout | Network issue | Check LLM endpoint reachability in .env |

| Agent returns empty | worker field is empty in DB | Restart server (YAML→DB auto-sync) |

| Audit log missing trace_id | Old table lacks this column | Automatically ALTER TABLE to add after restart |

File Structure

server/
├── server.js                          # 主入口
├── boss-scheduler/
│   ├── position-runtime.js            # 岗位编排引擎
│   ├── lite-scheduler.js              # 调度器(含WORKERS注册表)
│   ├── workers/
│   │   ├── goai-agent-worker.js       # GOAI+巡检闭环Worker
│   │   └── procurement-chain-worker.js # 采购闭环Worker
│   └── profiles/local.yaml            # 岗位+员工YAML定义
├── routes/goai-demo.js                # GOAI Demo路由+Agent接口
├── utils/audit-logger.js              # 审计引擎(trace_id/span)
└── data/
    ├── digital-staff-config.json      # 数字员工配置
    └── boss_analytics.db              # 审计日志数据库
← 返回案例列表

Try 左帮右臂 Industrial Agent — your digital workforce

Available as a WeChat mini program, web app (ylxt.chat) and desktop client. Start from whichever fits your workflow.

🌐 Web App 💻 Desktop Download 📞 Call 189-8606-6876
WeChat mini program QR
Scan for the WeChat mini program
Share:
🤖 Try Now →
🤖
🎁