openvole 0.1.0 → 0.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/README.md ADDED
@@ -0,0 +1,456 @@
1
+ <p align="center">
2
+ <img src="assets/vole.png" alt="OpenVole" width="200">
3
+ </p>
4
+
5
+ <h1 align="center">OpenVole</h1>
6
+
7
+ <p align="center">
8
+ <strong>Micro-agent core. The smallest possible thing that other useful things can be built on top of.</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/openvole"><img src="https://img.shields.io/npm/v/openvole" alt="npm"></a>
13
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
14
+ </p>
15
+
16
+ ---
17
+
18
+ ## What is OpenVole?
19
+
20
+ OpenVole is a **microkernel AI agent framework**. It provides the agent loop and the plugin contract — nothing else. Everything useful (reasoning, memory, tools, channels, integrations) is a **Paw** or a **Skill** built by the community.
21
+
22
+ A fresh OpenVole installation has zero tools, zero skills, zero opinions. This is by design.
23
+
24
+ ## Quick Start
25
+
26
+ ```bash
27
+ mkdir my-agent && cd my-agent
28
+ npm init -y
29
+ npm install openvole @openvole/paw-ollama @openvole/paw-memory @openvole/paw-dashboard
30
+ npx vole init
31
+ ```
32
+
33
+ Edit `vole.config.json`:
34
+
35
+ ```json
36
+ {
37
+ "brain": "@openvole/paw-ollama",
38
+ "paws": [
39
+ {
40
+ "name": "@openvole/paw-ollama",
41
+ "allow": {
42
+ "network": ["127.0.0.1"],
43
+ "env": ["OLLAMA_HOST", "OLLAMA_MODEL"]
44
+ }
45
+ },
46
+ {
47
+ "name": "@openvole/paw-memory",
48
+ "allow": { "env": ["VOLE_MEMORY_DIR"] }
49
+ },
50
+ {
51
+ "name": "@openvole/paw-dashboard",
52
+ "allow": { "listen": [3001], "env": ["VOLE_DASHBOARD_PORT"] }
53
+ }
54
+ ],
55
+ "skills": [],
56
+ "loop": { "maxIterations": 25, "compactThreshold": 50 }
57
+ }
58
+ ```
59
+
60
+ Create `.env`:
61
+
62
+ ```
63
+ OLLAMA_HOST=http://localhost:11434
64
+ OLLAMA_MODEL=qwen3:latest
65
+ ```
66
+
67
+ Run:
68
+
69
+ ```bash
70
+ npx vole start
71
+ ```
72
+
73
+ Or use a preset:
74
+
75
+ ```bash
76
+ # Basic (Brain + Memory + Dashboard)
77
+ curl -fsSL https://raw.githubusercontent.com/openvole/openvole/main/presets/basic.sh | bash
78
+
79
+ # With Telegram
80
+ curl -fsSL https://raw.githubusercontent.com/openvole/openvole/main/presets/telegram.sh | bash
81
+
82
+ # Everything
83
+ curl -fsSL https://raw.githubusercontent.com/openvole/openvole/main/presets/full.sh | bash
84
+ ```
85
+
86
+ ## Architecture
87
+
88
+ ```
89
+ vole start (CLI)
90
+ readline prompt (vole>)
91
+ |
92
+ v
93
+ ┌─────────────────────────────────────────────────────────────┐
94
+ │ VoleEngine │
95
+ │ │
96
+ │ Tool Registry ──── Skill Registry ──── Paw Registry │
97
+ │ | | | │
98
+ │ ┌────────────────────────────────────────────────┐ │
99
+ │ │ Agent Loop (per task) │ │
100
+ │ │ │ │
101
+ │ │ PERCEIVE ─── THINK ─── ACT ─── OBSERVE │ │
102
+ │ │ | | | | │ │
103
+ │ │ Enrich Brain Execute Process │ │
104
+ │ │ context plans tools results │ │
105
+ │ │ │ │
106
+ │ └─────────────────────────────────────────────────┘ │
107
+ │ │
108
+ │ Task Queue ──── Scheduler ──── Message Bus │
109
+ │ │
110
+ └──────┬──────────┬──────────┬──────────┬──────────────────────┘
111
+ | | | |
112
+ [Brain Paw] [Channel] [Tools] [In-Process]
113
+ Ollama Telegram Browser Compact
114
+ Claude Slack Shell Memory
115
+ OpenAI Discord MCP Session
116
+ Gemini WhatsApp Email/Resend/GitHub/Calendar
117
+ xAI
118
+ ```
119
+
120
+ 22 official Paws: 5 Brain, 4 Channel, 8 Tool, 4 Infrastructure.
121
+
122
+ ## Core Concepts
123
+
124
+ ### The Agent Loop
125
+
126
+ The only thing OpenVole does natively:
127
+
128
+ ```
129
+ Perceive → Think → Act → Observe → loop
130
+ ```
131
+
132
+ | Phase | What happens |
133
+ |-------|-------------|
134
+ | **Perceive** | Paws inject context (memory, time, calendar) |
135
+ | **Think** | Brain Paw calls the LLM, returns a plan |
136
+ | **Act** | Core executes tool calls from the plan |
137
+ | **Observe** | Paws process results (log, update memory, notify) |
138
+
139
+ ### Paws
140
+
141
+ **Paws are tool providers.** They connect OpenVole to the outside world — APIs, databases, browsers, messaging platforms. Each Paw runs in an isolated subprocess with capability-based permissions.
142
+
143
+ ```bash
144
+ npm install @openvole/paw-telegram
145
+ ```
146
+
147
+ ### Skills
148
+
149
+ **Skills are behavioral recipes.** A skill is a folder with a `SKILL.md` file — no code, no build step. Compatible with [ClawHub](https://clawhub.ai) (13,000+ skills).
150
+
151
+ ```bash
152
+ npx vole clawhub install summarize
153
+ ```
154
+
155
+ ```markdown
156
+ ---
157
+ name: summarize
158
+ description: "Summarize text, articles, or documents"
159
+ ---
160
+ When asked to summarize content:
161
+ 1. Identify the key points
162
+ 2. Condense into 3-5 bullet points
163
+ ...
164
+ ```
165
+
166
+ ### Brain Paw
167
+
168
+ The Brain is a Paw — the core is LLM-ignorant. Swap models by swapping Brain Paws:
169
+
170
+ - `@openvole/paw-ollama` — local models via Ollama
171
+ - `@openvole/paw-claude` — Anthropic Claude models
172
+ - `@openvole/paw-openai` — OpenAI models
173
+ - `@openvole/paw-gemini` — Google Gemini models
174
+ - `@openvole/paw-xai` — xAI Grok models
175
+
176
+ ## Features
177
+
178
+ ### Built-in Core Tools
179
+
180
+ | Tool | Purpose |
181
+ |------|---------|
182
+ | `schedule_task` | Brain creates recurring tasks at runtime |
183
+ | `cancel_schedule` / `list_schedules` | Manage schedules (persistent across restarts) |
184
+ | `skill_read` | Load skill instructions on demand |
185
+ | `skill_read_reference` / `skill_list_files` | Access skill resources |
186
+ | `heartbeat_read` / `heartbeat_write` | Manage recurring jobs |
187
+ | `workspace_write` / `workspace_read` | Read/write files in agent scratch space |
188
+ | `workspace_list` / `workspace_delete` | List/delete workspace files |
189
+ | `vault_store` | Store a secret (write-once, with optional metadata) |
190
+ | `vault_get` / `vault_list` / `vault_delete` | Retrieve, list, or delete vault entries |
191
+ | `web_fetch` | Lightweight URL fetching (GET/POST with headers, body) |
192
+
193
+ ### Heartbeat
194
+
195
+ Periodic wake-up — the Brain checks `HEARTBEAT.md` and decides what to do. No user input needed. Uses cron expressions:
196
+
197
+ ```json
198
+ { "heartbeat": { "enabled": true, "cron": "*/30 * * * *" } }
199
+ ```
200
+
201
+ ### Persistent Scheduling
202
+
203
+ Brain-created schedules use cron expressions and are stored in `.openvole/schedules.json`, surviving restarts. The heartbeat is recreated from config on each startup (intervalMinutes is auto-converted to cron).
204
+
205
+ ```
206
+ "0 13 * * *" — daily at 1 PM UTC
207
+ "*/30 * * * *" — every 30 minutes
208
+ "0 9 * * 1" — every Monday at 9 AM
209
+ ```
210
+
211
+ ### Memory (Source-Isolated)
212
+
213
+ Persistent memory with daily logs scoped by task source:
214
+
215
+ ```
216
+ .openvole/paws/paw-memory/
217
+ ├── MEMORY.md # Shared long-term facts
218
+ ├── user/ # CLI session logs
219
+ ├── paw/ # Telegram/Slack logs
220
+ └── heartbeat/ # Heartbeat logs
221
+ ```
222
+
223
+ ### Sessions
224
+
225
+ Conversation continuity across messages. Auto-expiring transcripts per session ID. Session data lives in `.openvole/paws/paw-session/`, organized by session ID (e.g., `cli:default/`, `telegram:123/`).
226
+
227
+ ### MCP Support
228
+
229
+ Bridge 1000+ community MCP servers into the tool registry via `paw-mcp`. MCP tools appear alongside Paw tools — the Brain doesn't know the difference.
230
+
231
+ - MCP tools are **auto-discovered at runtime** as MCP servers connect
232
+ - **Late tool registration** — tools appear after the engine starts, not at boot
233
+ - MCP config lives in `.openvole/paws/paw-mcp/servers.json` (not in the installed package)
234
+
235
+ Example `.openvole/paws/paw-mcp/servers.json`:
236
+
237
+ ```json
238
+ {
239
+ "servers": [
240
+ {
241
+ "name": "resend",
242
+ "command": "npx",
243
+ "args": ["-y", "resend-mcp"],
244
+ "env": { "RESEND_API_KEY": "$RESEND_API_KEY" }
245
+ }
246
+ ]
247
+ }
248
+ ```
249
+
250
+ ### Late Tool Registration
251
+
252
+ Any Paw can discover and register tools at runtime using the `register_tools` mechanism — not just MCP. Tools registered this way appear in the tool registry like any other tool. This is a generic capability of the engine, not an MCP-specific feature.
253
+
254
+ ### Local Paw Config
255
+
256
+ Each Paw has its own local config directory at `.openvole/paws/<name>/`. The installed npm package stays immutable — all user configuration lives in the local paw directory.
257
+
258
+ ```
259
+ .openvole/paws/
260
+ ├── paw-memory/ ← memory data (MEMORY.md, daily logs)
261
+ ├── paw-session/ ← session transcripts
262
+ └── paw-mcp/ ← MCP config (servers.json)
263
+ ```
264
+
265
+ Example: `paw-mcp` reads its `servers.json` from `.openvole/paws/paw-mcp/`, not from `node_modules/`.
266
+
267
+ ### Rate Limiting
268
+
269
+ Prevent runaway costs with configurable limits on LLM calls, tool executions, and task enqueue rates.
270
+
271
+ ### Tool Profiles
272
+
273
+ Per-source tool filtering — restrict what Telegram users can trigger:
274
+
275
+ ```json
276
+ { "toolProfiles": { "paw": { "deny": ["shell_exec", "fs_write"] } } }
277
+ ```
278
+
279
+ ### Identity Files
280
+
281
+ Customize agent behavior with optional markdown files in `.openvole/`:
282
+
283
+ | File | Purpose |
284
+ |------|---------|
285
+ | `BRAIN.md` | Custom system prompt — **overrides the default system prompt entirely** |
286
+ | `SOUL.md` | Agent personality and tone |
287
+ | `USER.md` | User profile and preferences |
288
+ | `AGENT.md` | Operating rules and constraints |
289
+
290
+ All Brain Paws (Ollama, Claude, OpenAI, Gemini, xAI) load these on startup.
291
+
292
+ ### Workspace
293
+
294
+ Agent scratch space at `.openvole/workspace/` — for files, drafts, API docs, downloaded content. Path traversal protected. Tools: `workspace_write`, `workspace_read`, `workspace_list`, `workspace_delete`.
295
+
296
+ ### Vault
297
+
298
+ Encrypted key-value store at `.openvole/vault.json`:
299
+
300
+ - **AES-256-GCM encryption** when `VOLE_VAULT_KEY` is set
301
+ - **Write-once semantics** — prevents hallucination overwrites
302
+ - **Metadata support** — attach service, handle, URL context to entries
303
+ - `vault_list` never exposes values
304
+
305
+ ### Web Fetch
306
+
307
+ Lightweight URL fetching via the `web_fetch` core tool — GET/POST with custom headers and body. No browser Paw needed for simple HTTP requests.
308
+
309
+ ### Context Compaction
310
+
311
+ When context grows too large, `paw-compact` summarizes old messages while preserving recent context. No LLM needed — pure extraction.
312
+
313
+ ### Dashboard
314
+
315
+ Real-time web UI at `localhost:3001` — paws, tools, skills, tasks, schedules, live events.
316
+
317
+ ## Official Paws (22)
318
+
319
+ All paws live in [PawHub](https://github.com/openvole/pawhub) and are installed via npm.
320
+
321
+ ### Brain (5)
322
+
323
+ | Paw | Purpose |
324
+ |-----|---------|
325
+ | `paw-ollama` | Local LLM via Ollama |
326
+ | `paw-claude` | Anthropic Claude models |
327
+ | `paw-openai` | OpenAI models |
328
+ | `paw-gemini` | Google Gemini models |
329
+ | `paw-xai` | xAI Grok models |
330
+
331
+ ### Channel (4)
332
+
333
+ | Paw | Purpose |
334
+ |-----|---------|
335
+ | `paw-telegram` | Telegram bot channel |
336
+ | `paw-slack` | Slack bot channel |
337
+ | `paw-discord` | Discord bot channel |
338
+ | `paw-whatsapp` | WhatsApp bot channel |
339
+
340
+ ### Tool (8)
341
+
342
+ | Paw | Purpose |
343
+ |-----|---------|
344
+ | `paw-browser` | Browser automation (Puppeteer) |
345
+ | `paw-shell` | Shell command execution |
346
+ | `paw-filesystem` | File system operations |
347
+ | `paw-mcp` | MCP server bridge |
348
+ | `paw-email` | Email sending |
349
+ | `paw-resend` | Email via Resend API |
350
+ | `paw-github` | GitHub integration |
351
+ | `paw-calendar` | Calendar integration |
352
+
353
+ ### Infrastructure (4)
354
+
355
+ | Paw | Purpose |
356
+ |-----|---------|
357
+ | `paw-memory` | Persistent memory with source isolation |
358
+ | `paw-session` | Session/conversation management |
359
+ | `paw-compact` | Context compaction (in-process) |
360
+ | `paw-dashboard` | Real-time web dashboard |
361
+
362
+ Install from npm:
363
+
364
+ ```bash
365
+ npm install @openvole/paw-telegram @openvole/paw-browser
366
+ ```
367
+
368
+ ## CLI
369
+
370
+ ```bash
371
+ npx vole init # Initialize project
372
+ npx vole start # Start agent (interactive)
373
+ npx vole run "summarize my emails" # Single task
374
+
375
+ npx vole paw add @openvole/paw-telegram # Install a Paw
376
+ npx vole paw list # List loaded Paws
377
+
378
+ npx vole skill create email-triage # Create a local skill
379
+ npx vole clawhub install summarize # Install from ClawHub
380
+ npx vole clawhub search email # Search ClawHub
381
+
382
+ npx vole tool list # List all tools
383
+ npx vole tool call list_schedules # Call a tool directly (no Brain)
384
+ ```
385
+
386
+ ## Security
387
+
388
+ | Concern | Approach |
389
+ |---------|----------|
390
+ | Paw isolation | Subprocess sandbox — Paws can't escape |
391
+ | Credentials | Each Paw owns its secrets — core never sees them |
392
+ | Runaway agent | maxIterations + rate limiting + confirmBeforeAct |
393
+ | Channel safety | Tool profiles restrict tools per task source |
394
+ | Permissions | Intersection of manifest requests and config grants |
395
+ | Filesystem sandbox | `sandboxFilesystem` + `allowedPaths` restrict file access |
396
+
397
+ ```json
398
+ { "security": { "sandboxFilesystem": true, "allowedPaths": ["/home/user/projects"] } }
399
+ ```
400
+
401
+ ## Configuration
402
+
403
+ Single `vole.config.json` — plain JSON, no imports:
404
+
405
+ ```json
406
+ {
407
+ "brain": "@openvole/paw-ollama",
408
+ "paws": ["@openvole/paw-ollama", "@openvole/paw-memory"],
409
+ "skills": ["clawhub/summarize"],
410
+ "loop": { "maxIterations": 25, "compactThreshold": 50 },
411
+ "heartbeat": { "enabled": false, "cron": "*/30 * * * *" },
412
+ "toolProfiles": { "paw": { "deny": ["shell_exec"] } }
413
+ }
414
+ ```
415
+
416
+ ## OpenClaw Compatibility
417
+
418
+ OpenVole loads [OpenClaw](https://openclaw.ai) skills natively — same `SKILL.md` format, same `metadata.openclaw.requires` fields. Install directly from [ClawHub](https://clawhub.ai):
419
+
420
+ ```bash
421
+ npx vole clawhub install summarize
422
+ ```
423
+
424
+ ## .openvole Directory Structure
425
+
426
+ ```
427
+ .openvole/
428
+ ├── paws/
429
+ │ ├── paw-memory/ ← memory data
430
+ │ │ ├── MEMORY.md
431
+ │ │ └── user/, paw/, heartbeat/
432
+ │ ├── paw-session/ ← session transcripts
433
+ │ │ └── cli:default/, telegram:123/
434
+ │ └── paw-mcp/ ← MCP config
435
+ │ └── servers.json
436
+ ├── workspace/ ← agent scratch space
437
+ ├── skills/ ← local and clawhub skills
438
+ ├── vault.json ← encrypted key-value store
439
+ ├── schedules.json ← persistent cron schedules
440
+ ├── BRAIN.md ← custom system prompt
441
+ ├── SOUL.md ← agent personality
442
+ ├── USER.md ← user profile
443
+ ├── AGENT.md ← operating rules
444
+ └── HEARTBEAT.md ← recurring job definitions
445
+ ```
446
+
447
+ ## Philosophy
448
+
449
+ > **If it connects to something, it's a Paw.**
450
+ > **If it describes behavior, it's a Skill.**
451
+ > **If the agent calls it, it's a Tool.**
452
+ > **If it's none of these, it probably doesn't belong in OpenVole.**
453
+
454
+ ## License
455
+
456
+ [MIT](LICENSE)