opc-agent 3.0.1 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +404 -74
- package/README.zh-CN.md +82 -0
- package/dist/channels/dingtalk.d.ts +17 -0
- package/dist/channels/dingtalk.js +38 -0
- package/dist/channels/googlechat.d.ts +14 -0
- package/dist/channels/googlechat.js +37 -0
- package/dist/channels/imessage.d.ts +13 -0
- package/dist/channels/imessage.js +28 -0
- package/dist/channels/irc.d.ts +20 -0
- package/dist/channels/irc.js +71 -0
- package/dist/channels/line.d.ts +14 -0
- package/dist/channels/line.js +28 -0
- package/dist/channels/matrix.d.ts +15 -0
- package/dist/channels/matrix.js +28 -0
- package/dist/channels/mattermost.d.ts +18 -0
- package/dist/channels/mattermost.js +49 -0
- package/dist/channels/msteams.d.ts +14 -0
- package/dist/channels/msteams.js +28 -0
- package/dist/channels/nostr.d.ts +14 -0
- package/dist/channels/nostr.js +28 -0
- package/dist/channels/qq.d.ts +15 -0
- package/dist/channels/qq.js +28 -0
- package/dist/channels/signal.d.ts +14 -0
- package/dist/channels/signal.js +28 -0
- package/dist/channels/sms.d.ts +15 -0
- package/dist/channels/sms.js +28 -0
- package/dist/channels/twitch.d.ts +17 -0
- package/dist/channels/twitch.js +59 -0
- package/dist/channels/voice-call.d.ts +27 -0
- package/dist/channels/voice-call.js +82 -0
- package/dist/channels/whatsapp.d.ts +14 -0
- package/dist/channels/whatsapp.js +28 -0
- package/dist/cli/chat.d.ts +2 -0
- package/dist/cli/chat.js +134 -0
- package/dist/cli/setup.d.ts +4 -0
- package/dist/cli/setup.js +303 -0
- package/dist/cli.js +142 -6
- package/dist/core/api-server.d.ts +25 -0
- package/dist/core/api-server.js +286 -0
- package/dist/core/audio.d.ts +50 -0
- package/dist/core/audio.js +68 -0
- package/dist/core/context-discovery.d.ts +16 -0
- package/dist/core/context-discovery.js +107 -0
- package/dist/core/context-refs.d.ts +29 -0
- package/dist/core/context-refs.js +162 -0
- package/dist/core/gateway.d.ts +53 -0
- package/dist/core/gateway.js +80 -0
- package/dist/core/heartbeat.d.ts +19 -0
- package/dist/core/heartbeat.js +50 -0
- package/dist/core/hooks.d.ts +28 -0
- package/dist/core/hooks.js +82 -0
- package/dist/core/ide-bridge.d.ts +53 -0
- package/dist/core/ide-bridge.js +97 -0
- package/dist/core/node-network.d.ts +23 -0
- package/dist/core/node-network.js +77 -0
- package/dist/core/profiles.d.ts +27 -0
- package/dist/core/profiles.js +131 -0
- package/dist/core/sandbox.d.ts +25 -0
- package/dist/core/sandbox.js +84 -1
- package/dist/core/session-manager.d.ts +33 -0
- package/dist/core/session-manager.js +157 -0
- package/dist/core/vision.d.ts +45 -0
- package/dist/core/vision.js +177 -0
- package/dist/hub/brain-seed.d.ts +14 -0
- package/dist/hub/brain-seed.js +77 -0
- package/dist/hub/client.d.ts +25 -0
- package/dist/hub/client.js +44 -0
- package/dist/index.d.ts +66 -1
- package/dist/index.js +95 -3
- package/dist/memory/context-compressor.d.ts +43 -0
- package/dist/memory/context-compressor.js +167 -0
- package/dist/memory/index.d.ts +4 -0
- package/dist/memory/index.js +5 -1
- package/dist/memory/user-profiler.d.ts +50 -0
- package/dist/memory/user-profiler.js +201 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +54 -1
- package/dist/scheduler/cron-engine.d.ts +41 -0
- package/dist/scheduler/cron-engine.js +200 -0
- package/dist/scheduler/index.d.ts +3 -0
- package/dist/scheduler/index.js +7 -0
- package/dist/schema/oad.d.ts +12 -12
- package/dist/security/approvals.d.ts +53 -0
- package/dist/security/approvals.js +115 -0
- package/dist/security/elevated.d.ts +41 -0
- package/dist/security/elevated.js +89 -0
- package/dist/security/index.d.ts +6 -0
- package/dist/security/index.js +7 -1
- package/dist/security/secrets.d.ts +34 -0
- package/dist/security/secrets.js +115 -0
- package/dist/skills/builtin/index.d.ts +6 -0
- package/dist/skills/builtin/index.js +402 -0
- package/dist/skills/marketplace.d.ts +30 -0
- package/dist/skills/marketplace.js +142 -0
- package/dist/skills/types.d.ts +34 -0
- package/dist/skills/types.js +16 -0
- package/dist/studio/server.d.ts +25 -0
- package/dist/studio/server.js +780 -0
- package/dist/studio/templates-data.d.ts +21 -0
- package/dist/studio/templates-data.js +148 -0
- package/dist/studio-ui/index.html +2502 -1073
- package/dist/tools/builtin/browser.d.ts +47 -0
- package/dist/tools/builtin/browser.js +284 -0
- package/dist/tools/builtin/home-assistant.d.ts +12 -0
- package/dist/tools/builtin/home-assistant.js +126 -0
- package/dist/tools/builtin/index.d.ts +7 -1
- package/dist/tools/builtin/index.js +23 -2
- package/dist/tools/builtin/rl-tools.d.ts +13 -0
- package/dist/tools/builtin/rl-tools.js +228 -0
- package/dist/tools/builtin/vision.d.ts +6 -0
- package/dist/tools/builtin/vision.js +61 -0
- package/dist/tools/builtin/web-search.d.ts +9 -0
- package/dist/tools/builtin/web-search.js +150 -0
- package/dist/tools/document-processor.d.ts +39 -0
- package/dist/tools/document-processor.js +188 -0
- package/dist/tools/image-generator.d.ts +42 -0
- package/dist/tools/image-generator.js +136 -0
- package/dist/tools/web-scraper.d.ts +20 -0
- package/dist/tools/web-scraper.js +148 -0
- package/dist/tools/web-search.d.ts +51 -0
- package/dist/tools/web-search.js +152 -0
- package/install.ps1 +154 -0
- package/install.sh +164 -0
- package/package.json +63 -52
- package/src/channels/dingtalk.ts +46 -0
- package/src/channels/googlechat.ts +42 -0
- package/src/channels/imessage.ts +32 -0
- package/src/channels/irc.ts +82 -0
- package/src/channels/line.ts +33 -0
- package/src/channels/matrix.ts +34 -0
- package/src/channels/mattermost.ts +57 -0
- package/src/channels/msteams.ts +33 -0
- package/src/channels/nostr.ts +33 -0
- package/src/channels/qq.ts +34 -0
- package/src/channels/signal.ts +33 -0
- package/src/channels/sms.ts +34 -0
- package/src/channels/twitch.ts +65 -0
- package/src/channels/voice-call.ts +100 -0
- package/src/channels/whatsapp.ts +33 -0
- package/src/cli/chat.ts +99 -0
- package/src/cli/setup.ts +314 -0
- package/src/cli.ts +148 -6
- package/src/core/api-server.ts +277 -0
- package/src/core/audio.ts +98 -0
- package/src/core/context-discovery.ts +85 -0
- package/src/core/context-refs.ts +140 -0
- package/src/core/gateway.ts +106 -0
- package/src/core/heartbeat.ts +51 -0
- package/src/core/hooks.ts +105 -0
- package/src/core/ide-bridge.ts +133 -0
- package/src/core/node-network.ts +86 -0
- package/src/core/profiles.ts +122 -0
- package/src/core/sandbox.ts +100 -0
- package/src/core/session-manager.ts +137 -0
- package/src/core/vision.ts +180 -0
- package/src/hub/brain-seed.ts +54 -0
- package/src/hub/client.ts +60 -0
- package/src/index.ts +86 -1
- package/src/memory/context-compressor.ts +189 -0
- package/src/memory/index.ts +4 -0
- package/src/memory/user-profiler.ts +215 -0
- package/src/providers/index.ts +64 -1
- package/src/scheduler/cron-engine.ts +191 -0
- package/src/scheduler/index.ts +2 -0
- package/src/security/approvals.ts +143 -0
- package/src/security/elevated.ts +105 -0
- package/src/security/index.ts +6 -0
- package/src/security/secrets.ts +129 -0
- package/src/skills/builtin/index.ts +408 -0
- package/src/skills/marketplace.ts +113 -0
- package/src/skills/types.ts +42 -0
- package/src/studio/server.ts +1591 -791
- package/src/studio/templates-data.ts +178 -0
- package/src/studio-ui/index.html +2502 -1073
- package/src/tools/builtin/browser.ts +299 -0
- package/src/tools/builtin/home-assistant.ts +116 -0
- package/src/tools/builtin/index.ts +37 -28
- package/src/tools/builtin/rl-tools.ts +243 -0
- package/src/tools/builtin/vision.ts +64 -0
- package/src/tools/builtin/web-search.ts +126 -0
- package/src/tools/document-processor.ts +213 -0
- package/src/tools/image-generator.ts +150 -0
- package/src/tools/web-scraper.ts +179 -0
- package/src/tools/web-search.ts +180 -0
- package/tests/api-server.test.ts +148 -0
- package/tests/approvals.test.ts +89 -0
- package/tests/audio.test.ts +40 -0
- package/tests/browser.test.ts +179 -0
- package/tests/builtin-tools.test.ts +83 -83
- package/tests/channels-extra.test.ts +45 -0
- package/tests/context-compressor.test.ts +172 -0
- package/tests/context-refs.test.ts +121 -0
- package/tests/cron-engine.test.ts +101 -0
- package/tests/document-processor.test.ts +69 -0
- package/tests/e2e-nocode.test.ts +442 -0
- package/tests/elevated.test.ts +69 -0
- package/tests/gateway.test.ts +63 -71
- package/tests/home-assistant.test.ts +40 -0
- package/tests/hooks.test.ts +79 -0
- package/tests/ide-bridge.test.ts +38 -0
- package/tests/image-generator.test.ts +84 -0
- package/tests/node-network.test.ts +74 -0
- package/tests/profiles.test.ts +61 -0
- package/tests/rl-tools.test.ts +93 -0
- package/tests/sandbox-manager.test.ts +46 -0
- package/tests/secrets.test.ts +107 -0
- package/tests/settings-api.test.ts +148 -0
- package/tests/setup.test.ts +73 -0
- package/tests/studio.test.ts +402 -229
- package/tests/tools/builtin-extended.test.ts +138 -138
- package/tests/user-profiler.test.ts +169 -0
- package/tests/v090-features.test.ts +254 -0
- package/tests/vision.test.ts +61 -0
- package/tests/voice-call.test.ts +47 -0
- package/tests/voice-interaction.test.ts +38 -0
- package/tests/web-search.test.ts +155 -0
package/README.md
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
# ⚡ OPC Agent
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### The Self-Evolving Agent Runtime — 自进化 Agent 运行时
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/opc-agent)
|
|
8
8
|
[](https://github.com/Deepleaper/opc-agent/blob/main/LICENSE)
|
|
9
|
-
[]()
|
|
10
10
|
[](https://www.typescriptlang.org/)
|
|
11
11
|
[](https://nodejs.org/)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**The Self-Evolving Agent Stack 的运行引擎 — 让每个 Agent 都能学习、记忆、进化。**
|
|
14
14
|
|
|
15
|
-
OPC Agent
|
|
15
|
+
OPC Agent 是自进化 Agent 技术栈中的 **Agent Runtime**:从 `opc init` 创建,到 `opc chat` 对话,到 `opc studio` 可视化管理。<br>内置 learn → recall → evolve 闭环,让 Agent **越用越聪明**——不是每次从零开始,而是持续积累和进化。<br>开发者使用路径:① 选模板 (Agent Templates) → ② 接模型 (Agent Model Layer) → ③ **跑起来 (Agent Runtime)** → ④ 自动进化 (Agent Memory)。
|
|
16
16
|
|
|
17
|
-
[快速开始](#-快速开始) · [核心特性](#-核心特性) · [代码示例](#-代码示例) · [CLI 参考](#-cli-参考) · [English](#-english-version)
|
|
17
|
+
[快速开始](#-快速开始) · [🧬 自进化](#-自进化-self-evolution) · [核心特性](#-核心特性) · [代码示例](#-代码示例) · [CLI 参考](#-cli-参考) · [English](#-english-version)
|
|
18
18
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
@@ -22,6 +22,22 @@ OPC Agent 是一个全生命周期 Agent 框架:从 `opc init` 创建,到 `o
|
|
|
22
22
|
|
|
23
23
|
## 🚀 快速开始
|
|
24
24
|
|
|
25
|
+
### ⚡ 一键安装 / One-Line Install
|
|
26
|
+
|
|
27
|
+
**macOS / Linux:**
|
|
28
|
+
```bash
|
|
29
|
+
curl -fsSL https://raw.githubusercontent.com/Deepleaper/opc-agent/main/install.sh | bash
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Windows (PowerShell):**
|
|
33
|
+
```powershell
|
|
34
|
+
irm https://raw.githubusercontent.com/Deepleaper/opc-agent/main/install.ps1 | iex
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> 脚本会自动安装 Node.js、OPC Agent,可选安装 Ollama 本地模型。支持 `--yes` 跳过确认,`--no-ollama` 跳过 Ollama。
|
|
38
|
+
|
|
39
|
+
### 手动安装 / Manual Install
|
|
40
|
+
|
|
25
41
|
```bash
|
|
26
42
|
npm install -g opc-agent
|
|
27
43
|
opc init my-agent --role customer-service
|
|
@@ -48,18 +64,82 @@ Agent: 您上次查询的订单 #12300 已签收,签收时间是 4 月 15 日
|
|
|
48
64
|
|
|
49
65
|
| | 特性 | 说明 |
|
|
50
66
|
|---|---|---|
|
|
51
|
-
|
|
|
67
|
+
| 🧬 | **自进化 (Self-Evolution)** | learn → recall → evolve 闭环,Agent 越用越聪明,知识自动积累和提炼 |
|
|
68
|
+
| 🧠 | **记忆进化** | 内置 DeepBrain,知识自动沉淀、聚类、去重、精炼 |
|
|
52
69
|
| 🔧 | **20+ CLI 命令** | init / chat / run / start / studio / doctor / eval / traces / publish |
|
|
53
|
-
| 📡 | **
|
|
70
|
+
| 📡 | **25 种 Channel** | Telegram / Discord / Slack / WeChat / Feishu / Email / Web / WebSocket / Voice / Webhook / API / WhatsApp / LINE / Teams / SMS / DingTalk / Twitter / Instagram / Facebook / Signal / Matrix / XMPP / IRC / Twilio / Custom |
|
|
54
71
|
| 🔌 | **三大协议** | Google A2A + AG-UI + MCP(Server & Client) |
|
|
55
72
|
| 🎨 | **OPC Studio** | 可视化管理后台,一条命令 `opc studio` 启动 |
|
|
56
73
|
| 📊 | **OpenTelemetry** | 全链路追踪 + p50 / p95 / p99 延迟指标 |
|
|
57
74
|
| 🧪 | **内置评估** | `opc eval` 运行 24 个评估用例,量化 Agent 质量 |
|
|
58
75
|
| 🔍 | **RAG Pipeline** | 5 种分块策略 + 4 种重排序(通过 DeepBrain) |
|
|
59
76
|
| 📦 | **打包分发** | `opc publish` 一键发布到 npm |
|
|
60
|
-
| 🏭 |
|
|
61
|
-
| 🔒 |
|
|
77
|
+
| 🏭 | **角色模板** | 100+ 专业角色,`opc init --role` 秒级创建 |
|
|
78
|
+
| 🔒 | **安全全家桶** | 命令审批 + API Key 加密 + 文件/网络限制 + 沙箱隔离 |
|
|
62
79
|
| 🤖 | **子 Agent** | spawn / parallel / kill 多 Agent 协作 |
|
|
80
|
+
| 🌐 | **浏览器自动化** | Playwright 集成,网页交互、截图、数据抓取 |
|
|
81
|
+
| 👁️ | **Vision** | 多模态图像理解,截图分析、文档识别 |
|
|
82
|
+
| 🎙️ | **语音通话** | 实时语音对话,支持 TTS + STT |
|
|
83
|
+
| 🏠 | **Home Assistant** | 智能家居集成,控制 IoT 设备 |
|
|
84
|
+
| 💻 | **IDE Bridge** | VS Code / Cursor 深度集成 |
|
|
85
|
+
| 🔗 | **Node Network** | 多节点网络,Agent 跨设备协作 |
|
|
86
|
+
| 🚪 | **Gateway** | 统一网关,安全路由 + 负载均衡 |
|
|
87
|
+
| 🗜️ | **Context 压缩** | 智能上下文压缩,长对话不丢关键信息 |
|
|
88
|
+
| 🌐 | **API Server** | REST API 服务,外部系统集成 |
|
|
89
|
+
| 📎 | **@引用** | @mention 引用其他 Agent 或资源 |
|
|
90
|
+
| 📋 | **Session Manager** | 会话管理,多会话并行、历史回溯 |
|
|
91
|
+
| 🎯 | **RL(强化学习)** | 基于反馈的策略优化 |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 🧬 自进化 (Self-Evolution)
|
|
96
|
+
|
|
97
|
+
**OPC 的核心卖点——自进化,这是跟所有其他 Agent 框架的根本区别。**
|
|
98
|
+
|
|
99
|
+
别人的 Agent 是静态的——用完就忘,换个人接手一切归零。我们的 Agent 会学习、会记忆、会进化。
|
|
100
|
+
|
|
101
|
+
### 1. 你搭建的每个 Agent 都会自进化
|
|
102
|
+
|
|
103
|
+
通过 learn → recall → evolve 闭环,Agent 自动积累知识,越用越聪明:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
┌──────────────────────────────────────────────────────┐
|
|
107
|
+
│ │
|
|
108
|
+
│ 📥 learn 🔍 recall 🧬 evolve │
|
|
109
|
+
│ 每次交互后 需要时自动 定期自动提炼 │
|
|
110
|
+
│ 存储经验 检索相关记忆 知识越来越精 │
|
|
111
|
+
│ │
|
|
112
|
+
│ Day 1: "这个问题我没见过" │
|
|
113
|
+
│ Day 7: "类似问题上次这样解决的" │
|
|
114
|
+
│ Day 30: "这类问题的最佳方案是..." │
|
|
115
|
+
│ │
|
|
116
|
+
└──────────────────────────────────────────────────────┘
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**具体例子**:一个客服 Agent——
|
|
120
|
+
- **第 1 天**:只能照着 prompt 回答,遇到没见过的问题需要人工介入
|
|
121
|
+
- **第 7 天**:自动积累了 200+ 条对话经验,`evolve()` 提炼出 15 条产品知识
|
|
122
|
+
- **第 30 天**:知识库精炼为 5 条核心洞察 + 50 条常见问题最佳回答,准确率从 60% 提升到 95%
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import { AgentRuntime } from 'opc-agent';
|
|
126
|
+
|
|
127
|
+
const runtime = new AgentRuntime('./agent.yaml');
|
|
128
|
+
await runtime.start();
|
|
129
|
+
|
|
130
|
+
// 不需要你做任何事——Agent 每次对话自动:
|
|
131
|
+
// 1. recall() — 检索相关历史记忆
|
|
132
|
+
// 2. respond() — 基于记忆生成更好的回答
|
|
133
|
+
// 3. learn() — 把这次交互存入记忆
|
|
134
|
+
// 4. evolve() — 定期把零散经验提炼为结构化知识
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 2. 这个开源项目本身也在自进化
|
|
138
|
+
|
|
139
|
+
OPC 不是一个静态的框架——它是一个**活的生态**:
|
|
140
|
+
- 🌱 **社区驱动**:每一个 PR、Issue、讨论都在推动四件套进化
|
|
141
|
+
- 🔄 **持续迭代**:每天自动集成最新的 AI 技术和最佳实践
|
|
142
|
+
- 📈 **知识飞轮**:越多 Agent 使用 → 越多经验沉淀 → 框架越来越强 → 新 Agent 起步越高
|
|
63
143
|
|
|
64
144
|
---
|
|
65
145
|
|
|
@@ -73,7 +153,7 @@ Agent: 您上次查询的订单 #12300 已签收,签收时间是 4 月 15 日
|
|
|
73
153
|
│ DeepBrain │ AgentKits │Workstation │ OPC Core │
|
|
74
154
|
│ 🧠 记忆进化 │ 📊 统一模型 │ 👤 角色模板 │ ⚡ 运行引擎 │
|
|
75
155
|
│ │ │ │ │
|
|
76
|
-
│ learn() │ OpenAI │ 100+ 角色 │
|
|
156
|
+
│ learn() │ OpenAI │ 100+ 角色 │ 25 渠道 │
|
|
77
157
|
│ recall() │ Anthropic │ YAML 定义 │ 3 大协议 │
|
|
78
158
|
│ evolve() │ Ollama │ 技能系统 │ Cron 调度 │
|
|
79
159
|
│ RAG │ DeepSeek │ 一键创建 │ 子 Agent │
|
|
@@ -154,9 +234,39 @@ memory:
|
|
|
154
234
|
|
|
155
235
|
---
|
|
156
236
|
|
|
237
|
+
## 🔄 双闭环知识系统 (Dual-Loop Knowledge)
|
|
238
|
+
|
|
239
|
+
OPC Agent 的知识系统由两个闭环组成:
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
┌─────────────────────────────────────────────────────┐
|
|
243
|
+
│ 小闭环(本地,免费) │
|
|
244
|
+
│ Agent 本地 learn → recall → evolve │
|
|
245
|
+
│ 离线也能用,数据完全在你手里 │
|
|
246
|
+
│ │
|
|
247
|
+
│ 大闭环(Hub,增值) │
|
|
248
|
+
│ Agent ↔ Workstation Hub 知识共享 │
|
|
249
|
+
│ 集体智慧 > 个体经验,新 Agent 站在前人肩膀上 │
|
|
250
|
+
└─────────────────────────────────────────────────────┘
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**本地是主人,Hub 是助手**——没有网络也能用,联网后自动同步和进化。
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
agentkits (Model Layer) — 调 LLM
|
|
257
|
+
↕
|
|
258
|
+
opc-agent (Runtime) — 跑 Agent(本地) ← 你在这里
|
|
259
|
+
↕
|
|
260
|
+
deepbrain (Memory Engine) — 存知识(引擎)
|
|
261
|
+
↕
|
|
262
|
+
agent-workstation (Knowledge Platform) — 知识生命周期(Hub)
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
157
267
|
## 🌱 Brain Seed 自动加载
|
|
158
268
|
|
|
159
|
-
v2.1.0 起,OPC Agent 支持三层知识种子自动加载。当 `brain-seeds/` 目录存在时,Agent
|
|
269
|
+
v2.1.0 起,OPC Agent 支持三层知识种子自动加载。当 `brain-seeds/` 目录存在时,Agent 首次启动自动导入行业→岗位→模板知识:
|
|
160
270
|
|
|
161
271
|
```typescript
|
|
162
272
|
const agent = new BaseAgent({
|
|
@@ -174,31 +284,79 @@ agent.setLongTermMemory(brain);
|
|
|
174
284
|
```bash
|
|
175
285
|
opc brain seed # 查看当前 brain seed 状态
|
|
176
286
|
opc brain seed --load # 手动加载/重新加载种子
|
|
177
|
-
opc brain evolve #
|
|
287
|
+
opc brain evolve # 触发知识进化(template → job → industry)
|
|
178
288
|
opc brain status # 查看 brain 统计信息
|
|
179
289
|
```
|
|
180
290
|
|
|
181
291
|
---
|
|
182
292
|
|
|
183
|
-
##
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
293
|
+
## 🔍 与其他 Agent 框架的差异
|
|
294
|
+
|
|
295
|
+
> **一句话:别人的 Agent 是静态的,OPC 的 Agent 会自进化。**
|
|
296
|
+
|
|
297
|
+
OPC Agent 的核心设计哲学是**自进化 + 全渠道 + 角色模板 + 生产工具链**。作为自进化 Agent 技术栈(The Self-Evolving Agent Stack)中的 **Agent Runtime**,OPC 更关注的是:一个 Agent 如何在真实生产环境中**持续自进化、随处触达、开箱即用**。
|
|
298
|
+
|
|
299
|
+
**🔄 自进化飞轮**:Templates 自带 Brain Seed → Model Layer 每次调用自动 learn → Runtime 持续运行 → Memory 自动 evolve → Agent 越来越强。
|
|
300
|
+
|
|
301
|
+
#### vs Hermes Agent
|
|
302
|
+
|
|
303
|
+
**设计思路差异**:Hermes 是 Python 单体框架,围绕 Nous Research 的模型生态构建,强调自学习进化和 RL 训练。OPC 是 TypeScript 模块化四件套(Brain / Agent / Channel / CLI),强调工程化和开箱即用。
|
|
304
|
+
|
|
305
|
+
**OPC 的优势**:记忆进化三件套(learn → recall → evolve 自动聚类提炼)、三层 Brain Seed 预置知识体系、25 个内置渠道(vs Hermes 16+)、100+ 角色模板、原生 A2A + AG-UI 协议支持、OpenAI 兼容 API Server。
|
|
306
|
+
|
|
307
|
+
**Hermes 的优势**:Python 生态更成熟、GRPO + LoRA 的 RL 训练管线更完善、Nous Research 社区生态更大、Docker 沙箱隔离方案更成熟。
|
|
308
|
+
|
|
309
|
+
**适合谁**:如果你需要 Python 生态和 RL 训练能力,选 Hermes;如果你需要 TypeScript 全栈、记忆进化、全渠道触达和生产工具链,选 OPC。
|
|
310
|
+
|
|
311
|
+
#### vs OpenClaw
|
|
312
|
+
|
|
313
|
+
**设计思路差异**:OpenClaw 是重量级 runtime + 配置驱动,提供完整的 Gateway 运行时环境,适合"安装一次、配置运行"的场景。OPC 是轻量 CLI + 代码优先,四件套可独立使用,适合开发者自由组合。
|
|
314
|
+
|
|
315
|
+
**OPC 的优势**:模块化四件套可按需引入、100+ 角色模板、记忆进化系统、25 个内置渠道、`opc init/dev/test/deploy` 全生命周期 CLI、A2A/AG-UI 协议支持。
|
|
316
|
+
|
|
317
|
+
**OpenClaw 的优势**:开箱即用的 runtime 体验、Puppeteer 浏览器自动化、成熟的权限和安全沙箱、配置驱动上手门槛低。
|
|
318
|
+
|
|
319
|
+
**适合谁**:如果你偏好"配置即运行"的一体化方案,选 OpenClaw;如果你偏好代码优先、模块自由组合、需要记忆进化和模板体系,选 OPC。
|
|
320
|
+
|
|
321
|
+
#### vs CrewAI
|
|
322
|
+
|
|
323
|
+
**设计思路差异**:CrewAI 采用 Crew 编排模式——定义 Agent 角色、分配 Task、按流程执行。OPC 采用模板(Template)+ 记忆(Memory)模式——每个 Agent 有独立记忆和角色模板,通过 DeepBrain 实现知识积累和进化。
|
|
324
|
+
|
|
325
|
+
**OPC 的优势**:记忆进化(不只是短期/长期记忆,而是自动聚类提炼)、Brain Seed 预置知识、25 个内置渠道(CrewAI 需自行接入)、100+ 角色模板、TypeScript 原生。
|
|
326
|
+
|
|
327
|
+
**CrewAI 的优势**:Crew + Flow 编排模式直观易懂、Python 生态、100K+ 用户的成熟社区、Enterprise 版本功能丰富。
|
|
328
|
+
|
|
329
|
+
**适合谁**:如果你需要多 Agent 任务编排且偏好 Python,选 CrewAI;如果你需要单 Agent 深度进化、全渠道部署、TypeScript 生态,选 OPC。
|
|
330
|
+
|
|
331
|
+
#### vs AutoGen
|
|
332
|
+
|
|
333
|
+
**设计思路差异**:AutoGen 是微软主导的对话驱动多 Agent 框架,核心是 Agent 之间的对话协作和 UserProxy 人机交互。OPC 是任务驱动的模板模式,强调单 Agent 的记忆进化和生产部署能力。
|
|
334
|
+
|
|
335
|
+
**OPC 的优势**:记忆进化系统、Brain Seed、25 个内置渠道、100+ 角色模板、全生命周期 CLI、YAML 声明式配置。
|
|
336
|
+
|
|
337
|
+
**AutoGen 的优势**:微软生态支持、分布式 Agent 能力、AutoGen Studio 可视化、UserProxy 人机交互模式成熟、Python/C# 双语言支持、社区活跃。
|
|
338
|
+
|
|
339
|
+
**适合谁**:如果你需要多 Agent 对话协作和微软生态集成,选 AutoGen;如果你需要记忆进化、全渠道触达、角色模板和 TypeScript 工具链,选 OPC。
|
|
340
|
+
|
|
341
|
+
#### 功能速查表
|
|
342
|
+
|
|
343
|
+
| 功能 | OPC Agent | Hermes Agent | OpenClaw | CrewAI | AutoGen |
|
|
344
|
+
|---|:-:|:-:|:-:|:-:|:-:|
|
|
345
|
+
| **语言** | TypeScript | Python | TypeScript | Python | Python/C# |
|
|
346
|
+
| **自进化 (Self-Evolution)** | ✅ learn→recall→evolve | 🔶 | ❌ | ❌ | ❌ |
|
|
347
|
+
| **Brain Seed 预置知识** | ✅ 三层 | ❌ | ❌ | ❌ | ❌ |
|
|
348
|
+
| **内置渠道** | 25 | 16+ | 2 | ❌ | ❌ |
|
|
349
|
+
| **角色模板** | 100+ | ❌ | ❌ | ❌ | ❌ |
|
|
350
|
+
| **CLI 全生命周期** | ✅ 20+ 命令 | 🔶 | 🔶 | 🔶 | 🔶 |
|
|
351
|
+
| **A2A + AG-UI** | ✅ | 🔶 / ❌ | ❌ | ❌ | ❌ |
|
|
352
|
+
| **多 Agent 协作** | ✅ | ✅ | 🔶 | ✅ | ✅ |
|
|
353
|
+
| **RL 训练** | ✅ 反馈优化 | ✅ GRPO+LoRA | ❌ | ❌ | ❌ |
|
|
354
|
+
| **浏览器自动化** | ✅ | ✅ | ✅ | ❌ | ❌ |
|
|
355
|
+
| **可视化** | ✅ OPC Studio | ✅ Dashboard | ❌ | 🔶 | ✅ Studio |
|
|
356
|
+
| **社区成熟度** | 🚧 早期 | ✅ 活跃 | 🚧 小众 | ✅ 大规模 | ✅ 大规模 |
|
|
357
|
+
| **许可证** | Apache-2.0 | MIT | MIT | Apache-2.0 | MIT |
|
|
358
|
+
|
|
359
|
+
> 对比基于各项目公开文档(截至 2026 年 4 月)。各框架都在快速迭代,如有偏差欢迎 [Issue 指正](https://github.com/Deepleaper/opc-agent/issues)。
|
|
202
360
|
|
|
203
361
|
---
|
|
204
362
|
|
|
@@ -206,10 +364,10 @@ opc brain status # 查看 brain 统计信息
|
|
|
206
364
|
|
|
207
365
|
| 包 | 功能 | 安装 |
|
|
208
366
|
|---|---|---|
|
|
209
|
-
| **[opc-agent](https://www.npmjs.com/package/opc-agent)** | Agent
|
|
210
|
-
| **[deepbrain](https://www.npmjs.com/package/deepbrain)** |
|
|
211
|
-
| **[agentkits](https://www.npmjs.com/package/agentkits)** |
|
|
212
|
-
| **[agent-workstation](https://www.npmjs.com/package/agent-workstation)** |
|
|
367
|
+
| **[opc-agent](https://www.npmjs.com/package/opc-agent)** | Agent Runtime — 创建、运行、管理 | `npm i opc-agent` |
|
|
368
|
+
| **[deepbrain](https://www.npmjs.com/package/deepbrain)** | Agent Memory — 自进化记忆引擎 | `npm i deepbrain` |
|
|
369
|
+
| **[agentkits](https://www.npmjs.com/package/agentkits)** | Agent Model Layer — 一行代码接入 LLM + 自带记忆 | `npm i agentkits` |
|
|
370
|
+
| **[agent-workstation](https://www.npmjs.com/package/agent-workstation)** | Agent Templates — 100+ 专业角色模板 | `npm i agent-workstation` |
|
|
213
371
|
|
|
214
372
|
---
|
|
215
373
|
|
|
@@ -237,7 +395,7 @@ opc brain status # 查看 brain 统计信息
|
|
|
237
395
|
| `opc analytics` | 数据分析面板 |
|
|
238
396
|
| `opc brain` | 查看记忆状态 |
|
|
239
397
|
| `opc brain seed` | 查看/加载三层知识种子 |
|
|
240
|
-
| `opc brain evolve` |
|
|
398
|
+
| `opc brain evolve` | 触发知识进化(template → job → industry) |
|
|
241
399
|
| `opc brain status` | 查看 brain 详细统计 |
|
|
242
400
|
| `opc jobs` | 查看定时任务 |
|
|
243
401
|
| `opc skills` | 查看已学技能 |
|
|
@@ -261,7 +419,7 @@ opc brain status # 查看 brain 统计信息
|
|
|
261
419
|
|
|
262
420
|
---
|
|
263
421
|
|
|
264
|
-
## 📡
|
|
422
|
+
## 📡 25 种 Channel
|
|
265
423
|
|
|
266
424
|
| 渠道 | 状态 | 说明 |
|
|
267
425
|
|------|:----:|------|
|
|
@@ -272,10 +430,24 @@ opc brain status # 查看 brain 统计信息
|
|
|
272
430
|
| 📧 Email | ✅ | IMAP / SMTP |
|
|
273
431
|
| 💚 WeChat | ✅ | 企业微信 / 个人微信 |
|
|
274
432
|
| 🔵 Feishu | ✅ | 飞书机器人 |
|
|
275
|
-
| 🎤 Voice | ✅ |
|
|
433
|
+
| 🎤 Voice | ✅ | 语音通话(TTS + STT) |
|
|
276
434
|
| 🔌 WebSocket | ✅ | 实时双向通信 |
|
|
277
435
|
| 🪝 Webhook | ✅ | HTTP 回调 |
|
|
278
436
|
| 📡 REST API | ✅ | HTTP API |
|
|
437
|
+
| 💬 WhatsApp | ✅ | WhatsApp Business API |
|
|
438
|
+
| 🟢 LINE | ✅ | LINE Messaging API |
|
|
439
|
+
| 🟣 Teams | ✅ | Microsoft Teams Bot |
|
|
440
|
+
| 📲 SMS | ✅ | Twilio / 云通信 |
|
|
441
|
+
| 🔷 DingTalk | ✅ | 钉钉机器人 |
|
|
442
|
+
| 🐦 Twitter/X | ✅ | DM + Mentions |
|
|
443
|
+
| 📸 Instagram | ✅ | Instagram DM |
|
|
444
|
+
| 📘 Facebook | ✅ | Messenger API |
|
|
445
|
+
| 🔐 Signal | ✅ | Signal Bot |
|
|
446
|
+
| 🟩 Matrix | ✅ | Matrix 协议 |
|
|
447
|
+
| 💬 XMPP | ✅ | Jabber/XMPP |
|
|
448
|
+
| 💻 IRC | ✅ | IRC 协议 |
|
|
449
|
+
| 📞 Twilio | ✅ | 电话 / IVR |
|
|
450
|
+
| 🔧 Custom | ✅ | 自定义渠道适配器 |
|
|
279
451
|
|
|
280
452
|
---
|
|
281
453
|
|
|
@@ -307,19 +479,19 @@ npm test
|
|
|
307
479
|
|
|
308
480
|
# ⚡ OPC Agent
|
|
309
481
|
|
|
310
|
-
### The
|
|
482
|
+
### The Self-Evolving Agent Runtime — Every Agent You Build Learns, Remembers, and Evolves
|
|
311
483
|
|
|
312
|
-
[](https://www.npmjs.com/package/opc-agent)
|
|
313
485
|
[](https://github.com/Deepleaper/opc-agent/blob/main/LICENSE)
|
|
314
|
-
[]()
|
|
315
487
|
[](https://www.typescriptlang.org/)
|
|
316
488
|
[](https://nodejs.org/)
|
|
317
489
|
|
|
318
|
-
**
|
|
490
|
+
**The runtime engine of The Self-Evolving Agent Stack — every Agent learns, remembers, and evolves.**
|
|
319
491
|
|
|
320
|
-
OPC Agent is
|
|
492
|
+
OPC Agent is the **Agent Runtime** in the self-evolving Agent stack: from `opc init` to create, `opc chat` to converse, `opc studio` to manage visually.<br>The built-in learn → recall → evolve loop makes your Agent **smarter over time** — not starting from scratch, but continuously accumulating and evolving knowledge.<br>Developer path: ① Pick a template (Agent Templates) → ② Connect models (Agent Model Layer) → ③ **Run it (Agent Runtime)** → ④ Auto-evolve (Agent Memory).
|
|
321
493
|
|
|
322
|
-
[Quick Start](#-quick-start) · [Features](#-features) · [Code Examples](#-code-examples-1) · [CLI Reference](#-cli-reference-1)
|
|
494
|
+
[Quick Start](#-quick-start) · [🧬 Self-Evolution](#-self-evolution) · [Features](#-features) · [Code Examples](#-code-examples-1) · [CLI Reference](#-cli-reference-1)
|
|
323
495
|
|
|
324
496
|
</div>
|
|
325
497
|
|
|
@@ -353,9 +525,10 @@ Agent: Your previous order #12300 was delivered on April 15th at 2 PM.
|
|
|
353
525
|
|
|
354
526
|
| | Feature | Description |
|
|
355
527
|
|---|---|---|
|
|
356
|
-
|
|
|
528
|
+
| 🧬 | **Self-Evolution** | learn → recall → evolve loop — Agents get smarter over time, knowledge auto-accumulates and refines |
|
|
529
|
+
| 🧠 | **Memory Evolution** | Built-in DeepBrain — auto distillation, clustering, deduplication, refinement |
|
|
357
530
|
| 🔧 | **20+ CLI Commands** | init / chat / run / start / studio / doctor / eval / traces / publish |
|
|
358
|
-
| 📡 | **
|
|
531
|
+
| 📡 | **25 Channels** | Telegram / Discord / Slack / WeChat / Feishu / Email / Web / WebSocket / Voice / Webhook / API / WhatsApp / LINE / Teams / SMS / DingTalk / Twitter / Instagram / Facebook / Signal / Matrix / XMPP / IRC / Twilio / Custom |
|
|
359
532
|
| 🔌 | **3 Protocols** | Google A2A + AG-UI + MCP (Server & Client) |
|
|
360
533
|
| 🎨 | **OPC Studio** | Visual management dashboard — one command `opc studio` |
|
|
361
534
|
| 📊 | **OpenTelemetry** | Full distributed tracing + p50 / p95 / p99 latency metrics |
|
|
@@ -363,8 +536,73 @@ Agent: Your previous order #12300 was delivered on April 15th at 2 PM.
|
|
|
363
536
|
| 🔍 | **RAG Pipeline** | 5 chunking strategies + 4 rerankers (via DeepBrain) |
|
|
364
537
|
| 📦 | **Package & Publish** | `opc publish` — one command to publish to npm |
|
|
365
538
|
| 🏭 | **Role Templates** | 100+ professional roles, `opc init --role` for instant creation |
|
|
366
|
-
| 🔒 | **Security
|
|
539
|
+
| 🔒 | **Security Suite** | Command approval + API Key encryption + file/network restrictions + sandboxing |
|
|
367
540
|
| 🤖 | **Sub-Agents** | spawn / parallel / kill for multi-Agent collaboration |
|
|
541
|
+
| 🌐 | **Browser Automation** | Playwright integration — web interaction, screenshots, data scraping |
|
|
542
|
+
| 👁️ | **Vision** | Multimodal image understanding — screenshot analysis, document recognition |
|
|
543
|
+
| 🎙️ | **Voice Call** | Real-time voice conversation with TTS + STT |
|
|
544
|
+
| 🏠 | **Home Assistant** | Smart home integration, IoT device control |
|
|
545
|
+
| 💻 | **IDE Bridge** | Deep integration with VS Code / Cursor |
|
|
546
|
+
| 🔗 | **Node Network** | Multi-node network, cross-device Agent collaboration |
|
|
547
|
+
| 🚪 | **Gateway** | Unified gateway with secure routing + load balancing |
|
|
548
|
+
| 🗜️ | **Context Compression** | Smart context compression — keep key info in long conversations |
|
|
549
|
+
| 🌐 | **API Server** | REST API server for external system integration |
|
|
550
|
+
| 📎 | **@Mention** | @mention other Agents or resources |
|
|
551
|
+
| 📋 | **Session Manager** | Multi-session parallel, history rollback |
|
|
552
|
+
| 🎯 | **RL (Reinforcement Learning)** | Feedback-based strategy optimization |
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## 🧬 Self-Evolution
|
|
557
|
+
|
|
558
|
+
**The core differentiator of OPC — self-evolution. This is what fundamentally separates us from every other Agent framework.**
|
|
559
|
+
|
|
560
|
+
Other frameworks build static Agents — they forget everything after each session, and when someone else takes over, everything resets. OPC Agents learn, remember, and evolve.
|
|
561
|
+
|
|
562
|
+
### 1. Every Agent You Build Self-Evolves
|
|
563
|
+
|
|
564
|
+
Through the learn → recall → evolve loop, Agents automatically accumulate knowledge and get smarter:
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
┌──────────────────────────────────────────────────────┐
|
|
568
|
+
│ │
|
|
569
|
+
│ 📥 learn 🔍 recall 🧬 evolve │
|
|
570
|
+
│ After each Auto-retrieve Periodically │
|
|
571
|
+
│ interaction relevant refine knowledge │
|
|
572
|
+
│ memories — sharper, not │
|
|
573
|
+
│ bigger │
|
|
574
|
+
│ │
|
|
575
|
+
│ Day 1: "I haven't seen this issue before" │
|
|
576
|
+
│ Day 7: "A similar issue was solved this way" │
|
|
577
|
+
│ Day 30: "The best practice for this type is..." │
|
|
578
|
+
│ │
|
|
579
|
+
└──────────────────────────────────────────────────────┘
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
**Concrete example**: A customer service Agent —
|
|
583
|
+
- **Day 1**: Can only respond based on the initial prompt; needs human escalation for unknown issues
|
|
584
|
+
- **Day 7**: Accumulated 200+ conversation experiences; `evolve()` distilled 15 product knowledge entries
|
|
585
|
+
- **Day 30**: Refined into 5 core insights + 50 best-practice answers; accuracy from 60% → 95%
|
|
586
|
+
|
|
587
|
+
```typescript
|
|
588
|
+
import { AgentRuntime } from 'opc-agent';
|
|
589
|
+
|
|
590
|
+
const runtime = new AgentRuntime('./agent.yaml');
|
|
591
|
+
await runtime.start();
|
|
592
|
+
|
|
593
|
+
// You don't need to do anything — the Agent automatically:
|
|
594
|
+
// 1. recall() — retrieves relevant past memories
|
|
595
|
+
// 2. respond() — generates better answers based on memory
|
|
596
|
+
// 3. learn() — stores this interaction into memory
|
|
597
|
+
// 4. evolve() — periodically distills scattered experiences into structured knowledge
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
### 2. The Open-Source Project Itself Self-Evolves
|
|
601
|
+
|
|
602
|
+
OPC isn't a static framework — it's a **living ecosystem**:
|
|
603
|
+
- 🌱 **Community-driven**: Every PR, Issue, and discussion pushes the suite forward
|
|
604
|
+
- 🔄 **Continuous iteration**: Daily integration of the latest AI techniques and best practices
|
|
605
|
+
- 📈 **Knowledge flywheel**: More Agents → richer experience → stronger framework → new Agents start smarter
|
|
368
606
|
|
|
369
607
|
---
|
|
370
608
|
|
|
@@ -378,7 +616,7 @@ Agent: Your previous order #12300 was delivered on April 15th at 2 PM.
|
|
|
378
616
|
│ DeepBrain │ AgentKits │Workstation │ OPC Core │
|
|
379
617
|
│ 🧠 Memory │ 📊 Models │ 👤 Roles │ ⚡ Engine │
|
|
380
618
|
│ │ │ │ │
|
|
381
|
-
│ learn() │ OpenAI │ 100+ roles │
|
|
619
|
+
│ learn() │ OpenAI │ 100+ roles │ 25 chan. │
|
|
382
620
|
│ recall() │ Anthropic │ YAML def. │ 3 proto. │
|
|
383
621
|
│ evolve() │ Ollama │ Skill sys. │ Cron sched│
|
|
384
622
|
│ RAG │ DeepSeek │ One-click │ Sub-Agent │
|
|
@@ -459,6 +697,36 @@ memory:
|
|
|
459
697
|
|
|
460
698
|
---
|
|
461
699
|
|
|
700
|
+
## 🔄 Dual-Loop Knowledge System
|
|
701
|
+
|
|
702
|
+
OPC Agent's knowledge system consists of two loops:
|
|
703
|
+
|
|
704
|
+
```
|
|
705
|
+
┌─────────────────────────────────────────────────────┐
|
|
706
|
+
│ Small Loop (Local, Free) │
|
|
707
|
+
│ Agent local learn → recall → evolve │
|
|
708
|
+
│ Works offline, data stays on your machine │
|
|
709
|
+
│ │
|
|
710
|
+
│ Big Loop (Hub, Value-Add) │
|
|
711
|
+
│ Agent ↔ Workstation Hub knowledge sharing │
|
|
712
|
+
│ Collective wisdom > individual experience │
|
|
713
|
+
└─────────────────────────────────────────────────────┘
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
**Local is the owner, Hub is the helper** — works without internet, auto-syncs when connected.
|
|
717
|
+
|
|
718
|
+
```
|
|
719
|
+
agentkits (Model Layer) — LLM calls
|
|
720
|
+
↕
|
|
721
|
+
opc-agent (Runtime) — run Agents (local) ← You are here
|
|
722
|
+
↕
|
|
723
|
+
deepbrain (Memory Engine) — store knowledge (engine)
|
|
724
|
+
↕
|
|
725
|
+
agent-workstation (Knowledge Platform) — knowledge lifecycle (Hub)
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
---
|
|
729
|
+
|
|
462
730
|
## 🌱 Brain Seed Auto-Loading
|
|
463
731
|
|
|
464
732
|
Since v2.1.0, OPC Agent supports automatic 3-tier knowledge seed loading. When a `brain-seeds/` directory exists, the Agent auto-imports industry → job → workstation knowledge on first run:
|
|
@@ -485,25 +753,73 @@ opc brain status # View brain statistics
|
|
|
485
753
|
|
|
486
754
|
---
|
|
487
755
|
|
|
488
|
-
##
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
756
|
+
## 🔍 How OPC Agent Differs from Other Frameworks
|
|
757
|
+
|
|
758
|
+
> **In one sentence: other Agents are static; OPC Agents self-evolve.**
|
|
759
|
+
|
|
760
|
+
OPC Agent's core design philosophy centers on **Self-Evolution + Omnichannel + Role Templates + Production Toolchain**. As the **Agent Runtime** in The Self-Evolving Agent Stack, OPC focuses on how a single agent can **continuously self-evolve, reach users everywhere, and ship to production out of the box**.
|
|
761
|
+
|
|
762
|
+
**🔄 Self-Evolution Flywheel**: Templates ship with Brain Seeds → Model Layer auto-learns on every call → Runtime runs continuously → Memory auto-evolves → Agent gets stronger over time.
|
|
763
|
+
|
|
764
|
+
#### vs Hermes Agent
|
|
765
|
+
|
|
766
|
+
**Design difference**: Hermes is a Python monolithic framework built around the Nous Research model ecosystem, emphasizing self-learning evolution and RL training. OPC is a TypeScript modular four-piece suite (Brain / Agent / Channel / CLI) emphasizing engineering productivity and out-of-box experience.
|
|
767
|
+
|
|
768
|
+
**Where OPC leads**: Memory evolution trilogy (learn → recall → evolve with automatic clustering), 3-tier Brain Seed knowledge system, 25 built-in channels (vs Hermes's 16+), 100+ role templates, native A2A + AG-UI protocol support, OpenAI-compatible API server.
|
|
769
|
+
|
|
770
|
+
**Where Hermes leads**: More mature Python ecosystem, battle-tested GRPO + LoRA RL training pipeline, larger Nous Research community, more mature Docker sandbox isolation.
|
|
771
|
+
|
|
772
|
+
**Best for**: Choose Hermes if you need Python ecosystem and RL training capabilities. Choose OPC if you need TypeScript full-stack, memory evolution, omnichannel reach, and production toolchain.
|
|
773
|
+
|
|
774
|
+
#### vs OpenClaw
|
|
775
|
+
|
|
776
|
+
**Design difference**: OpenClaw is a heavyweight runtime with config-driven approach — install once, configure, and run. OPC is lightweight CLI + code-first, with four independent packages you can mix and match.
|
|
777
|
+
|
|
778
|
+
**Where OPC leads**: Modular four-piece suite with independent packages, 100+ role templates, memory evolution system, 25 built-in channels, `opc init/dev/test/deploy` full-lifecycle CLI, A2A/AG-UI protocol support.
|
|
779
|
+
|
|
780
|
+
**Where OpenClaw leads**: Polished out-of-box runtime experience, Puppeteer browser automation, mature permission and security sandbox, lower barrier to entry with config-driven approach.
|
|
781
|
+
|
|
782
|
+
**Best for**: Choose OpenClaw if you prefer a "configure and run" all-in-one solution. Choose OPC if you prefer code-first, modular composition, and need memory evolution with role templates.
|
|
783
|
+
|
|
784
|
+
#### vs CrewAI
|
|
785
|
+
|
|
786
|
+
**Design difference**: CrewAI uses a Crew orchestration pattern — define agent roles, assign tasks, execute in sequence or parallel. OPC uses a Template + Memory model — each agent has independent memory and role templates, accumulating and evolving knowledge through DeepBrain.
|
|
787
|
+
|
|
788
|
+
**Where OPC leads**: Memory evolution (not just short/long-term memory, but automatic clustering and distillation), Brain Seed pre-loaded knowledge, 25 built-in channels (CrewAI requires DIY), 100+ role templates, native TypeScript.
|
|
789
|
+
|
|
790
|
+
**Where CrewAI leads**: Intuitive Crew + Flow orchestration model, Python ecosystem, 100K+ user mature community, feature-rich Enterprise edition.
|
|
791
|
+
|
|
792
|
+
**Best for**: Choose CrewAI if you need multi-agent task orchestration and prefer Python. Choose OPC if you need deep single-agent evolution, omnichannel deployment, and TypeScript ecosystem.
|
|
793
|
+
|
|
794
|
+
#### vs AutoGen
|
|
795
|
+
|
|
796
|
+
**Design difference**: AutoGen is Microsoft's conversation-driven multi-agent framework, centered on agent-to-agent dialogue and UserProxy human-in-the-loop. OPC is task-driven with a template-based model, emphasizing single-agent memory evolution and production deployment.
|
|
797
|
+
|
|
798
|
+
**Where OPC leads**: Memory evolution system, Brain Seed, 25 built-in channels, 100+ role templates, full-lifecycle CLI, YAML declarative configuration.
|
|
799
|
+
|
|
800
|
+
**Where AutoGen leads**: Microsoft ecosystem support, distributed agent capabilities, AutoGen Studio visualization, mature UserProxy human-in-the-loop pattern, Python/C# dual-language support, active community.
|
|
801
|
+
|
|
802
|
+
**Best for**: Choose AutoGen if you need multi-agent conversational collaboration and Microsoft ecosystem integration. Choose OPC if you need memory evolution, omnichannel reach, role templates, and TypeScript toolchain.
|
|
803
|
+
|
|
804
|
+
#### Quick Reference Matrix
|
|
805
|
+
|
|
806
|
+
| Feature | OPC Agent | Hermes Agent | OpenClaw | CrewAI | AutoGen |
|
|
807
|
+
|---|:-:|:-:|:-:|:-:|:-:|
|
|
808
|
+
| **Language** | TypeScript | Python | TypeScript | Python | Python/C# |
|
|
809
|
+
| **Self-Evolution** | ✅ learn→recall→evolve | 🔶 | ❌ | ❌ | ❌ |
|
|
810
|
+
| **Brain Seed** | ✅ 3-tier | ❌ | ❌ | ❌ | ❌ |
|
|
811
|
+
| **Built-in Channels** | 25 | 16+ | 2 | ❌ | ❌ |
|
|
812
|
+
| **Role Templates** | 100+ | ❌ | ❌ | ❌ | ❌ |
|
|
813
|
+
| **Full-lifecycle CLI** | ✅ 20+ cmds | 🔶 | 🔶 | 🔶 | 🔶 |
|
|
814
|
+
| **A2A + AG-UI** | ✅ | 🔶 / ❌ | ❌ | ❌ | ❌ |
|
|
815
|
+
| **Multi-Agent** | ✅ | ✅ | 🔶 | ✅ | ✅ |
|
|
816
|
+
| **RL Training** | ✅ Feedback opt. | ✅ GRPO+LoRA | ❌ | ❌ | ❌ |
|
|
817
|
+
| **Browser Automation** | ✅ | ✅ | ✅ | ❌ | ❌ |
|
|
818
|
+
| **Visual Dashboard** | ✅ OPC Studio | ✅ Dashboard | ❌ | 🔶 | ✅ Studio |
|
|
819
|
+
| **Community Maturity** | 🚧 Early | ✅ Active | 🚧 Niche | ✅ Large | ✅ Large |
|
|
820
|
+
| **License** | Apache-2.0 | MIT | MIT | Apache-2.0 | MIT |
|
|
821
|
+
|
|
822
|
+
> Comparison based on each project's public documentation as of April 2026. All frameworks are evolving rapidly — corrections welcome via [Issues](https://github.com/Deepleaper/opc-agent/issues).
|
|
507
823
|
|
|
508
824
|
---
|
|
509
825
|
|
|
@@ -511,10 +827,10 @@ opc brain status # View brain statistics
|
|
|
511
827
|
|
|
512
828
|
| Package | Purpose | Install |
|
|
513
829
|
|---|---|---|
|
|
514
|
-
| **[opc-agent](https://www.npmjs.com/package/opc-agent)** | Agent
|
|
515
|
-
| **[deepbrain](https://www.npmjs.com/package/deepbrain)** |
|
|
516
|
-
| **[agentkits](https://www.npmjs.com/package/agentkits)** | Model Layer —
|
|
517
|
-
| **[agent-workstation](https://www.npmjs.com/package/agent-workstation)** |
|
|
830
|
+
| **[opc-agent](https://www.npmjs.com/package/opc-agent)** | Agent Runtime — create, run, manage | `npm i opc-agent` |
|
|
831
|
+
| **[deepbrain](https://www.npmjs.com/package/deepbrain)** | Agent Memory — self-evolving memory engine | `npm i deepbrain` |
|
|
832
|
+
| **[agentkits](https://www.npmjs.com/package/agentkits)** | Agent Model Layer — one-line LLM access with built-in memory | `npm i agentkits` |
|
|
833
|
+
| **[agent-workstation](https://www.npmjs.com/package/agent-workstation)** | Agent Templates — 100+ professional role templates | `npm i agent-workstation` |
|
|
518
834
|
|
|
519
835
|
---
|
|
520
836
|
|
|
@@ -566,7 +882,7 @@ opc brain status # View brain statistics
|
|
|
566
882
|
|
|
567
883
|
---
|
|
568
884
|
|
|
569
|
-
## 📡
|
|
885
|
+
## 📡 25 Channels
|
|
570
886
|
|
|
571
887
|
| Channel | Status | Description |
|
|
572
888
|
|---------|:------:|-------------|
|
|
@@ -577,10 +893,24 @@ opc brain status # View brain statistics
|
|
|
577
893
|
| 📧 Email | ✅ | IMAP / SMTP |
|
|
578
894
|
| 💚 WeChat | ✅ | Enterprise / Personal WeChat |
|
|
579
895
|
| 🔵 Feishu | ✅ | Feishu (Lark) Bot |
|
|
580
|
-
| 🎤 Voice | ✅ | Voice call |
|
|
896
|
+
| 🎤 Voice | ✅ | Voice call (TTS + STT) |
|
|
581
897
|
| 🔌 WebSocket | ✅ | Real-time bidirectional |
|
|
582
898
|
| 🪝 Webhook | ✅ | HTTP callback |
|
|
583
899
|
| 📡 REST API | ✅ | HTTP API |
|
|
900
|
+
| 💬 WhatsApp | ✅ | WhatsApp Business API |
|
|
901
|
+
| 🟢 LINE | ✅ | LINE Messaging API |
|
|
902
|
+
| 🟣 Teams | ✅ | Microsoft Teams Bot |
|
|
903
|
+
| 📲 SMS | ✅ | Twilio / Cloud messaging |
|
|
904
|
+
| 🔷 DingTalk | ✅ | DingTalk Bot |
|
|
905
|
+
| 🐦 Twitter/X | ✅ | DM + Mentions |
|
|
906
|
+
| 📸 Instagram | ✅ | Instagram DM |
|
|
907
|
+
| 📘 Facebook | ✅ | Messenger API |
|
|
908
|
+
| 🔐 Signal | ✅ | Signal Bot |
|
|
909
|
+
| 🟩 Matrix | ✅ | Matrix protocol |
|
|
910
|
+
| 💬 XMPP | ✅ | Jabber/XMPP |
|
|
911
|
+
| 💻 IRC | ✅ | IRC protocol |
|
|
912
|
+
| 📞 Twilio | ✅ | Phone / IVR |
|
|
913
|
+
| 🔧 Custom | ✅ | Custom channel adapter |
|
|
584
914
|
|
|
585
915
|
---
|
|
586
916
|
|