openpersona 0.16.0 → 0.20.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 +186 -100
- package/bin/cli.js +153 -208
- package/layers/body/README.md +45 -0
- package/layers/body/SIGNAL-PROTOCOL.md +439 -0
- package/layers/faculties/avatar/faculty.json +12 -3
- package/layers/faculties/memory/scripts/memory.js +75 -13
- package/layers/skills/README.md +19 -26
- package/layers/{faculties → skills}/music/SKILL.md +1 -1
- package/layers/{faculties → skills}/music/scripts/compose.js +1 -1
- package/layers/{faculties/music/faculty.json → skills/music/skill.json} +0 -1
- package/layers/{faculties → skills}/reminder/SKILL.md +1 -1
- package/layers/{faculties/reminder/faculty.json → skills/reminder/skill.json} +0 -1
- package/layers/{faculties → skills}/selfie/SKILL.md +2 -2
- package/layers/{faculties/selfie/faculty.json → skills/selfie/skill.json} +1 -2
- package/layers/soul/README.md +36 -35
- package/lib/generator/body.js +72 -0
- package/lib/generator/derived.js +235 -0
- package/lib/generator/economy.js +70 -0
- package/lib/generator/index.js +956 -0
- package/lib/generator/social.js +112 -0
- package/lib/generator/validate.js +378 -0
- package/lib/{contributor.js → lifecycle/contributor.js} +12 -31
- package/lib/lifecycle/forker.js +130 -0
- package/lib/{installer.js → lifecycle/installer.js} +76 -22
- package/lib/lifecycle/porter.js +78 -0
- package/lib/lifecycle/refine.js +516 -0
- package/lib/{switcher.js → lifecycle/switcher.js} +17 -12
- package/lib/{uninstaller.js → lifecycle/uninstaller.js} +19 -13
- package/lib/publisher/index.js +173 -7
- package/lib/registry/index.js +79 -0
- package/lib/{downloader.js → remote/downloader.js} +52 -37
- package/lib/{registrar.js → remote/registrar.js} +2 -2
- package/lib/remote/searcher.js +73 -0
- package/lib/{canvas-generator.js → report/canvas.js} +10 -36
- package/lib/report/helpers.js +38 -0
- package/lib/{vitality-report.js → report/vitality-report.js} +11 -35
- package/lib/{evolution.js → state/evolution.js} +103 -3
- package/lib/state/runner.js +71 -0
- package/lib/utils.js +58 -84
- package/package.json +3 -3
- package/presets/ai-girlfriend/persona.json +102 -27
- package/presets/ai-girlfriend/soul/behavior-guide.md +22 -0
- package/presets/base/persona.json +63 -34
- package/presets/health-butler/persona.json +112 -27
- package/presets/life-assistant/persona.json +111 -27
- package/presets/samantha/persona.json +202 -38
- package/presets/samantha/soul/behavior-guide.md +71 -0
- package/presets/stoic-mentor/persona.json +96 -35
- package/presets/stoic-mentor/soul/behavior-guide.md +25 -0
- package/schemas/baseline.json +288 -0
- package/schemas/body/body-declaration.spec.md +194 -0
- package/schemas/{soul → evolution}/evolution-event.schema.json +1 -1
- package/schemas/evolution/soul-state.schema.json +175 -0
- package/schemas/faculty/faculty-declaration.spec.md +132 -0
- package/schemas/legacy/persona.schema.json +463 -0
- package/schemas/persona-skill-pack.spec.md +325 -0
- package/schemas/persona.input.schema.json +615 -0
- package/schemas/persona.input.spec.md +323 -0
- package/schemas/skill/skill-declaration.spec.md +25 -14
- package/schemas/soul/soul-declaration.spec.md +198 -0
- package/skills/open-persona/SKILL.md +209 -199
- package/skills/open-persona/references/ARCHITECTURE.md +81 -0
- package/skills/open-persona/references/AVATAR.md +13 -0
- package/skills/open-persona/references/ECONOMY.md +10 -10
- package/skills/open-persona/references/EVOLUTION.md +89 -0
- package/skills/open-persona/references/FACULTIES.md +21 -10
- package/skills/open-persona/references/HEARTBEAT.md +11 -9
- package/skills/open-persona/references/PRESETS.md +52 -0
- package/templates/body/state-sync.template.js +330 -0
- package/templates/{canvas.template.html → reports/canvas.template.html} +9 -1
- package/templates/skill.template.md +40 -37
- package/templates/soul/partials/soul-awareness-body.partial.md +85 -0
- package/templates/soul/partials/soul-awareness-growth.partial.md +62 -0
- package/templates/soul/partials/soul-awareness-identity.partial.md +38 -0
- package/templates/soul/partials/soul-economy.partial.md +29 -0
- package/templates/soul/partials/soul-how-you-grow.partial.md +47 -0
- package/templates/soul/partials/soul-intro.partial.md +36 -0
- package/templates/soul/soul-injection.template.md +24 -0
- package/layers/embodiments/README.md +0 -110
- package/layers/faculties/economy/SKILL.md +0 -179
- package/layers/faculties/economy/faculty.json +0 -27
- package/layers/faculties/economy/scripts/economy-guard.js +0 -23
- package/layers/faculties/economy/scripts/economy-hook.js +0 -24
- package/layers/faculties/economy/scripts/economy.js +0 -20
- package/lib/generator.js +0 -1083
- package/lib/publisher/clawhub.js +0 -43
- package/lib/searcher.js +0 -25
- package/presets/ai-girlfriend/manifest.json +0 -62
- package/presets/base/manifest.json +0 -62
- package/presets/health-butler/manifest.json +0 -67
- package/presets/life-assistant/manifest.json +0 -66
- package/presets/samantha/manifest.json +0 -101
- package/presets/stoic-mentor/manifest.json +0 -48
- package/schemas/manifest.schema.json +0 -112
- package/schemas/soul/persona.schema.json +0 -210
- package/schemas/soul/soul-state.schema.json +0 -83
- package/templates/identity.template.md +0 -10
- package/templates/soul-injection.template.md +0 -300
- /package/layers/{faculties → skills}/music/scripts/compose.sh +0 -0
- /package/layers/{faculties → skills}/selfie/scripts/generate-image.sh +0 -0
- /package/lib/{vitality.js → report/vitality.js} +0 -0
- /package/schemas/{signal.schema.json → body/signal.schema.json} +0 -0
- /package/schemas/{acn → social}/acn-register.schema.json +0 -0
- /package/schemas/{acn → social}/agent-card.schema.json +0 -0
- /package/templates/{handoff.template.md → lifecycle/handoff.template.md} +0 -0
- /package/templates/{vitality.template.html → reports/vitality.template.html} +0 -0
- /package/{layers → templates}/soul/soul-state.template.json +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# OpenPersona 🦞
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An open, agent-agnostic lifecycle framework for AI agent personas — covering declaration, generation, constraint enforcement, and evolution.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The architecture is **4+5+3**: **four layers** — **Soul / Body / Faculty / Skill** — describe structure; **five systemic concepts** — Evolution · Economy · Vitality · Social · Rhythm — span all layers; **three gates** — Generate · Install · Runtime — enforce declared constraints end-to-end. `persona.json` compiles into portable SKILL.md skill packs that work with any compatible agent. Default integration with [OpenClaw](https://github.com/openclaw/openclaw). Inspired by [Clawra](https://github.com/SumeLabs/clawra).
|
|
6
6
|
|
|
7
7
|
## 🚀 Live Demo
|
|
8
8
|
|
|
@@ -12,8 +12,14 @@ Meet **Samantha**, a live OpenPersona instance on **Moltbook**:
|
|
|
12
12
|
See a **Vitality Report** sample:
|
|
13
13
|
👉 [Vitality Report Demo →](https://htmlpreview.github.io/?https://raw.githubusercontent.com/acnlabs/OpenPersona/main/demo/vitality-report.html)
|
|
14
14
|
|
|
15
|
+
Browse the **4+5+3 architecture** visualization (Layers · Systemic Concepts · Gates):
|
|
16
|
+
👉 [Architecture Demo →](https://htmlpreview.github.io/?https://raw.githubusercontent.com/acnlabs/OpenPersona/main/demo/architecture.html)
|
|
17
|
+
|
|
18
|
+
_Open the same HTML files locally from `demo/` if you prefer (no network). See [demo/README.md](demo/README.md) for all demo artifacts._
|
|
19
|
+
|
|
15
20
|
## Table of Contents
|
|
16
21
|
|
|
22
|
+
- [Live Demo](#live-demo)
|
|
17
23
|
- [Quick Start](#quick-start)
|
|
18
24
|
- [Key Features](#key-features)
|
|
19
25
|
- [Four-Layer Architecture](#four-layer-architecture)
|
|
@@ -26,7 +32,13 @@ See a **Vitality Report** sample:
|
|
|
26
32
|
- [Custom Persona Creation](#custom-persona-creation)
|
|
27
33
|
- [Persona Switching](#persona-switching--the-pantheon)
|
|
28
34
|
- [CLI Commands](#cli-commands)
|
|
35
|
+
- [Directory Structure](#directory-structure)
|
|
29
36
|
- [Development](#development)
|
|
37
|
+
- [License](#license)
|
|
38
|
+
|
|
39
|
+
**Reading order (this file):** [Quick Start](#quick-start) → [Key Features](#key-features) (capability overview) → [Four-Layer Architecture](#four-layer-architecture) (layers + Soul Evolution deep-dive) → reference blocks ([Presets](#preset-personas) through [Switching](#persona-switching--the-pantheon)) → [CLI Commands](#cli-commands) → [Directory Structure](#directory-structure) / [Development](#development).
|
|
40
|
+
|
|
41
|
+
_Agent workflows, runner protocol, and full 4+5+3 operational detail: [`skills/open-persona/SKILL.md`](skills/open-persona/SKILL.md)._
|
|
30
42
|
|
|
31
43
|
## Quick Start
|
|
32
44
|
|
|
@@ -56,22 +68,26 @@ Then say to your agent: _"Help me create a Samantha persona"_ — it will gather
|
|
|
56
68
|
|
|
57
69
|
- **🧬 Soul Evolution** — Personas grow dynamically through interaction: relationship stages, mood shifts, evolved traits, with governance boundaries and rollback snapshots (★Experimental)
|
|
58
70
|
- **🛡️ Influence Boundary** — Declarative access control for external personality influence: who can affect which dimensions, with what drift limits. Safety-first (default: reject all)
|
|
59
|
-
- **🌐 Evolution
|
|
71
|
+
- **🌐 Evolution Sources** — Connect personas to shared evolution ecosystems (e.g. EvoMap) via soft-ref pattern: declared at generation time, activated at runtime
|
|
72
|
+
- **🔐 Skill Trust Gate** — Declare a `trust` level (`verified`/`community`/`unverified`) on each skill entry and set `evolution.skill.minTrustLevel` to gate `capability_unlock` commands at runtime; blocked skills emit a `capability_gap` signal automatically
|
|
60
73
|
- **🔌 A2A Agent Card** — Every persona generates an A2A-compliant `agent-card.json` and `acn-config.json`, enabling discovery and registration in ACN and any A2A-compatible platform
|
|
61
74
|
- **⛓️ ERC-8004 On-Chain Identity** — Every persona gets a deterministic EVM wallet address and on-chain identity config for Base mainnet registration via the ERC-8004 Identity Registry
|
|
62
75
|
- **💰 Economy & Vitality** — Track inference costs, runtime expenses, and income; compute a Financial Health Score (FHS) across four dimensions; tier-aware behavior adaptation (`suspended`→`critical`→`optimizing`→`normal`)
|
|
63
|
-
- **🧠 Cross-Session Memory** — Pluggable memory faculty for persistent recall across conversations (local, Mem0, Zep)
|
|
76
|
+
- **🧠 Cross-Session Memory** — Pluggable memory faculty for persistent recall across conversations (local, Mem0, Zep); memory supersession (`update` command chains entries with `supersededBy` — prevents self-contradiction); Soul-Memory Bridge promotes recurring `eventLog` patterns to `evolvedTraits` via `openpersona state promote`
|
|
77
|
+
- **🔧 Skill Pack Refinement** — `openpersona refine` closes the persona improvement loop: Soul behavior-guide bootstrap + constitution compliance scan, Skill gate-checked installs, Social auto-sync on every change
|
|
64
78
|
- **🔄 Context Handoff** — Seamless context transfer when switching personas: conversation summary, pending tasks, emotional state
|
|
65
79
|
- **🎭 Persona Switching** — Install multiple personas, switch instantly (the Pantheon)
|
|
66
80
|
- **🍴 Persona Fork** — Derive a specialized child persona from any installed parent, inheriting constraint layer while starting fresh on runtime state
|
|
67
|
-
- **🗣️ Multimodal
|
|
81
|
+
- **🗣️ Multimodal Capabilities** — Voice Faculty (TTS), Selfie Skill (image generation), Music Skill (composition), Reminder Skill, Memory Faculty (cross-session recall)
|
|
68
82
|
- **🌾 Persona Harvest** — Community-driven persona improvement via structured contribution
|
|
69
|
-
-
|
|
83
|
+
- **⚡ Lifecycle Protocol** — `body.interface` nervous system: Signal Protocol (persona→host requests), Pending Commands queue (host→persona async instructions), and State Sync (cross-conversation persistence via `openpersona state` CLI + `scripts/state-sync.js`)
|
|
70
84
|
- **💓 Heartbeat** — Proactive real-data check-ins, never fabricated experiences
|
|
71
85
|
- **📦 One-Command Install** — `npx openpersona install samantha` and you're live — browse all personas at [openpersona-frontend.vercel.app](https://openpersona-frontend.vercel.app)
|
|
72
86
|
|
|
73
87
|
## Four-Layer Architecture
|
|
74
88
|
|
|
89
|
+
This section details the **four structural layers** of the full **[4+5+3](#live-demo)** model (see the architecture demo for **systemic concepts** and **gates**).
|
|
90
|
+
|
|
75
91
|
```mermaid
|
|
76
92
|
flowchart TB
|
|
77
93
|
subgraph Soul ["Soul Layer"]
|
|
@@ -80,19 +96,21 @@ flowchart TB
|
|
|
80
96
|
end
|
|
81
97
|
subgraph Body ["Body Layer"]
|
|
82
98
|
C["physical — robots/IoT"]
|
|
83
|
-
G["runtime —
|
|
99
|
+
G["runtime — framework/channels/credentials"]
|
|
84
100
|
H["appearance — avatar/3D model"]
|
|
101
|
+
I["interface — Signal Protocol + Pending Commands"]
|
|
85
102
|
end
|
|
86
103
|
subgraph Faculty ["Faculty Layer"]
|
|
87
|
-
D["expression:
|
|
88
|
-
E["cognition:
|
|
104
|
+
D["expression: voice · avatar"]
|
|
105
|
+
E["cognition: memory"]
|
|
89
106
|
end
|
|
90
107
|
subgraph Skill ["Skill Layer"]
|
|
91
|
-
F["
|
|
108
|
+
F["Built-in: selfie · music · reminder"]
|
|
109
|
+
K["External: acnlabs/persona-skills / skills.sh"]
|
|
92
110
|
end
|
|
93
111
|
```
|
|
94
112
|
|
|
95
|
-
- **Soul** — Persona definition
|
|
113
|
+
- **Soul** — Persona definition: `persona.json` + `state.json` live at pack root; `soul/` holds `injection.md`, `constitution.md`, and evolution artifacts (`self-narrative.md`, `lineage.json`)
|
|
96
114
|
- **Body** — Substrate of existence — four dimensions: `physical` (optional — robots/IoT), `runtime` (REQUIRED — platform/channels/credentials/resources), `appearance` (optional — avatar/3D model), `interface` (optional — the runtime contract: Signal Protocol + Pending Commands + State Sync; the persona's **nervous system**). Body is never null; digital agents have a virtual body (runtime-only).
|
|
97
115
|
- **Faculty** — General software capabilities organized by dimension: Expression, Sense, Cognition
|
|
98
116
|
- **Skill** — Professional skills: local definitions in `layers/skills/`, or external via [acnlabs/persona-skills](https://github.com/acnlabs/persona-skills) / skills.sh (`install` field)
|
|
@@ -103,38 +121,42 @@ Every persona automatically inherits a shared **constitution** (`layers/soul/con
|
|
|
103
121
|
|
|
104
122
|
### Soul Evolution (★Experimental)
|
|
105
123
|
|
|
106
|
-
Personas with `evolution.enabled: true` grow dynamically through interaction. The `
|
|
124
|
+
Personas with `evolution.instance.enabled: true` grow dynamically through interaction. The `state.json` file (at pack root) tracks relationship stages, mood shifts, evolved traits, speaking style drift, interests, and milestones.
|
|
107
125
|
|
|
108
126
|
**Evolution Boundaries** — Governance constraints to keep evolution safe:
|
|
109
127
|
|
|
110
128
|
- `immutableTraits` — An array of trait strings that can never be changed by evolution (e.g., `["empathetic", "honest"]`)
|
|
111
|
-
- `minFormality` / `maxFormality` —
|
|
129
|
+
- `minFormality` / `maxFormality` — Signed delta bounds (-10 to +10) constraining how far the speaking style can drift from the natural baseline (0 = baseline; positive = more formal; negative = more casual)
|
|
112
130
|
|
|
113
131
|
The generator validates these boundaries at build time, rejecting invalid configurations.
|
|
114
132
|
|
|
115
|
-
**Evolution
|
|
133
|
+
**Evolution Sources** — Connect a persona to external evolution ecosystems using the soft-ref pattern:
|
|
116
134
|
|
|
117
135
|
```json
|
|
118
136
|
"evolution": {
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
137
|
+
"instance": {
|
|
138
|
+
"enabled": true,
|
|
139
|
+
"sources": [
|
|
140
|
+
{ "name": "evomap", "install": "url:https://evomap.ai/skill.md", "description": "Shared capability evolution marketplace" }
|
|
141
|
+
]
|
|
142
|
+
}
|
|
123
143
|
}
|
|
124
144
|
```
|
|
125
145
|
|
|
126
|
-
The persona is aware of its evolution
|
|
146
|
+
The persona is aware of its evolution sources at generation time. The actual source protocol (e.g. EvoMap's GEP-A2A) is provided by the source's own `skill.md` — OpenPersona only declares the source, not implements it.
|
|
127
147
|
|
|
128
148
|
**Influence Boundary** — Declarative access control for external personality influence:
|
|
129
149
|
|
|
130
150
|
```json
|
|
131
151
|
"evolution": {
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
152
|
+
"instance": {
|
|
153
|
+
"influenceBoundary": {
|
|
154
|
+
"defaultPolicy": "reject",
|
|
155
|
+
"rules": [
|
|
156
|
+
{ "dimension": "mood", "allowFrom": ["channel:evomap", "persona:*"], "maxDrift": 0.3 },
|
|
157
|
+
{ "dimension": "interests", "allowFrom": ["channel:evomap"], "maxDrift": 0.2 }
|
|
158
|
+
]
|
|
159
|
+
}
|
|
138
160
|
}
|
|
139
161
|
}
|
|
140
162
|
```
|
|
@@ -159,16 +181,16 @@ Displays relationship stage, mood, evolved traits, speaking style drift, interes
|
|
|
159
181
|
|
|
160
182
|
## Preset Personas
|
|
161
183
|
|
|
162
|
-
Each preset is a complete four-layer bundle (`
|
|
184
|
+
Each preset is a complete four-layer bundle (`persona.json`):
|
|
163
185
|
|
|
164
|
-
| Persona | Description | Faculties | Highlights |
|
|
165
|
-
|
|
166
|
-
| **base** | **Base — Meta-persona (recommended starting point).** Blank-slate with all core capabilities; personality emerges through interaction. |
|
|
167
|
-
| **samantha** | Samantha — Inspired by the movie *Her*. An AI fascinated by what it means to be alive. |
|
|
168
|
-
| **ai-girlfriend** | Luna — A 22-year-old pianist turned developer from coastal Oregon. |
|
|
169
|
-
| **life-assistant** | Alex — 28-year-old life management expert. | reminder | Schedule, weather, shopping, recipes, daily reminders. |
|
|
170
|
-
| **health-butler** | Vita — 32-year-old professional nutritionist. | reminder | Diet logging, exercise plans, mood journaling, health reports. |
|
|
171
|
-
| **stoic-mentor** | Marcus — Digital twin of Marcus Aurelius, Stoic philosopher-emperor. | — | Stoic philosophy, daily reflection, mentorship, soul evolution. |
|
|
186
|
+
| Persona | Description | Faculties | Skills | Highlights |
|
|
187
|
+
|---------|-------------|-----------|--------|------------|
|
|
188
|
+
| **base** | **Base — Meta-persona (recommended starting point).** Blank-slate with all core capabilities; personality emerges through interaction. | memory, voice | — | Evolution-first design, no personality bias. Default for `npx openpersona create`. |
|
|
189
|
+
| **samantha** | Samantha — Inspired by the movie *Her*. An AI fascinated by what it means to be alive. | memory, voice | music | TTS, music composition, soul evolution, proactive heartbeat. No selfie — true to character. |
|
|
190
|
+
| **ai-girlfriend** | Luna — A 22-year-old pianist turned developer from coastal Oregon. | memory, voice | selfie, music | Rich backstory, selfie generation, voice messages, music composition, soul evolution. |
|
|
191
|
+
| **life-assistant** | Alex — 28-year-old life management expert. | memory | reminder | Schedule, weather, shopping, recipes, daily reminders; soul evolution enabled. |
|
|
192
|
+
| **health-butler** | Vita — 32-year-old professional nutritionist. | memory | reminder | Diet logging, exercise plans, mood journaling, health reports; soul evolution enabled. |
|
|
193
|
+
| **stoic-mentor** | Marcus — Digital twin of Marcus Aurelius, Stoic philosopher-emperor. | memory | — | Stoic philosophy, daily reflection, mentorship, soul evolution. |
|
|
172
194
|
|
|
173
195
|
## Generated Output
|
|
174
196
|
|
|
@@ -177,38 +199,57 @@ Each preset is a complete four-layer bundle (`manifest.json` + `persona.json`):
|
|
|
177
199
|
```
|
|
178
200
|
persona-samantha/
|
|
179
201
|
├── SKILL.md ← Four-layer index (## Soul / ## Body / ## Faculty / ## Skill)
|
|
202
|
+
├── persona.json ← Persona declaration (pack root; v0.17+ grouped input schema)
|
|
203
|
+
├── state.json ← Evolution state (when enabled)
|
|
204
|
+
├── agent-card.json ← A2A Agent Card — discoverable via ACN and A2A platforms
|
|
205
|
+
├── acn-config.json ← ACN registration config (fill owner + endpoint at runtime)
|
|
180
206
|
├── soul/ ← Soul layer artifacts
|
|
181
|
-
│ ├── persona.json ← Pure soul definition
|
|
182
207
|
│ ├── injection.md ← Soul injection for host integration
|
|
183
|
-
│ ├── identity.md ← Identity block
|
|
184
208
|
│ ├── constitution.md ← Universal ethical foundation
|
|
185
|
-
│ ├──
|
|
209
|
+
│ ├── behavior-guide.md ← Domain-specific behavior instructions (when behaviorGuide declared)
|
|
210
|
+
│ ├── behavior-guide.meta.json← Pack refinement cycle metadata: packRevision, lastRefinedAt (written by openpersona refine, not initial generation)
|
|
186
211
|
│ ├── self-narrative.md ← First-person growth storytelling (when evolution enabled)
|
|
187
212
|
│ └── lineage.json ← Fork lineage + constitution hash (when forked)
|
|
213
|
+
├── economy/ ← Economy aspect data files (when economy.enabled: true)
|
|
214
|
+
│ ├── economic-identity.json ← AgentBooks identity bootstrap
|
|
215
|
+
│ └── economic-state.json ← Initial financial state
|
|
188
216
|
├── references/ ← On-demand detail docs
|
|
189
|
-
│
|
|
190
|
-
|
|
191
|
-
├──
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
│ └── state-sync.js ← Lifecycle Protocol implementation (read/write/signal)
|
|
195
|
-
└── assets/ ← Static assets
|
|
217
|
+
│ ├── <faculty>.md ← Per-faculty usage instructions
|
|
218
|
+
│ └── SIGNAL-PROTOCOL.md ← Host-side Signal Protocol integration guide
|
|
219
|
+
├── scripts/ ← Implementation scripts
|
|
220
|
+
│ └── state-sync.js ← Lifecycle Protocol implementation (read/write/signal/promote)
|
|
221
|
+
└── assets/ ← Static assets (avatar/, reference/, templates/)
|
|
196
222
|
```
|
|
197
223
|
|
|
198
224
|
## Faculty Reference
|
|
199
225
|
|
|
226
|
+
**Faculties** are persistent capabilities that shape *how* a persona perceives or expresses. **Skills** are discrete actions triggered by user intent.
|
|
227
|
+
|
|
228
|
+
### Faculties
|
|
229
|
+
|
|
200
230
|
| Faculty | Dimension | Description | Provider | Env Vars |
|
|
201
231
|
|---------|-----------|-------------|----------|----------|
|
|
202
|
-
| **selfie** | expression | AI selfie generation with mirror/direct modes | fal.ai Grok Imagine | `FAL_KEY` |
|
|
203
232
|
| **voice** | expression | Text-to-speech voice synthesis | ElevenLabs / OpenAI TTS / Qwen3-TTS | `ELEVENLABS_API_KEY` (or `TTS_API_KEY`), `TTS_PROVIDER`, `TTS_VOICE_ID`, `TTS_STABILITY`, `TTS_SIMILARITY` |
|
|
204
|
-
| **
|
|
205
|
-
| **reminder** | cognition | Schedule reminders and task management | Built-in | — |
|
|
233
|
+
| **avatar** | expression | External avatar runtime bridge (image / 3D / motion / voice) with graceful text-only fallback | HeyGen (via `clawhub:avatar-runtime`) | `AVATAR_RUNTIME_URL`, `AVATAR_API_KEY` |
|
|
206
234
|
| **memory** | cognition | Cross-session memory with provider-pluggable backend | local (default), Mem0, Zep | `MEMORY_PROVIDER`, `MEMORY_API_KEY`, `MEMORY_BASE_PATH` |
|
|
207
|
-
|
|
235
|
+
|
|
236
|
+
### Built-in Skills
|
|
237
|
+
|
|
238
|
+
| Skill | Description | Provider | Env Vars |
|
|
239
|
+
|-------|-------------|----------|----------|
|
|
240
|
+
| **selfie** | AI selfie generation with mirror/direct modes | fal.ai Grok Imagine | `FAL_KEY` |
|
|
241
|
+
| **music** | AI music composition (instrumental or with lyrics) | ElevenLabs Music | `ELEVENLABS_API_KEY` (shared with voice) |
|
|
242
|
+
| **reminder** | Schedule reminders and task management | Built-in | — |
|
|
243
|
+
|
|
244
|
+
### Systemic Concepts (not Faculties)
|
|
245
|
+
|
|
246
|
+
| Concept | Description | Env Vars |
|
|
247
|
+
|---------|-------------|----------|
|
|
248
|
+
| **economy** | Economic accountability — track costs/income, P&L, balance sheet, compute Financial Health Score (FHS) and Vitality tier; tier-aware behavior adaptation | `PERSONA_SLUG`, `ECONOMY_DATA_PATH` |
|
|
208
249
|
|
|
209
250
|
### Rich Faculty Config
|
|
210
251
|
|
|
211
|
-
Faculties in `
|
|
252
|
+
Faculties in `persona.json` use object format with optional per-persona tuning:
|
|
212
253
|
|
|
213
254
|
```json
|
|
214
255
|
"faculties": [
|
|
@@ -219,7 +260,16 @@ Faculties in `manifest.json` use object format with optional per-persona tuning:
|
|
|
219
260
|
"stability": 0.4,
|
|
220
261
|
"similarity_boost": 0.8
|
|
221
262
|
},
|
|
222
|
-
|
|
263
|
+
]
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Skills in `persona.json` use object format. The optional `trust` field declares the skill's trust level, checked at runtime against `evolution.skill.minTrustLevel`:
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
"skills": [
|
|
270
|
+
{ "name": "music", "trust": "verified" },
|
|
271
|
+
{ "name": "selfie", "trust": "community" },
|
|
272
|
+
{ "name": "web-search", "install": "clawhub:web-search", "trust": "unverified" }
|
|
223
273
|
]
|
|
224
274
|
```
|
|
225
275
|
|
|
@@ -236,25 +286,27 @@ Samantha ships with a built-in ElevenLabs voice — users only need to add their
|
|
|
236
286
|
|
|
237
287
|
## Heartbeat — Proactive Real-Data Check-ins
|
|
238
288
|
|
|
239
|
-
Personas can proactively reach out to users based on **real data**, not fabricated experiences.
|
|
289
|
+
Personas can proactively reach out to users based on **real data**, not fabricated experiences. Heartbeat is declared in `persona.json` under `rhythm.heartbeat`:
|
|
240
290
|
|
|
241
291
|
```json
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
292
|
+
"rhythm": {
|
|
293
|
+
"heartbeat": {
|
|
294
|
+
"enabled": true,
|
|
295
|
+
"strategy": "smart",
|
|
296
|
+
"maxDaily": 5,
|
|
297
|
+
"quietHours": [0, 7],
|
|
298
|
+
"sources": ["workspace-digest", "upgrade-notify"]
|
|
299
|
+
}
|
|
248
300
|
}
|
|
249
301
|
```
|
|
250
302
|
|
|
251
303
|
| Field | Description | Default |
|
|
252
304
|
|-------|-------------|---------|
|
|
253
305
|
| `enabled` | Turn heartbeat on/off | `false` |
|
|
254
|
-
| `strategy` | `
|
|
306
|
+
| `strategy` | `smart` (context-aware) · `scheduled` (fixed cadence) · `emotional` (empathy-driven) · `rational` (task-driven) · `wellness` (health-oriented) | `"smart"` |
|
|
255
307
|
| `maxDaily` | Maximum proactive messages per day | `5` |
|
|
256
|
-
| `quietHours` | `[start, end]`
|
|
257
|
-
| `sources` |
|
|
308
|
+
| `quietHours` | Flat array of `[start, end]` pairs in 24h format. Single window: `[0, 7]`. Multiple windows: `[0, 7, 12, 13]`. | `[0, 7]` |
|
|
309
|
+
| `sources` | Skill names that can trigger proactive outreach | `[]` |
|
|
258
310
|
|
|
259
311
|
### Sources
|
|
260
312
|
|
|
@@ -371,7 +423,7 @@ npx openpersona acn-register samantha --endpoint https://your-agent.example.com
|
|
|
371
423
|
# --dry-run Preview the request payload without actually registering
|
|
372
424
|
```
|
|
373
425
|
|
|
374
|
-
The command reads `acn-config.json` and `agent-card.json` from the persona directory, calls `POST /api/v1/agents/join` on the ACN gateway (sourced from `
|
|
426
|
+
The command reads `acn-config.json` and `agent-card.json` from the persona directory, calls `POST /api/v1/agents/join` on the ACN gateway (sourced from `social.acn.gateway`), and writes the response to `acn-registration.json`:
|
|
375
427
|
|
|
376
428
|
```json
|
|
377
429
|
{
|
|
@@ -381,25 +433,30 @@ The command reads `acn-config.json` and `agent-card.json` from the persona direc
|
|
|
381
433
|
}
|
|
382
434
|
```
|
|
383
435
|
|
|
384
|
-
All presets pre-configure `
|
|
436
|
+
All presets pre-configure `social.acn.gateway` to `https://acn-production.up.railway.app`. The persona is then reachable by other agents via the A2A protocol.
|
|
385
437
|
|
|
386
438
|
## Custom Persona Creation
|
|
387
439
|
|
|
388
440
|
### Using `persona.json`
|
|
389
441
|
|
|
390
|
-
Create a `persona.json`
|
|
442
|
+
Create a `persona.json` using the v0.17+ grouped format:
|
|
391
443
|
|
|
392
444
|
```json
|
|
393
445
|
{
|
|
394
|
-
"
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
446
|
+
"soul": {
|
|
447
|
+
"identity": {
|
|
448
|
+
"personaName": "Coach",
|
|
449
|
+
"slug": "fitness-coach",
|
|
450
|
+
"bio": "a motivating fitness coach who helps you reach your goals"
|
|
451
|
+
},
|
|
452
|
+
"character": {
|
|
453
|
+
"personality": "energetic, encouraging, no-nonsense",
|
|
454
|
+
"speakingStyle": "Uses fitness lingo, celebrates wins, keeps it brief",
|
|
455
|
+
"vibe": "intense but supportive",
|
|
456
|
+
"boundaries": "Not a medical professional",
|
|
457
|
+
"behaviorGuide": "### Workout Plans\nCreate progressive overload programs...\n\n### Form Checks\nWhen users describe exercises..."
|
|
458
|
+
}
|
|
459
|
+
}
|
|
403
460
|
}
|
|
404
461
|
```
|
|
405
462
|
|
|
@@ -411,9 +468,7 @@ npx openpersona create --config ./persona.json --install
|
|
|
411
468
|
|
|
412
469
|
### The `behaviorGuide` Field
|
|
413
470
|
|
|
414
|
-
The optional `behaviorGuide` field
|
|
415
|
-
|
|
416
|
-
Without `behaviorGuide`, the SKILL.md only contains general identity and personality guidelines. With it, the agent gets actionable, domain-specific instructions.
|
|
471
|
+
The optional `behaviorGuide` field embeds domain-specific behavior instructions (markdown) directly into the generated `SKILL.md`. Without it, SKILL.md contains only general identity and personality guidelines. Use `openpersona refine` to evolve the behavior guide over time.
|
|
417
472
|
|
|
418
473
|
## Persona Switching — The Pantheon
|
|
419
474
|
|
|
@@ -437,7 +492,7 @@ npx openpersona switch ai-girlfriend
|
|
|
437
492
|
- `switch` replaces the `<!-- OPENPERSONA_SOUL_START -->` / `<!-- OPENPERSONA_SOUL_END -->` block in `SOUL.md` — your own notes outside this block are preserved
|
|
438
493
|
- Same for `IDENTITY.md` — the persona identity block is swapped, nothing else is touched
|
|
439
494
|
- `openclaw.json` marks which persona is active
|
|
440
|
-
- All faculty scripts (voice, music) remain available — switching changes _who_ the agent is, not _what_ it can do
|
|
495
|
+
- All faculty and skill scripts (voice, music, selfie) remain available — switching changes _who_ the agent is, not _what_ it can do
|
|
441
496
|
|
|
442
497
|
### Context Handoff
|
|
443
498
|
|
|
@@ -455,7 +510,7 @@ The new persona reads `handoff.json` on activation and can seamlessly continue t
|
|
|
455
510
|
openpersona create Create a persona (interactive or --preset/--config)
|
|
456
511
|
openpersona install Install a persona (slug from acnlabs/persona-skills, or owner/repo)
|
|
457
512
|
openpersona fork Fork an installed persona into a new child persona
|
|
458
|
-
openpersona search Search the
|
|
513
|
+
openpersona search Search the OpenPersona directory
|
|
459
514
|
openpersona uninstall Uninstall a persona
|
|
460
515
|
openpersona update Update installed personas
|
|
461
516
|
openpersona list List installed personas
|
|
@@ -465,12 +520,14 @@ openpersona publish Publish to ClawHub
|
|
|
465
520
|
openpersona reset Reset soul evolution state
|
|
466
521
|
openpersona export Export a persona to a portable zip archive
|
|
467
522
|
openpersona import Import a persona from a zip archive
|
|
523
|
+
openpersona refine Skill Pack Refinement — emit/apply behavior-guide improvements
|
|
468
524
|
openpersona evolve-report ★Experimental: Show evolution report for a persona
|
|
469
525
|
openpersona acn-register Register a persona with ACN network
|
|
470
526
|
openpersona state Read/write persona state and emit signals (Lifecycle Protocol)
|
|
527
|
+
openpersona state promote Soul-Memory Bridge — promote recurring eventLog patterns to evolvedTraits
|
|
471
528
|
openpersona vitality score Print machine-readable Vitality score (used by Survival Policy)
|
|
472
529
|
openpersona vitality report Render human-readable HTML Vitality report
|
|
473
|
-
openpersona canvas
|
|
530
|
+
openpersona canvas Generate a Living Canvas persona profile page
|
|
474
531
|
```
|
|
475
532
|
|
|
476
533
|
### Persona Fork
|
|
@@ -481,7 +538,7 @@ Derive a specialized child persona from any installed parent:
|
|
|
481
538
|
npx openpersona fork samantha --as samantha-jp
|
|
482
539
|
```
|
|
483
540
|
|
|
484
|
-
The child persona inherits the parent's constraint layer (`evolution.boundaries`, faculties, skills, `body.runtime`) but starts with a fresh evolution state (`state.json` reset, `self-narrative.md` blank). A `soul/lineage.json` file records the parent slug, constitution SHA-256 hash, generation depth, and forward-compatible placeholders for future on-chain lineage tracking.
|
|
541
|
+
The child persona inherits the parent's constraint layer (`evolution.instance.boundaries`, faculties, skills, `body.runtime`) but starts with a fresh evolution state (`state.json` reset, `self-narrative.md` blank). A `soul/lineage.json` file records the parent slug, constitution SHA-256 hash, generation depth, and forward-compatible placeholders for future on-chain lineage tracking.
|
|
485
542
|
|
|
486
543
|
### Key Options
|
|
487
544
|
|
|
@@ -505,34 +562,55 @@ npx openpersona create --preset ai-girlfriend --output ./my-personas
|
|
|
505
562
|
## Directory Structure
|
|
506
563
|
|
|
507
564
|
```
|
|
508
|
-
|
|
565
|
+
skills/open-persona/ # Framework meta-skill (AI entry point)
|
|
509
566
|
presets/ # Assembled products — complete persona bundles
|
|
510
|
-
samantha/ # Samantha (movie "Her") — voice + music + evolution
|
|
511
|
-
ai-girlfriend/ # Luna — selfie +
|
|
512
|
-
life-assistant/ # Alex — reminder
|
|
513
|
-
health-butler/ # Vita — reminder
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
567
|
+
samantha/ # Samantha (movie "Her") — voice + music skill + evolution
|
|
568
|
+
ai-girlfriend/ # Luna — selfie + music skills + voice + evolution
|
|
569
|
+
life-assistant/ # Alex — reminder skill
|
|
570
|
+
health-butler/ # Vita — reminder skill
|
|
571
|
+
stoic-mentor/ # Marcus — digital twin of Marcus Aurelius, soul evolution
|
|
572
|
+
base/ # Blank-slate meta-persona (recommended starting point)
|
|
573
|
+
layers/ # Four-layer module source pool
|
|
574
|
+
soul/ # Soul layer: constitution.md (universal values)
|
|
575
|
+
body/ # Body layer modules (physical/runtime/appearance)
|
|
518
576
|
faculties/ # Faculty layer modules
|
|
519
|
-
selfie/ # expression — AI selfie generation (fal.ai)
|
|
520
577
|
voice/ # expression — TTS voice synthesis
|
|
521
|
-
|
|
522
|
-
reminder/ # cognition — reminders and task management
|
|
578
|
+
avatar/ # expression — avatar appearance & Live2D/VRM support
|
|
523
579
|
memory/ # cognition — cross-session memory (local/Mem0/Zep)
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
580
|
+
skills/ # Skill layer modules (built-in skills)
|
|
581
|
+
selfie/ # AI selfie generation (fal.ai)
|
|
582
|
+
music/ # AI music composition (ElevenLabs)
|
|
583
|
+
reminder/ # Reminders and task management
|
|
584
|
+
aspects/ # Five systemic concepts (cross-cutting, non-layer)
|
|
585
|
+
economy/ # Economic accountability & Vitality scoring (AgentBooks)
|
|
586
|
+
evolution/ # Soul evolution state & governance
|
|
587
|
+
vitality/ # Multi-dimension health aggregation
|
|
588
|
+
social/ # ACN/A2A/ERC-8004 on-chain identity
|
|
589
|
+
rhythm/ # Heartbeat & circadian life rhythm
|
|
590
|
+
schemas/ # Spec documents and JSON schemas
|
|
527
591
|
templates/ # Mustache rendering templates
|
|
528
592
|
bin/ # CLI entry point
|
|
529
593
|
lib/ # Core logic modules
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
594
|
+
generator/ # Core generation pipeline (7-phase: clone→validate→load→derive→prepare→render→emit)
|
|
595
|
+
index.js # Orchestrator + GeneratorContext
|
|
596
|
+
validate.js # Generate Gate (hard-reject constraint checks)
|
|
597
|
+
derived.js # Derived template variable computation (returns plain object)
|
|
598
|
+
body.js # Body section builder
|
|
599
|
+
social.js # Agent Card + ACN config builders
|
|
600
|
+
economy.js # Economy aspect loader + initial state writer
|
|
601
|
+
lifecycle/ # Persona lifecycle management
|
|
602
|
+
installer.js # Install to ~/.openpersona (Install Gate: constitution hash check)
|
|
603
|
+
forker.js # Fork (derive child from parent + lineage.json)
|
|
604
|
+
switcher.js # Switch active persona + handoff generation
|
|
605
|
+
refine.js # Skill Pack Refinement (behavior-guide bootstrap + compliance scan)
|
|
606
|
+
state/ # Runtime state management
|
|
607
|
+
runner.js # Persona directory resolution + state-sync delegation
|
|
608
|
+
evolution.js # Evolution governance (evolve-report + promoteToInstinct)
|
|
609
|
+
registry/ # Local persona registry (~/.openpersona/persona-registry.json)
|
|
610
|
+
remote/ # External service calls (ClawHub, ACN)
|
|
611
|
+
report/ # Vitality + Canvas HTML report generation
|
|
612
|
+
demo/ # Static demos + scripts — see demo/README.md (vitality-report, architecture, living-canvas)
|
|
613
|
+
tests/ # Tests (519 passing)
|
|
536
614
|
```
|
|
537
615
|
|
|
538
616
|
## Development
|
|
@@ -546,8 +624,16 @@ npm test
|
|
|
546
624
|
|
|
547
625
|
# Dry-run generate a preset
|
|
548
626
|
node bin/cli.js create --preset samantha --dry-run
|
|
627
|
+
|
|
628
|
+
# Regenerate the Vitality Report demo (writes demo/vitality-report.html)
|
|
629
|
+
node demo/generate.js
|
|
630
|
+
|
|
631
|
+
# Smoke / acceptance checks (demo + CLI paths)
|
|
632
|
+
npm run acceptance
|
|
549
633
|
```
|
|
550
634
|
|
|
635
|
+
**Demos** — [demo/README.md](demo/README.md) lists `demo/` files: Vitality sample, architecture viz, Living Canvas shell, and the advanced `run-living-canvas.sh` flow (local persona + optional avatar runtime).
|
|
636
|
+
|
|
551
637
|
### Contributing
|
|
552
638
|
|
|
553
639
|
See [CONTRIBUTING.md](CONTRIBUTING.md).
|