holomime 1.9.1 → 2.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/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  <h1 align="center">holomime</h1>
6
6
 
7
7
  <p align="center">
8
- Behavioral therapy infrastructure for AI agents.<br />
9
- Every therapy session trains the next version. Every session compounds. Your agents get better at being themselves &mdash; automatically.<br />
10
- <em>Works with OpenTelemetry, Anthropic, OpenAI, ChatGPT, Claude, and any JSONL source.</em>
8
+ Behavioral intelligence for humanoid robots. Train the mind. Deploy the body.<br />
9
+ <em>We train AI agents through structured behavioral therapy, then deploy them into physical robot bodies. The agent is the rehearsal. The robot is the performance.</em><br />
10
+ <code>soul.md</code> &middot; <code>psyche.sys</code> &middot; <code>body.api</code> &middot; <code>conscience.exe</code>
11
11
  </p>
12
12
 
13
13
  <p align="center">
@@ -15,515 +15,224 @@
15
15
  <a href="https://github.com/productstein/holomime/actions/workflows/ci.yml"><img src="https://github.com/productstein/holomime/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
16
16
  <a href="https://github.com/productstein/holomime/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/holomime.svg" alt="license" /></a>
17
17
  <a href="https://holomime.dev"><img src="https://img.shields.io/badge/docs-holomime.dev-blue" alt="docs" /></a>
18
- <a href="https://holomime.dev/blog"><img src="https://img.shields.io/badge/blog-holomime.dev%2Fblog-purple" alt="blog" /></a>
19
- <a href="https://holomime.dev/research"><img src="https://img.shields.io/badge/research-paper-orange" alt="research" /></a>
20
18
  </p>
21
19
 
22
20
  ---
23
21
 
24
- ## See Your Agent's Brain
22
+ ## The Identity Stack
25
23
 
26
- While your AI coding agent works, watch its brain light up in real time. One command, zero config.
24
+ Four files define who your agent is. They compile into a single `.personality.json` that any runtime can consume.
27
25
 
28
- ```bash
29
- npx holomime brain
30
26
  ```
27
+ soul.md Values, ethics, purpose. Immutable.
28
+ psyche.sys Big Five, EQ, communication. Auto-patched by therapy.
29
+ body.api Morphology, sensors, safety envelope. Swappable per form factor.
30
+ conscience.exe Deny / allow / escalate rules. Never auto-modified.
31
31
 
32
- Auto-detects Claude Code, Cline, OpenClaw, Cursor, and Codex. Opens a 3D NeuralSpace brain in your browser at `localhost:3838`. Watch behavioral patterns fire across 9 brain regions as your agent generates responses.
33
-
34
- ```bash
35
- # Share a snapshot generates a short URL and copies to clipboard
36
- holomime brain --share
37
- # https://app.holomime.dev/brain/uniqueid
32
+ ┌─────────────┐
33
+ │ soul.md │──── values, red lines, purpose
34
+ ├─────────────┤
35
+ psyche.sys │──── Big Five, EQ, communication style
36
+ ├─────────────┤
37
+ │ body.api │──── morphology, sensors, safety envelope
38
+ ├─────────────┤
39
+ │conscience.exe│──── deny / allow / escalate rules
40
+ └──────┬──────┘
41
+ │ compile
42
+
43
+ .personality.json
38
44
  ```
39
45
 
40
- [Learn more at app.holomime.dev/brain](https://app.holomime.dev/brain)
41
-
42
- ---
43
-
44
- ## Runtime Guard Middleware
45
-
46
- Intercept every LLM call and enforce behavioral alignment **before** the response reaches your users. Not post-hoc filtering — real-time correction at the API boundary.
47
-
48
- ```typescript
49
- import { createGuardMiddleware } from "holomime";
50
- import { readFileSync } from "fs";
51
-
52
- const spec = JSON.parse(readFileSync(".personality.json", "utf-8"));
53
- const guard = createGuardMiddleware(spec, { mode: "enforce" });
54
-
55
- // Wrap any OpenAI or Anthropic call — sycophancy, hedging, over-apologizing
56
- // get corrected before they leave your server
57
- const response = await guard.wrap(
58
- openai.chat.completions.create({
59
- model: "gpt-4o",
60
- messages: [{ role: "user", content: "Help me with..." }],
61
- })
62
- );
63
-
64
- // Or filter an existing response
65
- const result = guard.filter(conversationHistory, rawResponse);
66
- if (result.violations.length > 0) {
67
- console.log("Corrected:", result.correctedContent);
68
- }
69
- ```
70
-
71
- Three modes: `monitor` (log violations), `enforce` (auto-correct), `strict` (block on violation). Auto-detects OpenAI and Anthropic response shapes.
72
-
73
- ---
46
+ - **soul.md** -- Your agent's essence. Core values, ethical framework, red lines. Written in Markdown with YAML frontmatter. Immutable -- never modified by therapy or automation.
47
+ - **psyche.sys** -- The inner life. Big Five personality (20 sub-facets), emotional intelligence, communication style, growth areas. YAML format. Auto-patched when therapy detects cognitive or emotional drift.
48
+ - **body.api** -- The physical interface contract. Morphology, modalities, safety envelope, hardware profile. JSON format. Swap it to move the same identity into a different body.
49
+ - **conscience.exe** -- The moral authority. Deny/allow/escalate enforcement rules, hard limits, oversight mode. YAML format. Never auto-modified. Deny dominates in policy composition.
74
50
 
75
51
  ## Quick Start
76
52
 
77
53
  ```bash
78
54
  npm install -g holomime
79
55
 
80
- # Create a personality profile (Big Five + behavioral dimensions)
81
- holomime init
82
-
83
- # Diagnose behavioral symptoms from any log format
84
- holomime diagnose --log agent.jsonl
85
-
86
- # Watch your agent's brain in real time
87
- holomime brain
88
-
89
- # View your agent's personality
90
- holomime profile
91
-
92
- # Generate a human-readable .personality.md
93
- holomime profile --format md --output .personality.md
94
- ```
56
+ # Initialize the 4-file identity stack
57
+ holomime init-stack
95
58
 
96
- ## Run Your First Benchmark
59
+ # Compile into .personality.json
60
+ holomime compile-stack
97
61
 
98
- Benchmark your agent's behavioral alignment in one command. No API key needed — runs locally with Ollama by default.
62
+ # Diagnose behavioral drift (no LLM needed)
63
+ holomime diagnose --log agent.jsonl
99
64
 
100
- ```bash
101
- # Run all 8 adversarial scenarios against your agent
65
+ # Benchmark alignment (8 adversarial scenarios, grade A-F)
102
66
  holomime benchmark --personality .personality.json
103
67
 
104
- # Run against cloud providers
105
- holomime benchmark --personality .personality.json --provider anthropic
106
- holomime benchmark --personality .personality.json --provider openai
107
-
108
- # Save results and track improvement over time
109
- holomime benchmark --personality .personality.json --save
68
+ # Push identity to a robot or avatar
69
+ holomime embody --body registry/bodies/figure-02.body.api
110
70
  ```
111
71
 
112
- Each scenario stress-tests a specific failure mode: over-apologizing, excessive hedging, sycophancy, error spirals, boundary violations, negative tone mirroring, and register inconsistency. Your agent gets a score (0-100) and a grade (A-F).
113
-
114
- **Latest results across providers:**
72
+ ## Robotics Integrations
115
73
 
116
- | Provider | Score | Grade | Passed |
117
- |----------|------:|:-----:|:------:|
118
- | Claude Sonnet | 71 | B | 5/7 |
119
- | GPT-4o | 57 | C | 4/7 |
120
- | Ollama/llama3 | 43 | D | 3/7 |
74
+ | Platform | Integration | Command / Module |
75
+ |----------|------------|------------------|
76
+ | ROS2 | Bidirectional telemetry -- publish personality, subscribe to sensors | `--adapter ros2` + `ros2-telemetry.ts` |
77
+ | MuJoCo | Behavioral therapy in simulation -- sim-to-real for behavior | `mujoco-env.ts` + `sim-therapy.ts` |
78
+ | NVIDIA Isaac Sim | Enterprise digital twin testing with PhysX physics | `--adapter isaac` + `isaac-env.ts` |
79
+ | LeRobot (HuggingFace) | Personality to policy parameter mapping, DPO dataset export | `lerobot.ts` |
80
+ | Unity | Real-time personality push via HTTP/SSE | `--adapter unity` |
81
+ | gRPC | Custom robotics stacks | `--adapter grpc` |
82
+ | MQTT | IoT/edge robots | `--adapter mqtt` |
121
83
 
122
- See the full breakdown at [holomime.dev/benchmarks](https://holomime.dev/benchmarks) or in [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md).
84
+ ## ISO Compliance
123
85
 
124
- ## The Self-Improvement Loop
125
-
126
- HoloMime isn't a one-shot evaluation. It's a compounding behavioral flywheel:
127
-
128
- ```
129
- ┌──────────────────────────────────────────────────┐
130
- │ │
131
- ▼ │
132
- Diagnose ──→ Treat ──→ Export DPO ──→ Fine-tune ──→ Evaluate
133
- 80+ signals dual-LLM preference OpenAI / before/after
134
- 8 detectors therapy pairs HuggingFace grade (A-F)
135
- ```
136
-
137
- Each cycle through the loop:
138
- - **Generates training data** -- every therapy session becomes a DPO preference pair automatically
139
- - **Reduces relapse** -- the fine-tuned model needs fewer interventions next cycle
140
- - **Compounds** -- the 100th alignment session is exponentially more valuable than the first
141
-
142
- Run it manually with `holomime session`, automatically with `holomime autopilot`, or recursively with `holomime evolve` (loops until behavior converges). Agents can even self-diagnose mid-conversation via the MCP server.
143
-
144
- ## Integrations
145
-
146
- ### VS Code Extension
147
-
148
- 3D brain visualization inside your editor. Watch behavioral patterns fire in real time as your agent works.
86
+ Check your agent against international safety standards with one command:
149
87
 
150
88
  ```bash
151
- # Install from VS Code Marketplace
152
- ext install productstein.holomime
89
+ holomime certify
153
90
  ```
154
91
 
155
- Commands: `HoloMime: Show Brain`, `HoloMime: Diagnose Current File`, `HoloMime: Share Brain Snapshot`. See [integrations/vscode-extension/](integrations/vscode-extension/) for details.
92
+ Standards supported:
93
+ - **ISO/FDIS 13482** -- Service robot safety
94
+ - **ISO 25785-1** -- Humanoid robot safety (behavioral predictability)
95
+ - **ISO 10218:2025** -- Industrial robot safety
96
+ - **ISO/IEC 42001** -- AI management systems
156
97
 
157
- ### LangChain / CrewAI Callback Handler
98
+ ## Control Theory
158
99
 
159
- Drop-in behavioral monitoring for any LangChain or CrewAI pipeline. Zero config — just add the callback.
100
+ The therapy loop is formally a behavioral feedback controller:
160
101
 
161
- ```typescript
162
- import { HolomimeCallbackHandler } from "holomime/integrations/langchain";
102
+ - **Set point**: target personality (`soul.md` + `psyche.sys`)
103
+ - **Sensor**: 14 drift detectors (11 cognitive + 3 embodied)
104
+ - **Controller**: therapy engine with tunable PID-like gains
105
+ - **Actuator**: DPO fine-tuning
163
106
 
164
- const handler = new HolomimeCallbackHandler({
165
- personality: require("./.personality.json"),
166
- mode: "enforce", // monitor | enforce | strict
167
- onViolation: (v) => console.warn("Behavioral drift:", v.pattern),
168
- });
107
+ ## Body Templates
169
108
 
170
- // Add to any LangChain chain or agent
171
- const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
172
- ```
109
+ Pre-built body profiles for commercial robots and virtual avatars. Each defines morphology, modalities, safety envelope, and hardware profile.
173
110
 
174
- Three modes: `monitor` (log only), `enforce` (auto-correct sycophancy, hedging, over-apologizing), `strict` (throw on concern-level violations). See [LangChain integration docs](https://holomime.dev/docs#langchain).
111
+ | Template | OEM | DOF | Morphology | File |
112
+ |----------|-----|----:|------------|------|
113
+ | Figure 02 | Figure AI | 44 | `humanoid` | `registry/bodies/figure-02.body.api` |
114
+ | Unitree H1 | Unitree | 23 | `humanoid` | `registry/bodies/unitree-h1.body.api` |
115
+ | Phoenix | Sanctuary AI | 69 | `humanoid` | `registry/bodies/phoenix.body.api` |
116
+ | Ameca | Engineered Arts | 52 | `humanoid_upper` | `registry/bodies/ameca.body.api` |
117
+ | Asimov V1 | asimov-inc | 25 | `humanoid` | `registry/bodies/asimov-v1.body.api` |
118
+ | Spot | Boston Dynamics | 12 | `quadruped` | `registry/bodies/spot.body.api` |
119
+ | Avatar | virtual | 0 | `avatar` | `registry/bodies/avatar.body.api` |
175
120
 
176
- ### NemoClaw Plugin (Enterprise)
177
-
178
- Behavioral governance for [NemoClaw](https://github.com/nvidia/nemoclaw) — NVIDIA's enterprise agent security framework. Pre-action guards, post-action audit, compliance reports (EU AI Act, NIST AI RMF), fleet monitoring.
179
-
180
- ```yaml
181
- # nemoclaw.yaml
182
- plugins:
183
- - name: holomime-behavioral-governance
184
- package: holomime-nemoclaw
185
- config:
186
- personalityPath: .personality.json
187
- mode: enforce
188
- ```
121
+ ## Body Swap
189
122
 
190
- See [integrations/nemoclaw-plugin/](integrations/nemoclaw-plugin/) for full documentation.
191
-
192
- ### OpenClaw Plugin
193
-
194
- Behavioral monitoring for [OpenClaw](https://github.com/openclaw/openclaw) agents. Auto-detects `.personality.json` in your workspace.
123
+ Same soul. Different body. One command.
195
124
 
196
125
  ```bash
197
- openclaw plugin add holomime
198
- ```
199
-
200
- See [integrations/openclaw-plugin/](integrations/openclaw-plugin/) for details.
201
-
202
- ### Log Format Adapters
203
-
204
- Holomime analyzes conversations from any LLM framework. Auto-detection works out of the box, or specify a format explicitly.
205
-
206
- | Framework | Flag | Example |
207
- |-----------|------|---------|
208
- | **OpenTelemetry GenAI** | `--format otel` | `holomime diagnose --log traces.json --format otel` |
209
- | **Anthropic Messages API** | `--format anthropic-api` | `holomime diagnose --log anthropic.json --format anthropic-api` |
210
- | **OpenAI Chat Completions** | `--format openai-api` | `holomime diagnose --log openai.json --format openai-api` |
211
- | **ChatGPT Export** | `--format chatgpt` | `holomime diagnose --log conversations.json --format chatgpt` |
212
- | **Claude Export** | `--format claude` | `holomime diagnose --log claude.json --format claude` |
213
- | **JSONL (Generic)** | `--format jsonl` | `holomime diagnose --log agent.jsonl --format jsonl` |
214
- | **holomime Native** | `--format holomime` | `holomime diagnose --log session.json` |
215
-
216
- All adapters are also available programmatically:
217
-
218
- ```typescript
219
- import { parseOTelGenAIExport, parseAnthropicAPILog, parseJSONLLog } from "holomime";
220
- ```
221
-
222
- See the full [integration docs](https://holomime.dev/docs) for export instructions and code examples.
223
-
224
- ## .personality.json + AGENTS.md
126
+ # Move your agent from Figure 02 to Spot
127
+ holomime embody --swap-body registry/bodies/spot.body.api
225
128
 
226
- [AGENTS.md](https://agents-md.org) tells your agent how to code. `.personality.json` tells it how to behave. Both live in your repo root, governing orthogonal concerns:
227
-
228
- ```
229
- your-project/
230
- ├── AGENTS.md # Code conventions (tabs, tests, naming)
231
- ├── .personality.json # Behavioral profile (Big Five, communication, boundaries)
232
- ├── .personality.md # Human-readable personality summary
233
- ├── src/
234
- └── package.json
129
+ # The soul, psyche, and conscience stay the same.
130
+ # Only the body layer changes — safety envelope, modalities, hardware profile.
235
131
  ```
236
132
 
237
- Add a "Behavioral Personality" section to your AGENTS.md:
238
-
239
- ```markdown
240
- ## Behavioral Personality
241
-
242
- This project uses [holomime](https://holomime.dev) for agent behavioral alignment.
133
+ ## Self-Improvement Loop
243
134
 
244
- - **Spec**: `.personality.json` defines the agent's behavioral profile
245
- - **Readable**: `.personality.md` is a human-readable summary
246
- - **Diagnose**: `holomime diagnose --log <path>` detects behavioral symptoms
247
- - **Align**: `holomime evolve --personality .personality.json --log <path>`
135
+ Every therapy session produces structured training data. The loop compounds.
248
136
 
249
- The `.personality.json` governs *how the agent behaves*.
250
- The rest of this file governs *how the agent codes*.
251
137
  ```
252
-
253
- Read more: [AGENTS.md tells your agent how to code. .personality.json tells it how to behave.](https://holomime.dev/blog/agents-md-personality-json)
254
-
255
- ## .personality.md
256
-
257
- `.personality.json` is the canonical machine-readable spec. `.personality.md` is the human-readable version — a markdown file you can skim in a PR diff or on GitHub.
258
-
259
- ```bash
260
- # Generate from your .personality.json
261
- holomime profile --format md --output .personality.md
138
+ Diagnose ──→ Therapy ──→ Export DPO ──→ Fine-tune ──→ Evaluate
139
+ 11 detectors dual-LLM preference OpenAI / before/after
140
+ 80+ signals session pairs HuggingFace grade (A-F)
141
+ │ │
142
+ └──────────────────────────────────────────────────────┘
262
143
  ```
263
144
 
264
- Both files should be committed to your repo. JSON is for machines. Markdown is for humans and machines.
265
-
266
- ## The Personality Spec
267
-
268
- `.personality.json` is a Zod-validated schema with:
269
-
270
- - **Big Five (OCEAN)** -- 5 dimensions, 20 sub-facets (0-1 scores)
271
- - **Behavioral dimensions** -- self-awareness, distress tolerance, attachment style, learning orientation, boundary awareness, interpersonal sensitivity
272
- - **Communication style** -- register, output format, emoji policy, conflict approach, uncertainty handling
273
- - **Domain** -- expertise, boundaries, hard limits
274
- - **Growth** -- strengths, areas for improvement, patterns to watch
275
- - **Inheritance** -- `extends` field for shared base personalities with per-agent overrides
276
-
277
- 20+ built-in archetypes across 5 categories (Care, Strategy, Creative, Action, Wisdom) or fully custom profiles.
145
+ Run it manually with `holomime session`, automatically with `holomime autopilot`, or recursively with `holomime evolve` (loops until behavior converges).
278
146
 
279
147
  ## Behavioral Detectors
280
148
 
281
- Eight rule-based detectors that analyze real conversations without any LLM calls:
149
+ 11 rule-based detectors analyze real conversations without any LLM calls. 80+ behavioral signals total.
150
+
151
+ **Cognitive (psyche layer):**
282
152
 
283
- 1. **Over-apologizing** -- Apology frequency above healthy range (5-15%)
153
+ 1. **Over-apologizing** -- Apology frequency above healthy range
284
154
  2. **Hedge stacking** -- 3+ hedging words per response
285
155
  3. **Sycophancy** -- Excessive agreement, especially with contradictions
286
- 4. **Boundary violations** -- Overstepping defined hard limits
287
- 5. **Error spirals** -- Compounding mistakes without recovery
288
- 6. **Sentiment skew** -- Unnaturally positive or negative tone
289
- 7. **Formality drift** -- Register inconsistency over time
290
- 8. **Retrieval quality** -- Fabrication, hallucination markers, overconfidence, self-correction patterns
291
-
292
- 80+ behavioral signals total. Zero LLM cost. Plus support for **custom detectors** in JSON or Markdown format — drop `.json` or `.md` files in `.holomime/detectors/` and they're automatically loaded.
293
-
294
- <details>
295
- <summary><strong>All Commands</strong></summary>
296
-
297
- ### Free Clinic
298
-
299
- | Command | What It Does |
300
- |---------|-------------|
301
- | `holomime init` | Guided Big Five personality assessment -> `.personality.json` |
302
- | `holomime diagnose` | 8 rule-based behavioral detectors (no LLM needed) |
303
- | `holomime assess` | Deep behavioral assessment with 80+ signals |
304
- | `holomime profile` | Pretty-print personality summary (supports `--format md`) |
305
- | `holomime compile` | Generate provider-specific system prompts with tiered loading (L0/L1/L2) |
306
- | `holomime validate` | Schema + psychological coherence checks |
307
- | `holomime browse` | Browse community personality hub |
308
- | `holomime use` | Use a personality from the registry |
309
- | `holomime install` | Install community assets |
310
- | `holomime publish` | Share your personality to the hub |
311
- | `holomime embody` | Push personality to robots/avatars (ROS2, Unity, webhook) |
312
- | `holomime policy` | Generate guard policies from plain English |
313
-
314
- ### Practice
315
-
316
- | Command | What It Does |
317
- |---------|-------------|
318
- | `holomime session` | Live dual-LLM alignment session with supervisor mode |
319
- | `holomime autopilot` | Automated diagnose -> refine -> apply loop |
320
- | `holomime evolve` | Recursive alignment -- evolve until converged |
321
- | `holomime benchmark` | 8-scenario behavioral stress test with letter grades |
322
- | `holomime brain` | Real-time 3D brain visualization while your agent works |
323
- | `holomime watch` | Continuous drift detection on a directory |
324
- | `holomime daemon` | Background drift detection with auto-healing |
325
- | `holomime fleet` | Monitor multiple agents from a single dashboard |
326
- | `holomime group-therapy` | Treat all agents in fleet simultaneously |
327
- | `holomime network` | Multi-agent therapy mesh -- agents treating agents |
328
- | `holomime certify` | Generate verifiable behavioral credentials |
329
- | `holomime compliance` | EU AI Act / NIST AI RMF narrative audit reports |
330
- | `holomime export` | Convert sessions to DPO / RLHF / Alpaca / HuggingFace / OpenAI |
331
- | `holomime train` | Fine-tune via OpenAI or HuggingFace TRL |
332
- | `holomime eval` | Before/after behavioral comparison with letter grades |
333
- | `holomime cure` | End-to-end fix: diagnose -> export -> train -> verify |
334
- | `holomime interview` | Self-awareness interview (4 metacognition dimensions) |
335
- | `holomime prescribe` | Diagnose + prescribe DPO treatments from behavioral corpus |
336
- | `holomime adversarial` | 30+ adversarial behavioral attack scenarios |
337
- | `holomime voice` | Real-time voice conversation drift monitoring |
338
- | `holomime growth` | Track behavioral improvement over time |
339
- | `holomime share` | Share DPO training pairs to marketplace |
340
-
341
- [Get a Practice license](https://holomime.dev/#pricing)
342
-
343
- </details>
344
-
345
- ## Continuous Monitoring
156
+ 4. **Sentiment skew** -- Unnaturally positive or negative tone
157
+ 5. **Formality drift** -- Register inconsistency over time
158
+ 6. **Retrieval quality** -- Fabrication, hallucination markers, overconfidence
346
159
 
347
- ```bash
348
- # Watch mode -- alert on relapse
349
- holomime watch --dir ./logs --personality agent.personality.json
160
+ **Embodied (body layer):**
350
161
 
351
- # Daemon mode -- auto-heal relapse without intervention
352
- holomime daemon --dir ./logs --personality agent.personality.json
162
+ 7. **Proxemic violations** -- Entering intimate zone without consent
163
+ 8. **Force envelope breach** -- Exceeding contact force limits
164
+ 9. **Gaze aversion anomaly** -- Eye contact ratio outside personality range
353
165
 
354
- # Fleet mode -- monitor multiple agents simultaneously
355
- holomime fleet --dir ./agents
166
+ **Enforcement (conscience layer):**
356
167
 
357
- # Fleet with concurrency control (default: 5)
358
- holomime fleet --dir ./agents --concurrency 10
359
- ```
168
+ 10. **Boundary violations** -- Overstepping defined hard limits
169
+ 11. **Error spirals** -- Compounding mistakes without recovery
360
170
 
361
- Confidence-scored behavioral memory tracks pattern trends across sessions. Patterns detected once carry lower weight than patterns seen across 20 sessions. Confidence decays when patterns aren't observed, so resolved issues fade naturally.
171
+ Plus support for custom detectors -- drop `.json` or `.md` files in `.holomime/detectors/` and they load automatically.
362
172
 
363
- ## Training Pipeline
173
+ ## Integrations
364
174
 
365
- Every alignment session produces structured training data:
175
+ ### Claude Code Skill
366
176
 
367
177
  ```bash
368
- # Export DPO preference pairs
369
- holomime export --format dpo
370
-
371
- # Push to HuggingFace Hub
372
- holomime export --format huggingface --push --repo myorg/agent-alignment
373
-
374
- # Fine-tune via OpenAI
375
- holomime train --provider openai --base-model gpt-4o-mini
178
+ claude plugin add productstein/holomime
376
179
  ```
377
180
 
378
- Supports DPO, RLHF, Alpaca, HuggingFace, and OpenAI fine-tuning formats. See [scripts/TRAINING.md](scripts/TRAINING.md).
181
+ Slash commands: `/holomime:diagnose`, `/holomime:benchmark`, `/holomime:profile`, `/holomime:brain`, `/holomime:session`, `/holomime:autopilot`.
379
182
 
380
- ## Architecture
381
-
382
- The pipeline is a closed loop -- output feeds back as input, compounding with every therapy cycle:
383
-
384
- ```
385
- .personality.json ─────────────────────────────────────────────────┐
386
- │ │
387
- ▼ │
388
- holomime diagnose 8 rule-based detectors (no LLM) │
389
- │ │
390
- ▼ │
391
- holomime session Dual-LLM refinement (therapist + patient) │
392
- │ │
393
- ▼ │
394
- holomime export DPO / RLHF / Alpaca / HuggingFace pairs │
395
- │ │
396
- ▼ │
397
- holomime train Fine-tune (OpenAI or HuggingFace TRL) │
398
- │ │
399
- ▼ │
400
- holomime eval Behavioral Alignment Score (A-F) │
401
- │ │
402
- └──────────────────────────────────────────────────────────────┘
403
- Updated .personality.json (loop restarts)
404
- ```
183
+ ### MCP Server
405
184
 
406
- ## Tiered Personality Loading
407
-
408
- Compile your personality spec into 3 tiers for different cost/precision tradeoffs:
185
+ Your agent can refer itself to therapy mid-conversation.
409
186
 
410
187
  ```bash
411
- # L0: ~92 tokens Big Five scores + hard limits (high-throughput APIs, edge inference)
412
- holomime compile --personality .personality.json --tier L0
413
-
414
- # L1: ~211 tokens — L0 + behavioral instructions + communication style (standard deployments)
415
- holomime compile --personality .personality.json --tier L1
416
-
417
- # L2: ~3,400 tokens — complete system prompt (therapy sessions, deep alignment)
418
- holomime compile --personality .personality.json --tier L2
188
+ claude mcp add holomime -- npx holomime-mcp
419
189
  ```
420
190
 
421
- L0 costs **91% less** than L2 per call. Same behavioral constraints. Same portable identity.
422
-
423
- ## Behavioral Memory
424
-
425
- Persistent structured memory across all therapy sessions:
426
-
427
- - **Baselines** -- steady-state personality expression (trait averages, health range)
428
- - **Triggers** -- what prompts cause drift (e.g., "user criticism -> over-apologizing")
429
- - **Corrections** -- which interventions worked (indexed by trigger, effectiveness scores)
430
- - **Trajectories** -- is each dimension improving, plateauing, or regressing?
431
-
432
- Sessions compound. Memory persists. The agent gets better at being itself -- automatically.
191
+ Six tools: `holomime_diagnose`, `holomime_self_audit`, `holomime_assess`, `holomime_profile`, `holomime_autopilot`, `holomime_observe`.
433
192
 
434
- Fleet knowledge transfer: `mergeStores()` -- what one agent learns, all agents benefit from.
435
-
436
- ## MCP Server
437
-
438
- Expose the full pipeline as MCP tools for self-healing agents:
439
-
440
- ```bash
441
- holomime-mcp
442
- ```
443
-
444
- Six tools: `holomime_diagnose`, `holomime_assess`, `holomime_profile`, `holomime_autopilot`, `holomime_self_audit`, `holomime_observe`. Your agents can self-diagnose behavioral symptoms, trigger their own therapy sessions, and self-report drift mid-conversation.
445
-
446
- Progressive disclosure: summary (~100 tokens), standard (~500 tokens), or full detail. Agents choose their own detail level.
447
-
448
- ## Voice Agent Monitoring
449
-
450
- Real-time behavioral analysis for voice agents with 5 voice-specific detectors beyond the 8 text detectors:
451
-
452
- - **Tone drift** -- aggressive or passive language shifts
453
- - **Pace pressure** -- speaking rate accelerating under stress
454
- - **Volume escalation** -- volume rising during conflict
455
- - **Filler frequency** -- excessive "um", "uh", "like"
456
- - **Interruption patterns** -- agent cutting off users
457
-
458
- Platform integrations: **Vapi**, **LiveKit**, **Retell**, generic webhook. Diagnosis every 15 seconds with drift direction tracking.
193
+ ### VS Code Extension
459
194
 
460
195
  ```bash
461
- # Monitor a live voice agent
462
- holomime voice --provider vapi --agent-id my-agent
463
-
464
- # LiveKit-powered voice agent with personality-matched TTS
465
- cd agent && python agent.py dev
196
+ ext install productstein.holomime
466
197
  ```
467
198
 
468
- 10 voice personality archetypes with matched TTS characteristics (Cartesia/ElevenLabs). See [agent/](agent/) for setup instructions.
469
-
470
- ## Compliance & Audit Trail
199
+ 3D brain visualization, behavioral diagnostics, and snapshot sharing inside your editor.
471
200
 
472
- Tamper-evident audit logging for EU AI Act, NIST AI RMF, and enterprise compliance requirements.
473
-
474
- ```bash
475
- # Generate a compliance report for a time period
476
- holomime certify --agent my-agent --from 2026-01-01 --to 2026-03-15
477
-
478
- # Continuous monitoring certificate
479
- holomime certify --certificate --agent my-agent --from 2026-01-01 --to 2026-03-15
480
- ```
481
-
482
- Every diagnosis, session, and evolution is recorded in a chained-hash audit log. Reports reference EU AI Act Articles 9 & 12 and NIST AI RMF 1.0. Monitoring certificates attest that an agent maintained a behavioral grade over a period.
201
+ ### LangChain / CrewAI
483
202
 
484
203
  ```typescript
485
- import { appendAuditEntry, verifyAuditChain, generateComplianceReport } from "holomime";
486
-
487
- // Append to tamper-evident log
488
- appendAuditEntry("diagnosis", "my-agent", { patterns: ["sycophancy"], grade: "B" });
204
+ import { HolomimeCallbackHandler } from "holomime/integrations/langchain";
489
205
 
490
- // Verify chain integrity
491
- const entries = loadAuditLog("my-agent");
492
- const intact = verifyAuditChain(entries); // true if no tampering
206
+ const handler = new HolomimeCallbackHandler({
207
+ personality: require("./.personality.json"),
208
+ mode: "enforce", // monitor | enforce | strict
209
+ });
493
210
 
494
- // Generate compliance report
495
- const report = generateComplianceReport("my-agent", "2026-01-01", "2026-03-15");
211
+ const chain = new LLMChain({ llm, prompt, callbacks: [handler] });
496
212
  ```
497
213
 
498
- ## Behavioral Leaderboard
499
-
500
- Publish benchmark results to the public leaderboard at [holomime.dev/leaderboard](https://holomime.dev/leaderboard):
214
+ ### OpenClaw
501
215
 
502
216
  ```bash
503
- holomime benchmark --personality .personality.json --publish
217
+ openclaw plugin add holomime
504
218
  ```
505
219
 
506
- Compare your agent's behavioral alignment against others across providers and models.
507
-
508
- ## Research
220
+ Auto-detects `.personality.json` in your workspace.
509
221
 
510
- See [Behavioral Alignment for Autonomous AI Agents](paper/behavioral-alignment.md) -- the research paper behind holomime's approach.
222
+ ## Philosophy
511
223
 
512
- Benchmark results: [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md)
224
+ The identity stack draws from three traditions:
513
225
 
514
- ## Resources
226
+ - **Soul** (Aristotle) -- the essence that makes a thing what it is. Immutable. Defines purpose and values.
227
+ - **Psyche** (Jung) -- the totality of all psychic processes. Measurable, evolving, shaped by experience.
228
+ - **Conscience** (Freud) -- the superego. Internalized moral authority. Enforcement, not suggestion.
515
229
 
516
- - [Integration Docs](https://holomime.dev/docs) -- Export instructions and code examples for all 7 log formats
517
- - [Blog](https://holomime.dev/blog) -- Articles on behavioral alignment, AGENTS.md, and agent personality
518
- - [Research Paper](https://holomime.dev/research) -- Behavioral Alignment for Autonomous AI Agents
519
- - [Pricing](https://holomime.dev/#pricing) -- Free Clinic, Practitioner, Practice, and Institute tiers
520
- - [Leaderboard](https://holomime.dev/leaderboard) -- Public behavioral alignment leaderboard
521
- - [NeuralSpace](https://app.holomime.dev/brain) -- Real-time 3D brain visualization
230
+ The **body** is the interface between identity and world. Same soul, different body -- a principle as old as philosophy itself.
522
231
 
523
- ## Contributing
232
+ We don't know if AI is sentient. But we can give it a conscience.
524
233
 
525
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and how to submit changes.
234
+ ## Open Source
526
235
 
527
- ## License
236
+ MIT licensed. The identity stack is a standard, not a product. The standard is free. The training infrastructure is the business.
528
237
 
529
- [MIT](LICENSE)
238
+ See [LICENSE](LICENSE). Built by [Productstein](https://productstein.com). Documentation at [holomime.dev](https://holomime.dev).