opc-agent 5.0.0-rc.1 → 5.0.0-rc.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/README.md CHANGED
@@ -1,215 +1,215 @@
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 agents — learning, evolving, working 24/7.
8
-
9
- [![npm](https://img.shields.io/npm/v/opc-agent/alpha)](https://www.npmjs.com/package/opc-agent)
10
- [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
11
- [![Node](https://img.shields.io/badge/Node.js-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
12
-
13
- [Quick Start](#-quick-start) · [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 (recommended)
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
- This automatically installs Node.js, OPC Agent, Ollama, and a recommended AI model based on your hardware.
32
-
33
- ### Or install manually
34
-
35
- ```bash
36
- npm install -g opc-agent@alpha
37
- opc setup # Interactive setup wizard
38
- ```
39
-
40
- ### Get started in 30 seconds
41
-
42
- ```bash
43
- opc chat # Chat in terminal
44
- opc studio # Open web UI → localhost:4000
45
- opc run # Start everything: Agent + Telegram + Web + Studio
46
- ```
47
-
48
- ---
49
-
50
- ## ✨ Features
51
-
52
- | Feature | Description |
53
- |---------|-------------|
54
- | 🧠 **Self-Evolving** | 4-layer evolution engine: Experience → Memory → Skills → Group knowledge |
55
- | 💰 **Zero Cost Start** | Runs 100% locally with Ollama. No API key needed. |
56
- | 🎨 **Studio UI** | Web-based management at localhost:4000 — models, channels, knowledge, templates |
57
- | 📱 **Multi-Channel** | Telegram, Web, WeChat, Feishu, Discord, Slack, Email |
58
- | 🔧 **40 Built-in Skills** | File ops, web search, code execution, image generation, and more |
59
- | 🤖 **A2A Protocol** | Agent-to-agent communication for multi-agent workflows |
60
- | 📦 **All-in-One** | DeepBrain (knowledge) + AgentKits (models) + Workstation (templates) |
61
- | 🔒 **Privacy First** | Your data stays on your machine. No telemetry. |
62
-
63
- ---
64
-
65
- ## 🏗 Architecture
66
-
67
- ```
68
- ┌──────────────────────────────────────────┐
69
- │ OPC Agent CLI │
70
- │ opc chat · opc studio · opc run │
71
- ├──────────────────────────────────────────┤
72
- │ Agent Loop │ Self-Evolution (L1-L4) │
73
- │ Context │ L1 Experience Compile │
74
- │ Assembly │ L2 Memory Consolidate │
75
- │ │ L3 Skill Discovery │
76
- │ │ L4 Group Evolution │
77
- ├──────────────────────────────────────────┤
78
- │ DeepBrain │ AgentKits │Workstation │
79
- │ (Knowledge) │ (Models) │(Templates) │
80
- │ SQLite+FTS5 │ Ollama/API │ Industry │
81
- ├──────────────────────────────────────────┤
82
- │ Channels │
83
- │ Telegram │ Web │ WeChat │ Feishu │ ... │
84
- └──────────────────────────────────────────┘
85
- ```
86
-
87
- ### How it works
88
-
89
- 1. **You talk** → Agent receives message via any channel
90
- 2. **Agent thinks** → Context assembly + tool selection + LLM reasoning
91
- 3. **Agent acts** → Executes tools, calls APIs, generates content
92
- 4. **Agent learns** → Every interaction feeds the evolution engine
93
- 5. **Agent evolves** → Knowledge distills upward: experience → memory → skills
94
-
95
- ---
96
-
97
- ## 💻 CLI Commands
98
-
99
- | Command | Description |
100
- |---------|-------------|
101
- | `opc setup` | Interactive setup wizard |
102
- | `opc init [name]` | Create new agent project |
103
- | `opc chat` | Terminal chat with agent |
104
- | `opc studio` | Open Studio web UI (port 4000) |
105
- | `opc run` | Start all services (Agent + channels + Studio) |
106
- | `opc brain stats` | Show knowledge base statistics |
107
- | `opc brain recall <query>` | Semantic search in knowledge |
108
- | `opc brain learn <file>` | Import document into knowledge |
109
- | `opc doctor` | Diagnose installation issues |
110
-
111
- ---
112
-
113
- ## 🔧 Configuration
114
-
115
- After `opc setup`, all configuration lives in Studio UI (localhost:4000):
116
-
117
- - **Models** — Switch between Ollama models, add cloud API keys
118
- - **Channels** — Configure Telegram bot, WeChat, Feishu, etc.
119
- - **Knowledge** — Drag & drop documents, manage DeepBrain
120
- - **Templates** — Browse industry/job/workstation templates
121
- - **Agent Settings** — Edit personality, skills, model assignments
122
-
123
- Config files: `~/.opc/config.json` (global), `oad.yaml` (per agent)
124
-
125
- ---
126
-
127
- ## 📖 Model Support
128
-
129
- ### Local (Ollama) — Zero Cost
130
- Auto-detected and recommended based on your RAM:
131
-
132
- | RAM | Recommended Model | Size |
133
- |-----|------------------|------|
134
- | ≤3 GB | qwen2.5:0.5b | 400MB |
135
- | ≤7 GB | qwen2.5:1.5b | 1.0GB |
136
- | ≤15 GB | qwen2.5:7b | 4.7GB |
137
- | ≤31 GB | qwen2.5:14b | 9.0GB |
138
- | 32+ GB | qwen2.5:32b | 19GB |
139
-
140
- ### Cloud (via AgentKits)
141
- Configure in Studio → Models: OpenAI, DeepSeek, Anthropic, Qwen, Google Gemini
142
-
143
- ---
144
-
145
- ## 🌐 Multi-Channel
146
-
147
- | Channel | Setup |
148
- |---------|-------|
149
- | 💬 Web Chat | Built-in, localhost:3000 |
150
- | 📱 Telegram | Add bot token in Studio |
151
- | 💬 WeChat | Add app credentials in Studio |
152
- | 🐦 Feishu | Add app credentials in Studio |
153
- | 🎮 Discord | Add bot token in Studio |
154
- | 💼 Slack | Add bot token in Studio |
155
- | 📧 Email | Add SMTP config in Studio |
156
-
157
- ---
158
-
159
- ## 🧬 Self-Evolution
160
-
161
- OPC Agent gets smarter over time through 4 layers of evolution:
162
-
163
- - **L1 — Experience Compilation**: Raw interactions → structured insights (local Ollama)
164
- - **L2 — Memory Consolidation**: Insights → refined knowledge (cloud AgentKits)
165
- - **L3 — Skill Discovery**: Patterns → auto-generated skills (cloud AgentKits)
166
- - **L4 — Group Evolution**: Individual knowledge → shared wisdom (local Ollama)
167
-
168
- All L1/L4 processing runs locally at zero cost. L2/L3 uses cloud models for higher quality.
169
-
170
- ---
171
-
172
- ## 📦 Project Structure
173
-
174
- ```
175
- ~/.opc/ # Global config
176
- config.json # Settings
177
- agents/ # Agent data
178
-
179
- my-agent/ # Agent workspace
180
- EGO.md # Agent personality
181
- DEEPBRAIN.md # Knowledge summary
182
- oad.yaml # Agent definition
183
- .opc/
184
- brain.db # Knowledge database
185
- skills/ # Auto-generated skills
186
- evolution/ # Evolution logs
187
- ```
188
-
189
- ---
190
-
191
- ## 🤝 Contributing
192
-
193
- ```bash
194
- git clone https://github.com/Deepleaper/opc-agent.git
195
- cd opc-agent
196
- npm install
197
- npx tsc # Build
198
- npx vitest run # Test (1100+ tests)
199
- ```
200
-
201
- ---
202
-
203
- ## 📄 License
204
-
205
- Apache-2.0 © [Deepleaper](https://github.com/Deepleaper)
206
-
207
- ---
208
-
209
- <div align="center">
210
-
211
- **Built by [Deepleaper](https://www.deepleaper.com)** — Making AI work for everyone.
212
-
213
- ⭐ Star this repo if OPC Agent helps you!
214
-
215
- </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 agents — learning, evolving, working 24/7.
8
+
9
+ [![npm](https://img.shields.io/npm/v/opc-agent/alpha)](https://www.npmjs.com/package/opc-agent)
10
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
11
+ [![Node](https://img.shields.io/badge/Node.js-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
12
+
13
+ [Quick Start](#-quick-start) · [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 (recommended)
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
+ This automatically installs Node.js, OPC Agent, Ollama, and a recommended AI model based on your hardware.
32
+
33
+ ### Or install manually
34
+
35
+ ```bash
36
+ npm install -g opc-agent@alpha
37
+ opc setup # Interactive setup wizard
38
+ ```
39
+
40
+ ### Get started in 30 seconds
41
+
42
+ ```bash
43
+ opc chat # Chat in terminal
44
+ opc studio # Open web UI → localhost:4000
45
+ opc run # Start everything: Agent + Telegram + Web + Studio
46
+ ```
47
+
48
+ ---
49
+
50
+ ## ✨ Features
51
+
52
+ | Feature | Description |
53
+ |---------|-------------|
54
+ | 🧠 **Self-Evolving** | 4-layer evolution engine: Experience → Memory → Skills → Group knowledge |
55
+ | 💰 **Zero Cost Start** | Runs 100% locally with Ollama. No API key needed. |
56
+ | 🎨 **Studio UI** | Web-based management at localhost:4000 — models, channels, knowledge, templates |
57
+ | 📱 **Multi-Channel** | Telegram, Web, WeChat, Feishu, Discord, Slack, Email |
58
+ | 🔧 **40 Built-in Skills** | File ops, web search, code execution, image generation, and more |
59
+ | 🤖 **A2A Protocol** | Agent-to-agent communication for multi-agent workflows |
60
+ | 📦 **All-in-One** | DeepBrain (knowledge) + AgentKits (models) + Workstation (templates) |
61
+ | 🔒 **Privacy First** | Your data stays on your machine. No telemetry. |
62
+
63
+ ---
64
+
65
+ ## 🏗 Architecture
66
+
67
+ ```
68
+ ┌──────────────────────────────────────────┐
69
+ │ OPC Agent CLI │
70
+ │ opc chat · opc studio · opc run │
71
+ ├──────────────────────────────────────────┤
72
+ │ Agent Loop │ Self-Evolution (L1-L4) │
73
+ │ Context │ L1 Experience Compile │
74
+ │ Assembly │ L2 Memory Consolidate │
75
+ │ │ L3 Skill Discovery │
76
+ │ │ L4 Group Evolution │
77
+ ├──────────────────────────────────────────┤
78
+ │ DeepBrain │ AgentKits │Workstation │
79
+ │ (Knowledge) │ (Models) │(Templates) │
80
+ │ SQLite+FTS5 │ Ollama/API │ Industry │
81
+ ├──────────────────────────────────────────┤
82
+ │ Channels │
83
+ │ Telegram │ Web │ WeChat │ Feishu │ ... │
84
+ └──────────────────────────────────────────┘
85
+ ```
86
+
87
+ ### How it works
88
+
89
+ 1. **You talk** → Agent receives message via any channel
90
+ 2. **Agent thinks** → Context assembly + tool selection + LLM reasoning
91
+ 3. **Agent acts** → Executes tools, calls APIs, generates content
92
+ 4. **Agent learns** → Every interaction feeds the evolution engine
93
+ 5. **Agent evolves** → Knowledge distills upward: experience → memory → skills
94
+
95
+ ---
96
+
97
+ ## 💻 CLI Commands
98
+
99
+ | Command | Description |
100
+ |---------|-------------|
101
+ | `opc setup` | Interactive setup wizard |
102
+ | `opc init [name]` | Create new agent project |
103
+ | `opc chat` | Terminal chat with agent |
104
+ | `opc studio` | Open Studio web UI (port 4000) |
105
+ | `opc run` | Start all services (Agent + channels + Studio) |
106
+ | `opc brain stats` | Show knowledge base statistics |
107
+ | `opc brain recall <query>` | Semantic search in knowledge |
108
+ | `opc brain learn <file>` | Import document into knowledge |
109
+ | `opc doctor` | Diagnose installation issues |
110
+
111
+ ---
112
+
113
+ ## 🔧 Configuration
114
+
115
+ After `opc setup`, all configuration lives in Studio UI (localhost:4000):
116
+
117
+ - **Models** — Switch between Ollama models, add cloud API keys
118
+ - **Channels** — Configure Telegram bot, WeChat, Feishu, etc.
119
+ - **Knowledge** — Drag & drop documents, manage DeepBrain
120
+ - **Templates** — Browse industry/job/workstation templates
121
+ - **Agent Settings** — Edit personality, skills, model assignments
122
+
123
+ Config files: `~/.opc/config.json` (global), `oad.yaml` (per agent)
124
+
125
+ ---
126
+
127
+ ## 📖 Model Support
128
+
129
+ ### Local (Ollama) — Zero Cost
130
+ Auto-detected and recommended based on your RAM:
131
+
132
+ | RAM | Recommended Model | Size |
133
+ |-----|------------------|------|
134
+ | ≤3 GB | qwen2.5:0.5b | 400MB |
135
+ | ≤7 GB | qwen2.5:1.5b | 1.0GB |
136
+ | ≤15 GB | qwen2.5:7b | 4.7GB |
137
+ | ≤31 GB | qwen2.5:14b | 9.0GB |
138
+ | 32+ GB | qwen2.5:32b | 19GB |
139
+
140
+ ### Cloud (via AgentKits)
141
+ Configure in Studio → Models: OpenAI, DeepSeek, Anthropic, Qwen, Google Gemini
142
+
143
+ ---
144
+
145
+ ## 🌐 Multi-Channel
146
+
147
+ | Channel | Setup |
148
+ |---------|-------|
149
+ | 💬 Web Chat | Built-in, localhost:3000 |
150
+ | 📱 Telegram | Add bot token in Studio |
151
+ | 💬 WeChat | Add app credentials in Studio |
152
+ | 🐦 Feishu | Add app credentials in Studio |
153
+ | 🎮 Discord | Add bot token in Studio |
154
+ | 💼 Slack | Add bot token in Studio |
155
+ | 📧 Email | Add SMTP config in Studio |
156
+
157
+ ---
158
+
159
+ ## 🧬 Self-Evolution
160
+
161
+ OPC Agent gets smarter over time through 4 layers of evolution:
162
+
163
+ - **L1 — Experience Compilation**: Raw interactions → structured insights (local Ollama)
164
+ - **L2 — Memory Consolidation**: Insights → refined knowledge (cloud AgentKits)
165
+ - **L3 — Skill Discovery**: Patterns → auto-generated skills (cloud AgentKits)
166
+ - **L4 — Group Evolution**: Individual knowledge → shared wisdom (local Ollama)
167
+
168
+ All L1/L4 processing runs locally at zero cost. L2/L3 uses cloud models for higher quality.
169
+
170
+ ---
171
+
172
+ ## 📦 Project Structure
173
+
174
+ ```
175
+ ~/.opc/ # Global config
176
+ config.json # Settings
177
+ agents/ # Agent data
178
+
179
+ my-agent/ # Agent workspace
180
+ EGO.md # Agent personality
181
+ DEEPBRAIN.md # Knowledge summary
182
+ oad.yaml # Agent definition
183
+ .opc/
184
+ brain.db # Knowledge database
185
+ skills/ # Auto-generated skills
186
+ evolution/ # Evolution logs
187
+ ```
188
+
189
+ ---
190
+
191
+ ## 🤝 Contributing
192
+
193
+ ```bash
194
+ git clone https://github.com/Deepleaper/opc-agent.git
195
+ cd opc-agent
196
+ npm install
197
+ npx tsc # Build
198
+ npx vitest run # Test (1100+ tests)
199
+ ```
200
+
201
+ ---
202
+
203
+ ## 📄 License
204
+
205
+ Apache-2.0 © [Deepleaper](https://github.com/Deepleaper)
206
+
207
+ ---
208
+
209
+ <div align="center">
210
+
211
+ **Built by [Deepleaper](https://www.deepleaper.com)** — Making AI work for everyone.
212
+
213
+ ⭐ Star this repo if OPC Agent helps you!
214
+
215
+ </div>