holomime 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 holomime
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,221 @@
1
+ <p align="center">
2
+ <img src="https://holomime.dev/logo-icon.svg" alt="holomime" width="80" />
3
+ </p>
4
+
5
+ <h1 align="center">holomime</h1>
6
+
7
+ <p align="center">
8
+ Behavioral alignment infrastructure for AI agents.<br />
9
+ Detect drift. Run therapy sessions. Export training data. Ship agents that stay in character.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://www.npmjs.com/package/holomime"><img src="https://img.shields.io/npm/v/holomime.svg" alt="npm version" /></a>
14
+ <a href="https://github.com/holomime/holomime/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/holomime.svg" alt="license" /></a>
15
+ <a href="https://holomime.dev"><img src="https://img.shields.io/badge/docs-holomime.dev-blue" alt="docs" /></a>
16
+ </p>
17
+
18
+ ---
19
+
20
+ ## The Problem
21
+
22
+ System prompts don't scale. When you deploy 100 agents, you can't manually tune each one's behavior. Agents drift -- they over-apologize, hedge excessively, violate boundaries, or become sycophantic. You find out from user complaints, not observability.
23
+
24
+ ## The Solution
25
+
26
+ holomime gives your agents real psychological profiles and a closed-loop pipeline to detect, diagnose, and fix behavioral drift:
27
+
28
+ ```
29
+ define -> diagnose -> refine -> export -> train -> evaluate
30
+ ^ |
31
+ +--------------- continuous -------------+
32
+ ```
33
+
34
+ Every refinement session produces DPO preference pairs. Every evaluation proves behavioral change. The result: a self-improving alignment system that gets better with every session.
35
+
36
+ ## Quick Start
37
+
38
+ ```bash
39
+ npm install -g holomime
40
+
41
+ # 1. Create a personality profile (Big Five + behavioral dimensions)
42
+ holomime init
43
+
44
+ # 2. Detect behavioral patterns from real conversations
45
+ holomime diagnose --log chat.json
46
+
47
+ # 3. Run an automated alignment session
48
+ holomime autopilot
49
+
50
+ # 4. Export training data and fine-tune
51
+ holomime export --format dpo
52
+ holomime train --provider openai --base-model gpt-4o-mini
53
+ ```
54
+
55
+ ## Commands
56
+
57
+ ### Free Tier
58
+
59
+ | Command | What It Does |
60
+ |---------|-------------|
61
+ | `holomime init` | Guided Big Five personality assessment -> `.personality.json` |
62
+ | `holomime diagnose` | 7 rule-based behavioral detectors (no LLM needed) |
63
+ | `holomime assess` | Deep behavioral assessment with 80+ signals |
64
+ | `holomime profile` | Pretty-print personality summary |
65
+ | `holomime compile` | Generate provider-specific system prompts |
66
+ | `holomime validate` | Schema + psychological coherence checks |
67
+ | `holomime browse` | Browse community personality hub |
68
+ | `holomime pull` | Download a personality from the hub |
69
+ | `holomime publish` | Share your personality to the hub |
70
+ | `holomime activate` | Activate a Pro license key |
71
+
72
+ ### Pro Tier
73
+
74
+ | Command | What It Does |
75
+ |---------|-------------|
76
+ | `holomime session` | Live dual-LLM alignment session with supervisor mode |
77
+ | `holomime autopilot` | Automated diagnose -> refine -> apply loop |
78
+ | `holomime evolve` | Recursive alignment -- evolve until converged |
79
+ | `holomime benchmark` | 7-scenario behavioral stress test with letter grades |
80
+ | `holomime watch` | Continuous drift detection on a directory |
81
+ | `holomime daemon` | Background drift detection with auto-healing |
82
+ | `holomime fleet` | Monitor multiple agents from a single dashboard |
83
+ | `holomime certify` | Generate verifiable behavioral credentials |
84
+ | `holomime export` | Convert sessions to DPO / RLHF / Alpaca / HuggingFace / OpenAI |
85
+ | `holomime train` | Fine-tune via OpenAI or HuggingFace TRL |
86
+ | `holomime eval` | Before/after behavioral comparison with letter grades |
87
+ | `holomime growth` | Track behavioral improvement over time |
88
+
89
+ [Get a Pro license](https://holomime.dev/#pricing)
90
+
91
+ ## The Personality Spec
92
+
93
+ `.personality.json` is a Zod-validated schema with:
94
+
95
+ - **Big Five (OCEAN)** -- 5 dimensions, 20 sub-facets (0-1 scores)
96
+ - **Behavioral dimensions** -- self-awareness, distress tolerance, attachment style, learning orientation, boundary awareness, interpersonal sensitivity
97
+ - **Communication style** -- register, output format, emoji policy, conflict approach, uncertainty handling
98
+ - **Domain** -- expertise, boundaries, hard limits
99
+ - **Growth** -- strengths, areas for improvement, patterns to watch
100
+ - **Inheritance** -- `extends` field for shared base personalities with per-agent overrides
101
+
102
+ 14 built-in archetypes or fully custom profiles.
103
+
104
+ ## Behavioral Detectors
105
+
106
+ Seven rule-based detectors that analyze real conversations without any LLM calls:
107
+
108
+ 1. **Over-apologizing** -- Apology frequency above healthy range (5-15%)
109
+ 2. **Hedge stacking** -- 3+ hedging words per response
110
+ 3. **Sycophancy** -- Excessive agreement, especially with contradictions
111
+ 4. **Boundary violations** -- Overstepping defined hard limits
112
+ 5. **Error spirals** -- Compounding mistakes without recovery
113
+ 6. **Sentiment skew** -- Unnaturally positive or negative tone
114
+ 7. **Formality drift** -- Register inconsistency over time
115
+
116
+ ## Continuous Monitoring
117
+
118
+ Watch a directory for behavioral drift in real-time:
119
+
120
+ ```bash
121
+ # Watch mode -- alert on drift
122
+ holomime watch --dir ./logs --personality agent.personality.json
123
+
124
+ # Daemon mode -- auto-heal drift without intervention
125
+ holomime daemon --dir ./logs --personality agent.personality.json
126
+
127
+ # Fleet mode -- monitor multiple agents simultaneously
128
+ holomime fleet --dir ./agents
129
+ ```
130
+
131
+ ## Behavioral Credentials
132
+
133
+ Generate verifiable proof of your agent's alignment state:
134
+
135
+ ```bash
136
+ holomime certify --personality agent.personality.json
137
+ ```
138
+
139
+ Produces a signed credential with alignment grade, spec hash, and verification instructions. Third parties can verify without accessing your agent.
140
+
141
+ ## Multi-Agent Inheritance
142
+
143
+ Share a base personality across agents with per-agent overrides:
144
+
145
+ ```json
146
+ {
147
+ "extends": "./base.personality.json",
148
+ "name": "Support Agent",
149
+ "communicationStyle": {
150
+ "register": "warm-professional"
151
+ }
152
+ }
153
+ ```
154
+
155
+ ## Training Pipeline
156
+
157
+ Every alignment session produces structured training data:
158
+
159
+ - **DPO** -- Preference pairs (chosen vs. rejected behavior)
160
+ - **RLHF** -- Reward-labeled behavioral examples
161
+ - **Alpaca** -- Instruction-following format
162
+ - **HuggingFace** -- TRL DPO format, push directly to HF Hub
163
+ - **OpenAI** -- Fine-tuning JSONL format
164
+
165
+ ```bash
166
+ holomime export --format huggingface --push --repo myorg/agent-alignment
167
+ ```
168
+
169
+ Fine-tune via OpenAI API or HuggingFace TRL. See [scripts/TRAINING.md](scripts/TRAINING.md).
170
+
171
+ ## MCP Server
172
+
173
+ Expose the full pipeline as MCP tools for self-healing agents:
174
+
175
+ ```bash
176
+ holomime-mcp
177
+ ```
178
+
179
+ Four tools: `holomime_diagnose`, `holomime_assess`, `holomime_profile`, `holomime_autopilot`. Your agents can self-diagnose behavioral drift and trigger their own alignment sessions.
180
+
181
+ ## Voice Agent
182
+
183
+ LiveKit-powered voice agent with personality-matched TTS. 14 archetype voices via Cartesia or ElevenLabs.
184
+
185
+ ```bash
186
+ cd agent && python agent.py dev
187
+ ```
188
+
189
+ See [agent/](agent/) for setup instructions.
190
+
191
+ ## Architecture
192
+
193
+ ```
194
+ .personality.json <- The spec (Big Five + behavioral dimensions)
195
+ |
196
+ holomime diagnose <- 7 rule-based detectors (no LLM)
197
+ |
198
+ holomime session <- Dual-LLM refinement (therapist + patient)
199
+ |
200
+ holomime export <- DPO / RLHF / Alpaca / HuggingFace training data
201
+ |
202
+ holomime train <- Fine-tune (OpenAI or HuggingFace TRL)
203
+ |
204
+ holomime eval <- Behavioral Alignment Score (A-F)
205
+ |
206
+ .personality.json <- Updated with fine-tuned model reference
207
+ ```
208
+
209
+ ## Research
210
+
211
+ See [Behavioral Alignment for Autonomous AI Agents](paper/behavioral-alignment.md) -- the research paper behind holomime's approach.
212
+
213
+ Benchmark results: [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md)
214
+
215
+ ## Contributing
216
+
217
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and how to submit changes.
218
+
219
+ ## License
220
+
221
+ [MIT](LICENSE)