opc-agent 4.2.0 β 4.2.2
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/.opc/memory.db +0 -0
- package/COMPETITIVE-GAP.md +92 -92
- package/CONTRIBUTING.md +36 -36
- package/README.md +231 -290
- package/README.zh-CN.md +230 -269
- package/STUDIO-REWRITE-TASK.md +76 -0
- package/dist/channels/telegram.d.ts +5 -0
- package/dist/channels/telegram.d.ts.map +1 -1
- package/dist/channels/telegram.js +108 -0
- package/dist/channels/telegram.js.map +1 -1
- package/dist/channels/voice.d.ts +71 -97
- package/dist/channels/voice.d.ts.map +1 -1
- package/dist/channels/voice.js +369 -347
- package/dist/channels/voice.js.map +1 -1
- package/dist/channels/web.d.ts.map +1 -1
- package/dist/channels/web.js +8 -2
- package/dist/channels/web.js.map +1 -1
- package/dist/channels/wechat.js +6 -6
- package/dist/cli/chat.d.ts +4 -1
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +680 -73
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +373 -280
- package/dist/cli.js.map +1 -1
- package/dist/core/a2a-http.d.ts +75 -0
- package/dist/core/a2a-http.d.ts.map +1 -0
- package/dist/core/a2a-http.js +217 -0
- package/dist/core/a2a-http.js.map +1 -0
- package/dist/core/a2a.d.ts +2 -0
- package/dist/core/a2a.d.ts.map +1 -1
- package/dist/core/a2a.js +6 -1
- package/dist/core/a2a.js.map +1 -1
- package/dist/core/agent.d.ts +1 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +3 -0
- package/dist/core/agent.js.map +1 -1
- package/dist/core/gateway-registry.d.ts +116 -0
- package/dist/core/gateway-registry.d.ts.map +1 -0
- package/dist/core/gateway-registry.js +280 -0
- package/dist/core/gateway-registry.js.map +1 -0
- package/dist/core/model-recommender.d.ts +40 -0
- package/dist/core/model-recommender.d.ts.map +1 -0
- package/dist/core/model-recommender.js +186 -0
- package/dist/core/model-recommender.js.map +1 -0
- package/dist/core/priority-queue.d.ts +100 -0
- package/dist/core/priority-queue.d.ts.map +1 -0
- package/dist/core/priority-queue.js +181 -0
- package/dist/core/priority-queue.js.map +1 -0
- package/dist/core/runtime.d.ts.map +1 -1
- package/dist/core/runtime.js +192 -22
- package/dist/core/runtime.js.map +1 -1
- package/dist/deploy/index.js +56 -56
- package/dist/doctor.d.ts +1 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +155 -10
- package/dist/doctor.js.map +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -13
- package/dist/index.js.map +1 -1
- package/dist/memory/deepbrain.d.ts +1 -1
- package/dist/memory/deepbrain.d.ts.map +1 -1
- package/dist/memory/deepbrain.js +95 -4
- package/dist/memory/deepbrain.js.map +1 -1
- package/dist/memory/evolve-engine.d.ts +113 -0
- package/dist/memory/evolve-engine.d.ts.map +1 -0
- package/dist/memory/evolve-engine.js +549 -0
- package/dist/memory/evolve-engine.js.map +1 -0
- package/dist/memory/index.d.ts +2 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +3 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/sqlite-store.d.ts +40 -0
- package/dist/memory/sqlite-store.d.ts.map +1 -0
- package/dist/memory/sqlite-store.js +269 -0
- package/dist/memory/sqlite-store.js.map +1 -0
- package/dist/memory/user-profiler.d.ts +8 -0
- package/dist/memory/user-profiler.d.ts.map +1 -1
- package/dist/memory/user-profiler.js +89 -0
- package/dist/memory/user-profiler.js.map +1 -1
- package/dist/scheduler/cron-engine.d.ts.map +1 -1
- package/dist/scheduler/cron-engine.js +3 -36
- package/dist/scheduler/cron-engine.js.map +1 -1
- package/dist/scheduler/proactive.d.ts +62 -0
- package/dist/scheduler/proactive.d.ts.map +1 -0
- package/dist/scheduler/proactive.js +185 -0
- package/dist/scheduler/proactive.js.map +1 -0
- package/dist/skills/auto-learn.d.ts.map +1 -1
- package/dist/skills/auto-learn.js +65 -11
- package/dist/skills/auto-learn.js.map +1 -1
- package/dist/skills/builtin/index.d.ts.map +1 -1
- package/dist/skills/builtin/index.js +163 -30
- package/dist/skills/builtin/index.js.map +1 -1
- package/dist/skills/types.d.ts +1 -1
- package/dist/skills/types.d.ts.map +1 -1
- package/dist/skills/types.js +1 -0
- package/dist/skills/types.js.map +1 -1
- package/dist/studio/server.d.ts +1 -0
- package/dist/studio/server.d.ts.map +1 -1
- package/dist/studio/server.js +148 -17
- package/dist/studio/server.js.map +1 -1
- package/dist/studio-ui/index.html +867 -2630
- package/dist/ui/components.js +105 -105
- package/examples/README.md +22 -22
- package/examples/basic-agent.ts +90 -90
- package/examples/brain-integration.ts +71 -71
- package/examples/multi-channel.ts +74 -74
- package/install.ps1 +127 -127
- package/install.sh +154 -154
- package/models.json +164 -164
- package/package.json +5 -2
- package/scripts/install.ps1 +31 -31
- package/scripts/install.sh +40 -40
- package/templates/ecommerce-assistant/README.md +45 -45
- package/templates/ecommerce-assistant/oad.yaml +47 -47
- package/templates/tech-support/README.md +43 -43
- package/templates/tech-support/oad.yaml +45 -45
package/README.md
CHANGED
|
@@ -1,290 +1,231 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# β‘ OPC Agent
|
|
4
|
-
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[ for guidelines.
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
git clone https://github.com/Deepleaper/opc-agent.git
|
|
270
|
-
cd opc-agent
|
|
271
|
-
npm install
|
|
272
|
-
npm run build
|
|
273
|
-
npm test
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## π License
|
|
279
|
-
|
|
280
|
-
[Apache-2.0](LICENSE) Β© [Deepleaper](https://github.com/Deepleaper)
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
<div align="center">
|
|
285
|
-
|
|
286
|
-
**If OPC Agent helps you build better agents, give us a β**
|
|
287
|
-
|
|
288
|
-
[GitHub](https://github.com/Deepleaper/opc-agent) Β· [npm](https://www.npmjs.com/package/opc-agent) Β· [Docs](https://opc-agent.dev)
|
|
289
|
-
|
|
290
|
-
</div>
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# β‘ OPC Agent β η¬η₯ Studio
|
|
4
|
+
|
|
5
|
+
**Your AI workforce, running locally. Zero cloud cost to start.**
|
|
6
|
+
|
|
7
|
+
One computer. One command. Your own AI employees β working 24/7.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/opc-agent)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://nodejs.org/)
|
|
12
|
+
|
|
13
|
+
[Quick Start](#-quick-start) Β· [Why OPC](#-why-opc) Β· [Studio](#-studio) Β· [Features](#-features) Β· [Architecture](#-architecture) Β· [CLI](#-cli-commands) Β· [δΈζ](README.zh-CN.md)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## π Quick Start
|
|
20
|
+
|
|
21
|
+
**One-line install** (includes Node.js + auto-detects Ollama):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# macOS / Linux
|
|
25
|
+
curl -fsSL https://raw.githubusercontent.com/Deepleaper/opc-agent/main/install.sh | bash
|
|
26
|
+
|
|
27
|
+
# Windows (PowerShell)
|
|
28
|
+
irm https://raw.githubusercontent.com/Deepleaper/opc-agent/main/install.ps1 | iex
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Or via npx** (zero install):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx opc-agent@latest init
|
|
35
|
+
cd my-agent
|
|
36
|
+
npx opc-agent studio
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
That's it. Open `http://localhost:4000` β your AI workforce management Studio is live.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## π‘ Why OPC
|
|
44
|
+
|
|
45
|
+
| Pain Point | OPC Solution |
|
|
46
|
+
|---|---|
|
|
47
|
+
| AI agents need expensive cloud APIs | **Ollama-first**: runs 100% locally with zero cost |
|
|
48
|
+
| Complex setup, developer-only tools | **One command** β Studio GUI, no coding needed |
|
|
49
|
+
| Agents lose memory between sessions | **DeepBrain**: persistent 3-layer knowledge that evolves |
|
|
50
|
+
| One agent, one trick | **202 workstation templates** across 31 industries |
|
|
51
|
+
| No way to manage multiple agents | **Studio dashboard** β create, chat, configure, monitor |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## π¨ Studio
|
|
56
|
+
|
|
57
|
+
OPC Studio is a web-based management GUI for your entire AI workforce.
|
|
58
|
+
|
|
59
|
+
**5 modules, one interface:**
|
|
60
|
+
|
|
61
|
+
| Module | What it does |
|
|
62
|
+
|---|---|
|
|
63
|
+
| π§βπ» **OPC Assistant** | Built-in AI helper (always on top) |
|
|
64
|
+
| π€ **OPC Agent** | Create agents, chat, configure channels |
|
|
65
|
+
| π§© **AgentKits** | Model config β Ollama auto-detect + cloud API keys |
|
|
66
|
+
| π§ **DeepBrain** | Knowledge base β drag-drop docs, auto-categorize, 3-layer browsing |
|
|
67
|
+
| π₯οΈ **Workstation** | 202 templates across 31 industries β pick a role, deploy an agent |
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx opc-agent studio # β http://localhost:4000
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## β¨ Features
|
|
76
|
+
|
|
77
|
+
### π§ Knowledge Evolve Engine
|
|
78
|
+
- **3-layer knowledge**: Industry β Job β Workstation (auto-distills upward)
|
|
79
|
+
- **Local-first**: uses Ollama models β zero cost evolution
|
|
80
|
+
- **Memory compaction**: distills conversations into persistent knowledge
|
|
81
|
+
- **DeepBrain integration**: drag-drop documents, auto-categorize
|
|
82
|
+
|
|
83
|
+
### π¬ Multi-Channel
|
|
84
|
+
Connect your agents to users wherever they are:
|
|
85
|
+
|
|
86
|
+
Telegram Β· Slack Β· Discord Β· WeChat Β· Feishu Β· Email Β· WhatsApp Β· Web Chat Β· Voice Β· IRC Β· Matrix Β· SMS Β· Line Β· Nostr Β· MS Teams Β· Google Chat Β· DingTalk Β· QQ Β· Twitch Β· Mattermost
|
|
87
|
+
|
|
88
|
+
### π§ 53 Built-in Tools
|
|
89
|
+
|
|
90
|
+
| Category | Tools |
|
|
91
|
+
|---|---|
|
|
92
|
+
| **Core** (8) | shell, file I/O, web fetch, web search, browser, vision, datetime, calculator |
|
|
93
|
+
| **Developer** (12) | git, GitHub, npm, code exec, JSON transform, regex, text analysis, ... |
|
|
94
|
+
| **Productivity** (8) | calendar, email, Jira, Notion, Trello, Slack, summarizer, translator |
|
|
95
|
+
| **Integration** (13) | database, PDF reader, CSV analyzer, webhook, vector search, image gen, ... |
|
|
96
|
+
| **Knowledge** (7) | memory search, memory store, brain query, brain learn, brain evolve, ... |
|
|
97
|
+
| **Media** (5) | image generator, document processor, web scraper, Home Assistant, ... |
|
|
98
|
+
|
|
99
|
+
### π€ Protocol Support
|
|
100
|
+
- **A2A** (Agent-to-Agent): Google-standard inter-agent communication + HTTP transport
|
|
101
|
+
- **MCP** (Model Context Protocol): Anthropic-standard tool integration
|
|
102
|
+
- **AG-UI**: Frontend streaming protocol
|
|
103
|
+
|
|
104
|
+
### π‘οΈ Enterprise-Ready
|
|
105
|
+
- Sandbox execution, API key encryption, rate limiting
|
|
106
|
+
- Content filtering, guardrails, HITL (human-in-the-loop)
|
|
107
|
+
- Priority queue with fast mode
|
|
108
|
+
- Gateway registry for multi-agent networking
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## ποΈ Architecture
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
116
|
+
β OPC Studio (GUI) β β Management dashboard
|
|
117
|
+
βββββββββββββββββββββββββββββββββββββββ€
|
|
118
|
+
β OPC Agent (CLI) β β Runtime + TUI chat
|
|
119
|
+
ββββββββββββ¬βββββββββββ¬ββββββββββββββββ€
|
|
120
|
+
β AgentKitsβ DeepBrainβ Workstation β
|
|
121
|
+
β (Models) β(Knowledge)β (Templates) β
|
|
122
|
+
ββββββββββββ΄βββββββββββ΄ββββββββββββββββ
|
|
123
|
+
β β β
|
|
124
|
+
Ollama SQLite/ 202 roles
|
|
125
|
+
Cloud Memory 31 industries
|
|
126
|
+
APIs Evolve
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## π₯οΈ CLI Commands
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
opc init # Create new agent project
|
|
135
|
+
opc run # Start agent runtime
|
|
136
|
+
opc studio # Launch Studio GUI
|
|
137
|
+
opc chat # TUI terminal chat
|
|
138
|
+
opc doctor # Health check (13 checks)
|
|
139
|
+
opc memory-search <query> # Search agent memory
|
|
140
|
+
opc skills list # List available skills
|
|
141
|
+
opc deploy # Deploy to cloud
|
|
142
|
+
opc publish # Publish to OPC Hub
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## βοΈ Configuration
|
|
148
|
+
|
|
149
|
+
Agents are defined in `oad.yaml`:
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
name: customer-support
|
|
153
|
+
description: 24/7 AI customer service agent
|
|
154
|
+
model: auto # auto-selects best available model
|
|
155
|
+
language: zh
|
|
156
|
+
channels:
|
|
157
|
+
telegram:
|
|
158
|
+
token: ${TELEGRAM_BOT_TOKEN}
|
|
159
|
+
web:
|
|
160
|
+
port: 3000
|
|
161
|
+
tools:
|
|
162
|
+
- web-search
|
|
163
|
+
- memory-search
|
|
164
|
+
skills:
|
|
165
|
+
- customer-service
|
|
166
|
+
- product-knowledge
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## π₯ Doctor
|
|
172
|
+
|
|
173
|
+
13 automated checks for agent health:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
opc doctor
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Checks: config validity, model connectivity, channel auth, memory persistence, tool availability, Ollama status, disk space, Node.js version, and more.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## π Comparison
|
|
184
|
+
|
|
185
|
+
| Feature | OPC Agent | OpenClaw | Hermes Agent |
|
|
186
|
+
|---------|-----------|----------|--------------|
|
|
187
|
+
| GUI Management | β
Studio | β CLI only | β CLI only |
|
|
188
|
+
| Local-first (Ollama) | β
Auto-detect | β Cloud-only | β οΈ Manual |
|
|
189
|
+
| Smart Model Recommend | β
Hardware-based | β | β |
|
|
190
|
+
| Knowledge Evolution | β
3-layer + distill | β | β οΈ Manual skills |
|
|
191
|
+
| Workstation Templates | β
202 / 31 industries | β | β |
|
|
192
|
+
| Built-in Tools | β
53 | β οΈ ~20 | β οΈ ~10 |
|
|
193
|
+
| Channels | β
20 | β οΈ 5 | β οΈ 3 |
|
|
194
|
+
| A2A + MCP + AG-UI | β
All three | β οΈ MCP only | β |
|
|
195
|
+
| One-line Install | β
| β
| β |
|
|
196
|
+
| Doctor Health Check | β
13 checks | β | β |
|
|
197
|
+
| Memory Compaction | β
Auto-distill | β | β |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## π€ Contributing
|
|
202
|
+
|
|
203
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
git clone https://github.com/Deepleaper/opc-agent.git
|
|
207
|
+
cd opc-agent
|
|
208
|
+
npm install
|
|
209
|
+
npm run build
|
|
210
|
+
npm run dev
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## π License
|
|
216
|
+
|
|
217
|
+
Apache-2.0 β see [LICENSE](LICENSE) for details.
|
|
218
|
+
|
|
219
|
+
**Open-source components:**
|
|
220
|
+
- `opc-agent` / `agentkits`: Apache-2.0
|
|
221
|
+
- `deepbrain` / `workstation`: LGPL-3.0
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
<div align="center">
|
|
226
|
+
|
|
227
|
+
**Built by [Deepleaper](https://www.deepleaper.com)** Β· Powering the AI workforce revolution
|
|
228
|
+
|
|
229
|
+
β Star us if OPC helps you build better AI agents!
|
|
230
|
+
|
|
231
|
+
</div>
|