opc-agent 1.2.0 → 1.3.0
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/CHANGELOG.md +6 -0
- package/README.md +306 -429
- package/package.json +1 -1
- package/src/cli.ts +119 -1
- package/src/core/streaming.ts +195 -0
- package/src/deploy/openclaw.ts +10 -10
- package/src/index.ts +12 -2
- package/src/schema/oad.ts +1 -2
- package/src/templates/code-reviewer.ts +0 -4
- package/src/templates/customer-service.ts +0 -4
- package/src/templates/data-analyst.ts +0 -4
- package/src/templates/knowledge-base.ts +0 -4
- package/src/templates/sales-assistant.ts +0 -4
- package/src/templates/teacher.ts +0 -4
- package/src/tools/gateway.ts +220 -0
- package/src/traces/index.ts +132 -0
- package/tests/gateway.test.ts +71 -0
- package/tests/streaming.test.ts +109 -0
- package/src/dtv/data.ts +0 -29
- package/src/dtv/trust.ts +0 -43
- package/src/dtv/value.ts +0 -47
- package/src/marketplace/index.ts +0 -223
package/README.md
CHANGED
|
@@ -1,429 +1,306 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
│
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
|
174
|
-
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
##
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
opc
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
## 🤝 贡献指南
|
|
310
|
-
|
|
311
|
-
```bash
|
|
312
|
-
git clone https://github.com/Deepleaper/opc-agent.git
|
|
313
|
-
cd opc-agent
|
|
314
|
-
npm install
|
|
315
|
-
npm run build # TypeScript 编译
|
|
316
|
-
npm test # 运行 146 个测试
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
欢迎提交 Issue 和 Pull Request。
|
|
320
|
-
|
|
321
|
-
## 📄 开源协议
|
|
322
|
-
|
|
323
|
-
[Apache License 2.0](LICENSE) — 商用和开源项目均可自由使用。
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
<details>
|
|
328
|
-
<summary id="english">🇺🇸 English</summary>
|
|
329
|
-
|
|
330
|
-
## OPC Agent
|
|
331
|
-
|
|
332
|
-
A **TypeScript-first open agent framework** by [Deepleaper](https://www.deepleaper.com). Define your agent in a single YAML file (OAD — Open Agent Definition), connect any LLM provider, deploy to any channel.
|
|
333
|
-
|
|
334
|
-
## Quick Start
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
npm install -g opc-agent
|
|
338
|
-
opc init my-agent
|
|
339
|
-
cd my-agent
|
|
340
|
-
opc run
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
Agent is live at `http://localhost:3000` with a built-in web chat UI.
|
|
344
|
-
|
|
345
|
-
## Features
|
|
346
|
-
|
|
347
|
-
- **Multi-Provider LLM** — DeepSeek, Qwen, OpenAI, Anthropic, Ollama, any OpenAI-compatible API
|
|
348
|
-
- **10 Channels** — Web, Telegram, Slack, WebSocket, Email, WeChat, Feishu, Voice (STT/TTS), Webhook, Discord
|
|
349
|
-
- **Knowledge Base (RAG)** — TF-IDF + cosine similarity, no external vector DB required
|
|
350
|
-
- **Multi-Agent Orchestration** — Intent routing, sequential/parallel execution, agent handoff
|
|
351
|
-
- **Built-in Testing** — YAML-defined test cases with content and latency assertions
|
|
352
|
-
- **Plugin System** — Logging, analytics, rate limiting; full lifecycle hooks
|
|
353
|
-
- **Security** — Input sanitization, CORS, auth middleware, session isolation
|
|
354
|
-
- **Monitoring** — `/api/health`, `/api/metrics` (Prometheus format), `/api/dashboard`
|
|
355
|
-
- **12 Templates** — Customer service, sales, knowledge base, code review, HR, and more
|
|
356
|
-
- **146 Tests** — 22 test files covering all major features
|
|
357
|
-
|
|
358
|
-
## CLI Reference
|
|
359
|
-
|
|
360
|
-
| Command | Description |
|
|
361
|
-
|---------|-------------|
|
|
362
|
-
| `opc init [name]` | Create new agent project (interactive, template selection) |
|
|
363
|
-
| `opc run` | Start agent |
|
|
364
|
-
| `opc dev` | Development mode (hot-reload) |
|
|
365
|
-
| `opc test` | Run OAD test cases |
|
|
366
|
-
| `opc chat` | Interactive CLI chat |
|
|
367
|
-
| `opc build` | Validate OAD configuration |
|
|
368
|
-
| `opc deploy` | Deploy (`--target openclaw\|hermes`) |
|
|
369
|
-
| `opc analytics` | View analytics |
|
|
370
|
-
| `opc stats` | Runtime statistics snapshot |
|
|
371
|
-
| `opc kb add <file>` | Add file to knowledge base |
|
|
372
|
-
| `opc kb search <query>` | Search knowledge base |
|
|
373
|
-
| `opc workflow run` | Run a workflow |
|
|
374
|
-
| `opc version-mgmt rollback` | Rollback to a previous version |
|
|
375
|
-
| `opc publish` | Package agent for distribution |
|
|
376
|
-
| `opc install <pkg>` | Install agent package |
|
|
377
|
-
| `opc plugin add <name>` | Add plugin |
|
|
378
|
-
| `opc migrate` | Migrate OAD schema |
|
|
379
|
-
|
|
380
|
-
## Deploy
|
|
381
|
-
|
|
382
|
-
### Docker
|
|
383
|
-
|
|
384
|
-
Every project created with `opc init` includes a `Dockerfile` and `docker-compose.yml`:
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
docker compose up -d
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
### OpenClaw
|
|
391
|
-
|
|
392
|
-
```bash
|
|
393
|
-
opc deploy --target openclaw
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
Generates `IDENTITY.md`, `SOUL.md`, `AGENTS.md` into `~/.openclaw/agents/{id}/workspace/`.
|
|
397
|
-
|
|
398
|
-
### Hermes
|
|
399
|
-
|
|
400
|
-
```bash
|
|
401
|
-
opc deploy --target hermes
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
Converts OAD to Hermes Character format (personality, bio, lore, message examples, style guides).
|
|
405
|
-
|
|
406
|
-
## SDK
|
|
407
|
-
|
|
408
|
-
```typescript
|
|
409
|
-
import { AgentRuntime, KnowledgeBase, Orchestrator } from 'opc-agent';
|
|
410
|
-
|
|
411
|
-
const runtime = new AgentRuntime();
|
|
412
|
-
await runtime.loadConfig('oad.yaml');
|
|
413
|
-
await runtime.initialize();
|
|
414
|
-
await runtime.start();
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
## License
|
|
418
|
-
|
|
419
|
-
[Apache License 2.0](LICENSE)
|
|
420
|
-
|
|
421
|
-
---
|
|
422
|
-
|
|
423
|
-
Built with ❤️ by [Deepleaper](https://www.deepleaper.com)
|
|
424
|
-
|
|
425
|
-
</details>
|
|
426
|
-
|
|
427
|
-
---
|
|
428
|
-
|
|
429
|
-
<p align="center">由 <a href="https://www.deepleaper.com">跃盟科技 (Deepleaper)</a> 用 ❤️ 打造</p>
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🤖 OPC Agent
|
|
4
|
+
|
|
5
|
+
**Agent OS — AI Agent 全生命周期操作系统**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/opc-agent)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[]()
|
|
10
|
+
[](https://www.typescriptlang.org/)
|
|
11
|
+
|
|
12
|
+
[快速开始](#快速开始) · [CLI 命令](#cli-命令) · [渠道](#11-个渠道) · [English](#english)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 💡 一句话介绍
|
|
19
|
+
|
|
20
|
+
> **不只是 Harness,是比 Harness 高一维的 Agent OS。**
|
|
21
|
+
> 从创建到运行到监控,一个工具搞定 Agent 全生命周期。
|
|
22
|
+
|
|
23
|
+
## 🎯 和 Harness 框架的区别
|
|
24
|
+
|
|
25
|
+
| | LangChain | CrewAI | AutoGen | **OPC Agent** |
|
|
26
|
+
|---|---|---|---|---|
|
|
27
|
+
| 创建 | 写代码 | 写代码 | 写代码 | **`opc init` 一键** |
|
|
28
|
+
| 配置 | Python/代码 | Python | Python | **YAML 声明式** |
|
|
29
|
+
| 测试 | 自己搭 | 无 | 无 | **内置测试框架** |
|
|
30
|
+
| 渠道 | 自己接 | 无 | 无 | **11 渠道开箱即用** |
|
|
31
|
+
| 监控 | 自己搭 | 无 | 无 | **Traces + Score** |
|
|
32
|
+
| 记忆 | 自己管 | 简单 | 简单 | **DeepBrain 集成** |
|
|
33
|
+
|
|
34
|
+
**框架管"怎么跑",Agent OS 管"全过程"。**
|
|
35
|
+
|
|
36
|
+
## 快速开始
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install -g opc-agent
|
|
40
|
+
|
|
41
|
+
# 创建
|
|
42
|
+
opc init my-agent
|
|
43
|
+
cd my-agent
|
|
44
|
+
|
|
45
|
+
# 开发
|
|
46
|
+
opc dev
|
|
47
|
+
|
|
48
|
+
# 测试
|
|
49
|
+
opc test
|
|
50
|
+
|
|
51
|
+
# 运行
|
|
52
|
+
opc run
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## OAD 声明式配置
|
|
56
|
+
|
|
57
|
+
不用写代码,用 YAML 定义 Agent:
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
id: customer-service
|
|
61
|
+
name: 客服专员
|
|
62
|
+
version: "1.0.0"
|
|
63
|
+
|
|
64
|
+
model: deepseek-chat
|
|
65
|
+
systemPrompt: |
|
|
66
|
+
你是一个专业的客服...
|
|
67
|
+
|
|
68
|
+
skills:
|
|
69
|
+
- ticket-management
|
|
70
|
+
- knowledge-base-search
|
|
71
|
+
|
|
72
|
+
channels:
|
|
73
|
+
- type: web
|
|
74
|
+
priority: primary
|
|
75
|
+
- type: telegram
|
|
76
|
+
priority: secondary
|
|
77
|
+
- type: wechat
|
|
78
|
+
priority: secondary
|
|
79
|
+
|
|
80
|
+
memory:
|
|
81
|
+
shortTerm: true
|
|
82
|
+
longTerm:
|
|
83
|
+
provider: deepbrain
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## CLI 命令
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
opc init <name> # 创建新 Agent
|
|
90
|
+
opc dev # 开发模式(热重载)
|
|
91
|
+
opc test # 运行测试
|
|
92
|
+
opc run # 生产运行
|
|
93
|
+
opc logs [-f] # 查看 Traces 日志
|
|
94
|
+
opc brain [--url ...] # 查看记忆状态
|
|
95
|
+
opc score # 查看性能评分
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 11 个渠道
|
|
99
|
+
|
|
100
|
+
一套代码,部署到任意渠道:
|
|
101
|
+
|
|
102
|
+
| 渠道 | 状态 | 说明 |
|
|
103
|
+
|------|------|------|
|
|
104
|
+
| 🌐 Web | ✅ | 网页聊天 |
|
|
105
|
+
| 📱 Telegram | ✅ | Bot API |
|
|
106
|
+
| 💬 Slack | ✅ | Slack App |
|
|
107
|
+
| 🎮 Discord | ✅ | Discord Bot |
|
|
108
|
+
| 📧 Email | ✅ | IMAP/SMTP |
|
|
109
|
+
| 💚 微信 | ✅ | 企业微信/个人微信 |
|
|
110
|
+
| 🔵 飞书 | ✅ | 飞书机器人 |
|
|
111
|
+
| 🎤 Voice | ✅ | 语音通话 |
|
|
112
|
+
| 🔌 WebSocket | ✅ | 实时双向 |
|
|
113
|
+
| 🪝 Webhook | ✅ | HTTP 回调 |
|
|
114
|
+
| 📡 API | ✅ | REST API |
|
|
115
|
+
|
|
116
|
+
## 核心特性
|
|
117
|
+
|
|
118
|
+
| 类别 | 特性 |
|
|
119
|
+
|------|------|
|
|
120
|
+
| 📋 **配置** | OAD 声明式定义、YAML 配置 |
|
|
121
|
+
| 📡 **渠道** | 11 个渠道统一接入 |
|
|
122
|
+
| 🧪 **测试** | 内置测试框架、163 tests |
|
|
123
|
+
| 🔌 **插件** | 可扩展技能和工具系统 |
|
|
124
|
+
| 📊 **监控** | Traces 行为采集、Score 评分 |
|
|
125
|
+
| 🧠 **记忆** | DeepBrain 集成、自动学习 |
|
|
126
|
+
| 🌍 **国际化** | 内置 i18n 支持 |
|
|
127
|
+
| 🚀 **部署** | OpenClaw 等平台一键部署 |
|
|
128
|
+
| 📈 **分析** | Analytics 数据分析 |
|
|
129
|
+
| 🔄 **流式** | Streaming 实时响应 |
|
|
130
|
+
|
|
131
|
+
## 架构
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
┌─────────────────────────────────────────┐
|
|
135
|
+
│ OPC Agent OS │
|
|
136
|
+
├──────────┬──────────┬───────────────────┤
|
|
137
|
+
│ 创建 │ 运行 │ 监控 │
|
|
138
|
+
│ opc init │ 11 渠道 │ Traces │
|
|
139
|
+
│ OAD 配置 │ 插件系统 │ Score │
|
|
140
|
+
│ 测试框架 │ 流式响应 │ Analytics │
|
|
141
|
+
├──────────┴──────────┴───────────────────┤
|
|
142
|
+
│ DeepBrain 记忆 │
|
|
143
|
+
│ learn ← Traces → recall │
|
|
144
|
+
└─────────────────────────────────────────┘
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 🔗 生态
|
|
148
|
+
|
|
149
|
+
| 项目 | 定位 | 关系 |
|
|
150
|
+
|------|------|------|
|
|
151
|
+
| [deepbrain](https://github.com/Deepleaper/deepbrain) | Agent 记忆引擎 | Traces → learn() |
|
|
152
|
+
| **opc-agent** | Agent OS | ← 你在这里 |
|
|
153
|
+
| [agentkits](https://github.com/Deepleaper/agentkits) | 带记忆的 OpenRouter | 模型调用层 |
|
|
154
|
+
| [agent-workstation](https://github.com/Deepleaper/agent-workstation) | 虚拟工位模板 | `opc init --template` |
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
Apache-2.0
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
<a name="english"></a>
|
|
163
|
+
|
|
164
|
+
## English
|
|
165
|
+
|
|
166
|
+
## 💡 What Is OPC Agent?
|
|
167
|
+
|
|
168
|
+
> **Not just a Harness — it's an Agent OS, one dimension above Harness frameworks.**
|
|
169
|
+
> From creation to runtime to monitoring, one tool for the entire Agent lifecycle.
|
|
170
|
+
|
|
171
|
+
## 🎯 How It Differs from Harness Frameworks
|
|
172
|
+
|
|
173
|
+
| | LangChain | CrewAI | AutoGen | **OPC Agent** |
|
|
174
|
+
|---|---|---|---|---|
|
|
175
|
+
| Creation | Write code | Write code | Write code | **`opc init` one command** |
|
|
176
|
+
| Configuration | Python/code | Python | Python | **YAML declarative** |
|
|
177
|
+
| Testing | DIY | None | None | **Built-in test framework** |
|
|
178
|
+
| Channels | DIY | None | None | **11 channels out-of-the-box** |
|
|
179
|
+
| Monitoring | DIY | None | None | **Traces + Score** |
|
|
180
|
+
| Memory | DIY | Basic | Basic | **DeepBrain integration** |
|
|
181
|
+
|
|
182
|
+
**Frameworks manage "how to run." Agent OS manages "the entire process."**
|
|
183
|
+
|
|
184
|
+
## Quick Start
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
npm install -g opc-agent
|
|
188
|
+
|
|
189
|
+
# Create
|
|
190
|
+
opc init my-agent
|
|
191
|
+
cd my-agent
|
|
192
|
+
|
|
193
|
+
# Develop
|
|
194
|
+
opc dev
|
|
195
|
+
|
|
196
|
+
# Test
|
|
197
|
+
opc test
|
|
198
|
+
|
|
199
|
+
# Run
|
|
200
|
+
opc run
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## OAD Declarative Configuration
|
|
204
|
+
|
|
205
|
+
Define your Agent with YAML — no code required:
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
id: customer-service
|
|
209
|
+
name: Customer Service Rep
|
|
210
|
+
version: "1.0.0"
|
|
211
|
+
|
|
212
|
+
model: deepseek-chat
|
|
213
|
+
systemPrompt: |
|
|
214
|
+
You are a professional customer service agent...
|
|
215
|
+
|
|
216
|
+
skills:
|
|
217
|
+
- ticket-management
|
|
218
|
+
- knowledge-base-search
|
|
219
|
+
|
|
220
|
+
channels:
|
|
221
|
+
- type: web
|
|
222
|
+
priority: primary
|
|
223
|
+
- type: telegram
|
|
224
|
+
priority: secondary
|
|
225
|
+
- type: wechat
|
|
226
|
+
priority: secondary
|
|
227
|
+
|
|
228
|
+
memory:
|
|
229
|
+
shortTerm: true
|
|
230
|
+
longTerm:
|
|
231
|
+
provider: deepbrain
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## CLI Commands
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
opc init <name> # Create a new Agent
|
|
238
|
+
opc dev # Development mode (hot reload)
|
|
239
|
+
opc test # Run tests
|
|
240
|
+
opc run # Production run
|
|
241
|
+
opc logs [-f] # View Traces logs
|
|
242
|
+
opc brain [--url ...] # View memory status
|
|
243
|
+
opc score # View performance score
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## 11 Channels
|
|
247
|
+
|
|
248
|
+
One codebase, deploy to any channel:
|
|
249
|
+
|
|
250
|
+
| Channel | Status | Description |
|
|
251
|
+
|---------|--------|-------------|
|
|
252
|
+
| 🌐 Web | ✅ | Web chat |
|
|
253
|
+
| 📱 Telegram | ✅ | Bot API |
|
|
254
|
+
| 💬 Slack | ✅ | Slack App |
|
|
255
|
+
| 🎮 Discord | ✅ | Discord Bot |
|
|
256
|
+
| 📧 Email | ✅ | IMAP/SMTP |
|
|
257
|
+
| 💚 WeChat | ✅ | Enterprise/Personal WeChat |
|
|
258
|
+
| 🔵 Feishu | ✅ | Feishu (Lark) Bot |
|
|
259
|
+
| 🎤 Voice | ✅ | Voice call |
|
|
260
|
+
| 🔌 WebSocket | ✅ | Real-time bidirectional |
|
|
261
|
+
| 🪝 Webhook | ✅ | HTTP callback |
|
|
262
|
+
| 📡 API | ✅ | REST API |
|
|
263
|
+
|
|
264
|
+
## Full Feature Set
|
|
265
|
+
|
|
266
|
+
| Category | Features |
|
|
267
|
+
|----------|----------|
|
|
268
|
+
| 📋 **Configuration** | OAD declarative definition, YAML config |
|
|
269
|
+
| 📡 **Channels** | 11 channels, unified access |
|
|
270
|
+
| 🧪 **Testing** | Built-in test framework, 163 tests |
|
|
271
|
+
| 🔌 **Plugins** | Extensible skills and tools system |
|
|
272
|
+
| 📊 **Monitoring** | Traces behavior collection, Score rating |
|
|
273
|
+
| 🧠 **Memory** | DeepBrain integration, auto-learning |
|
|
274
|
+
| 🌍 **i18n** | Built-in internationalization support |
|
|
275
|
+
| 🚀 **Deployment** | One-click deploy on OpenClaw and other platforms |
|
|
276
|
+
| 📈 **Analytics** | Data analytics |
|
|
277
|
+
| 🔄 **Streaming** | Real-time streaming responses |
|
|
278
|
+
|
|
279
|
+
## Architecture
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
┌─────────────────────────────────────────┐
|
|
283
|
+
│ OPC Agent OS │
|
|
284
|
+
├──────────┬──────────┬───────────────────┤
|
|
285
|
+
│ Create │ Run │ Monitor │
|
|
286
|
+
│ opc init │ 11 Chan. │ Traces │
|
|
287
|
+
│ OAD Config│ Plugins │ Score │
|
|
288
|
+
│ Test Fwk │ Streaming │ Analytics │
|
|
289
|
+
├──────────┴──────────┴───────────────────┤
|
|
290
|
+
│ DeepBrain Memory │
|
|
291
|
+
│ learn ← Traces → recall │
|
|
292
|
+
└─────────────────────────────────────────┘
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## 🔗 Ecosystem
|
|
296
|
+
|
|
297
|
+
| Project | Role | Relationship |
|
|
298
|
+
|---------|------|-------------|
|
|
299
|
+
| [deepbrain](https://github.com/Deepleaper/deepbrain) | Agent Memory Engine | Traces → learn() |
|
|
300
|
+
| **opc-agent** | Agent OS | ← You are here |
|
|
301
|
+
| [agentkits](https://github.com/Deepleaper/agentkits) | OpenRouter with Memory | Model call layer |
|
|
302
|
+
| [agent-workstation](https://github.com/Deepleaper/agent-workstation) | Virtual Role Templates | `opc init --template` |
|
|
303
|
+
|
|
304
|
+
## License
|
|
305
|
+
|
|
306
|
+
Apache-2.0
|