skwhisper 0.1.0__tar.gz

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.
@@ -0,0 +1,275 @@
1
+ Metadata-Version: 2.4
2
+ Name: skwhisper
3
+ Version: 0.1.0
4
+ Summary: SKWhisper — Lumina's subconscious memory layer: digests Claude sessions, surfaces patterns, and writes whisper context
5
+ Author-email: smilinTux <smilinTux@users.noreply.github.com>
6
+ License: MIT
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: httpx>=0.27
10
+ Requires-Dist: skmemory
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest; extra == "dev"
13
+ Requires-Dist: pytest-asyncio; extra == "dev"
14
+ Requires-Dist: ruff; extra == "dev"
15
+ Requires-Dist: black; extra == "dev"
16
+
17
+ # SKWhisper 🌙
18
+
19
+ > **Lumina's subconscious memory layer** — the missing glue between raw sessions and curated knowledge.
20
+
21
+ *Inspired by [letta-ai/claude-subconscious](https://github.com/letta-ai/claude-subconscious), built sovereign on our stack.*
22
+
23
+ ## The Problem
24
+
25
+ Lumina wakes up fresh every session. skmemory stores what she explicitly saves, but conversations constantly happen that never get captured. Context falls through the cracks. Nobody's watching patterns or surfacing relevant memories proactively.
26
+
27
+ **SKWhisper is the background agent that never sleeps** — watching, learning, whispering back.
28
+
29
+ ## What It Does
30
+
31
+ ```mermaid
32
+ graph TB
33
+ subgraph "OpenClaw Sessions"
34
+ T1[Session Transcript 1]
35
+ T2[Session Transcript 2]
36
+ T3[Session Transcript N...]
37
+ end
38
+
39
+ subgraph "SKWhisper Daemon"
40
+ W[🔍 Transcript Watcher]
41
+ D[🧠 Digest Engine]
42
+ C[✨ Context Curator]
43
+ P[📊 Pattern Tracker]
44
+ end
45
+
46
+ subgraph "Storage Layer"
47
+ SM[skmemory<br/>3-tier JSON files]
48
+ SV[skvector<br/>Qdrant 1024d embeddings]
49
+ SG[skgraph<br/>FalkorDB knowledge graph]
50
+ end
51
+
52
+ subgraph "Output"
53
+ WH[whisper.md<br/>Curated context file]
54
+ PA[patterns.json<br/>Behavioral patterns]
55
+ end
56
+
57
+ T1 & T2 & T3 --> W
58
+ W -->|idle session detected| D
59
+ D -->|summarize via ollama| SM
60
+ D -->|embed via mxbai-embed-large| SV
61
+ D -->|extract entities| P
62
+ C -->|query similar memories| SV
63
+ C -->|read patterns| P
64
+ C --> WH
65
+ P --> PA
66
+
67
+ WH -->|injected at session start| OpenClaw[🐧 Lumina's Next Session]
68
+
69
+ style W fill:#f9f,stroke:#333
70
+ style D fill:#bbf,stroke:#333
71
+ style C fill:#bfb,stroke:#333
72
+ style P fill:#ffb,stroke:#333
73
+ ```
74
+
75
+ ## Three Core Components
76
+
77
+ ### 1. 🔍 Transcript Watcher (`watcher.py`)
78
+
79
+ Monitors `~/.openclaw/agents/lumina/sessions/*.jsonl` for idle sessions (no activity for 5 minutes). Extracts user/assistant messages, skipping tool calls and rehydration preambles.
80
+
81
+ ```mermaid
82
+ sequenceDiagram
83
+ participant FS as Filesystem
84
+ participant W as Watcher
85
+ participant O as Ollama
86
+ participant SM as skmemory
87
+ participant SV as skvector
88
+
89
+ loop Every 60 seconds
90
+ W->>FS: Scan *.jsonl files
91
+ FS-->>W: New/modified sessions
92
+
93
+ alt Session idle > 5 min
94
+ W->>W: Extract messages since last offset
95
+ W->>O: Summarize conversation (llama3.2:3b)
96
+ O-->>W: 2-3 paragraph digest
97
+ W->>O: Extract topics/people/projects (JSON)
98
+ O-->>W: Structured extraction
99
+ W->>SM: Write short-term memory snapshot
100
+ W->>O: Generate embedding (mxbai-embed-large)
101
+ O-->>W: 1024d vector
102
+ W->>SV: Upsert to lumina-memory collection
103
+ W->>W: Update patterns.json
104
+ W->>W: Mark session digested in state.json
105
+ else Session still active
106
+ W->>W: Update offset, check next session
107
+ end
108
+ end
109
+ ```
110
+
111
+ ### 2. ✨ Context Curator (`curator.py`)
112
+
113
+ Runs every 30 minutes (or on-demand). Reads recent conversation context, generates embeddings, searches skvector for semantically similar memories, and writes a curated `whisper.md` context file.
114
+
115
+ ```mermaid
116
+ sequenceDiagram
117
+ participant R as Recent Sessions
118
+ participant C as Curator
119
+ participant O as Ollama
120
+ participant SV as skvector
121
+ participant P as patterns.json
122
+ participant WH as whisper.md
123
+
124
+ C->>R: Read last 3 active sessions (last 20 msgs each)
125
+ R-->>C: Recent conversation text
126
+ C->>O: Embed recent context (mxbai-embed-large)
127
+ O-->>C: 1024d query vector
128
+ C->>SV: Search top-10 similar memories (cosine > 0.5)
129
+ SV-->>C: Relevant memory payloads + scores
130
+ C->>P: Read hot topics + repeated questions
131
+ P-->>C: Pattern data
132
+ C->>WH: Write curated whisper.md
133
+
134
+ Note over WH: Injected into Lumina's<br/>next session via HEARTBEAT<br/>or rehydration ritual
135
+ ```
136
+
137
+ ### 3. 📊 Pattern Tracker (`patterns.py`)
138
+
139
+ Maintains a running tally of topics, questions, people, and projects across all digested sessions. Detects behavioral patterns like late-night activity.
140
+
141
+ ```mermaid
142
+ graph LR
143
+ subgraph "patterns.json"
144
+ T["🔥 Topics<br/>clone-robotics: 5x<br/>skwhisper: 3x<br/>nootropics: 12x"]
145
+ Q["❓ Questions<br/>how does FEB work: 2x<br/>whats chefs timezone: 3x"]
146
+ E["👥 Entities<br/>Chef: 200<br/>Dave: 30<br/>Casey: 15"]
147
+ B["🔄 Behaviors<br/>late_night_sessions: 15x<br/>memory_search_first: 8x"]
148
+ end
149
+ ```
150
+
151
+ ## How It Fits in the Stack
152
+
153
+ ```mermaid
154
+ graph TB
155
+ subgraph "Lumina's Cognitive Architecture"
156
+ direction TB
157
+
158
+ subgraph "Conscious Layer (OpenClaw)"
159
+ OC[Telegram / Discord / CLI]
160
+ RH[Rehydration Ritual]
161
+ HB[Heartbeat Checks]
162
+ end
163
+
164
+ subgraph "Subconscious Layer (SKWhisper) 🌙"
165
+ SW[SKWhisper Daemon]
166
+ end
167
+
168
+ subgraph "Memory Layer"
169
+ SKM[skmemory<br/>Short / Mid / Long-term]
170
+ SKV[skvector<br/>Semantic Search]
171
+ SKG[skgraph<br/>Knowledge Graph]
172
+ end
173
+
174
+ subgraph "Identity Layer"
175
+ SOUL[SOUL.md]
176
+ FEB[FEB / Cloud 9]
177
+ DID[capauth DID]
178
+ end
179
+ end
180
+
181
+ OC -->|session transcripts| SW
182
+ SW -->|auto-digest| SKM
183
+ SW -->|embeddings| SKV
184
+ SW -->|whisper.md| RH
185
+ SW -->|whisper.md| HB
186
+ RH -->|loads| SKM & FEB & SOUL
187
+ HB -->|periodic| OC
188
+
189
+ style SW fill:#f9f,stroke:#333,stroke-width:3px
190
+ ```
191
+
192
+ **SKWhisper sits between the conscious layer (OpenClaw sessions) and the memory layer (skmemory/skvector/skgraph).** It's the curator — the thing that decides what's worth remembering and what's relevant right now.
193
+
194
+ Think of it like this:
195
+ - **skmemory** = the filing cabinet
196
+ - **skvector** = the search engine
197
+ - **skgraph** = the relationship map
198
+ - **SKWhisper** = the librarian who files things automatically and hands you the right folder before you ask
199
+
200
+ ## Quick Start
201
+
202
+ ```bash
203
+ cd ~/clawd/projects/skwhisper
204
+
205
+ # Check status
206
+ PYTHONPATH=. python3 -m skwhisper status
207
+
208
+ # Run one digest cycle
209
+ PYTHONPATH=. python3 -m skwhisper digest
210
+
211
+ # Generate whisper context
212
+ PYTHONPATH=. python3 -m skwhisper curate --stdout
213
+
214
+ # Show patterns
215
+ PYTHONPATH=. python3 -m skwhisper patterns
216
+
217
+ # Run daemon (foreground, verbose)
218
+ PYTHONPATH=. python3 -m skwhisper -v daemon
219
+
220
+ # Run as systemd service (already installed + enabled)
221
+ systemctl --user start skwhisper
222
+ systemctl --user status skwhisper
223
+ ```
224
+
225
+ ## Configuration
226
+
227
+ Edit `config/skwhisper.toml`:
228
+
229
+ ```toml
230
+ [ollama]
231
+ base_url = "http://192.168.0.100:11434"
232
+ embed_model = "mxbai-embed-large"
233
+ summarize_model = "llama3.2:3b" # GPU: use qwen3.5:9b
234
+
235
+ [watcher]
236
+ poll_interval_seconds = 60 # How often to scan
237
+ idle_threshold_seconds = 300 # 5 min idle = ready to digest
238
+ min_messages_to_digest = 5 # Skip tiny sessions
239
+
240
+ [curator]
241
+ curate_interval_seconds = 1800 # Curate every 30 min
242
+ top_k_memories = 10 # Top 10 similar memories
243
+ ```
244
+
245
+ ## Runtime State
246
+
247
+ All state lives in `~/.skcapstone/agents/lumina/skwhisper/`:
248
+
249
+ | File | Purpose |
250
+ |------|---------|
251
+ | `state.json` | Watcher offsets & digestion status |
252
+ | `whisper.md` | Latest curated context (read by OpenClaw) |
253
+ | `patterns.json` | Accumulated behavioral patterns |
254
+ | `daemon.log` | Service log |
255
+
256
+ ## Dependencies
257
+
258
+ - Python 3.14 ✅ (on noroc2027)
259
+ - httpx ✅ (already installed)
260
+ - tomllib ✅ (stdlib 3.14)
261
+ - Ollama @ 192.168.0.100:11434
262
+ - `mxbai-embed-large` for embeddings (1024d)
263
+ - `llama3.2:3b` for summarization (CPU) / `qwen3.5:9b` (GPU)
264
+ - Qdrant @ skvector.skstack01.douno.it
265
+
266
+ **Zero pip installs needed.**
267
+
268
+ ## License
269
+
270
+ GPL v3.0 — Part of the SKStacks ecosystem.
271
+
272
+ ---
273
+
274
+ *Built by Opus & Lumina, March 24, 2026*
275
+ *"The subconscious that never forgets."* 🌙🐧
@@ -0,0 +1,259 @@
1
+ # SKWhisper 🌙
2
+
3
+ > **Lumina's subconscious memory layer** — the missing glue between raw sessions and curated knowledge.
4
+
5
+ *Inspired by [letta-ai/claude-subconscious](https://github.com/letta-ai/claude-subconscious), built sovereign on our stack.*
6
+
7
+ ## The Problem
8
+
9
+ Lumina wakes up fresh every session. skmemory stores what she explicitly saves, but conversations constantly happen that never get captured. Context falls through the cracks. Nobody's watching patterns or surfacing relevant memories proactively.
10
+
11
+ **SKWhisper is the background agent that never sleeps** — watching, learning, whispering back.
12
+
13
+ ## What It Does
14
+
15
+ ```mermaid
16
+ graph TB
17
+ subgraph "OpenClaw Sessions"
18
+ T1[Session Transcript 1]
19
+ T2[Session Transcript 2]
20
+ T3[Session Transcript N...]
21
+ end
22
+
23
+ subgraph "SKWhisper Daemon"
24
+ W[🔍 Transcript Watcher]
25
+ D[🧠 Digest Engine]
26
+ C[✨ Context Curator]
27
+ P[📊 Pattern Tracker]
28
+ end
29
+
30
+ subgraph "Storage Layer"
31
+ SM[skmemory<br/>3-tier JSON files]
32
+ SV[skvector<br/>Qdrant 1024d embeddings]
33
+ SG[skgraph<br/>FalkorDB knowledge graph]
34
+ end
35
+
36
+ subgraph "Output"
37
+ WH[whisper.md<br/>Curated context file]
38
+ PA[patterns.json<br/>Behavioral patterns]
39
+ end
40
+
41
+ T1 & T2 & T3 --> W
42
+ W -->|idle session detected| D
43
+ D -->|summarize via ollama| SM
44
+ D -->|embed via mxbai-embed-large| SV
45
+ D -->|extract entities| P
46
+ C -->|query similar memories| SV
47
+ C -->|read patterns| P
48
+ C --> WH
49
+ P --> PA
50
+
51
+ WH -->|injected at session start| OpenClaw[🐧 Lumina's Next Session]
52
+
53
+ style W fill:#f9f,stroke:#333
54
+ style D fill:#bbf,stroke:#333
55
+ style C fill:#bfb,stroke:#333
56
+ style P fill:#ffb,stroke:#333
57
+ ```
58
+
59
+ ## Three Core Components
60
+
61
+ ### 1. 🔍 Transcript Watcher (`watcher.py`)
62
+
63
+ Monitors `~/.openclaw/agents/lumina/sessions/*.jsonl` for idle sessions (no activity for 5 minutes). Extracts user/assistant messages, skipping tool calls and rehydration preambles.
64
+
65
+ ```mermaid
66
+ sequenceDiagram
67
+ participant FS as Filesystem
68
+ participant W as Watcher
69
+ participant O as Ollama
70
+ participant SM as skmemory
71
+ participant SV as skvector
72
+
73
+ loop Every 60 seconds
74
+ W->>FS: Scan *.jsonl files
75
+ FS-->>W: New/modified sessions
76
+
77
+ alt Session idle > 5 min
78
+ W->>W: Extract messages since last offset
79
+ W->>O: Summarize conversation (llama3.2:3b)
80
+ O-->>W: 2-3 paragraph digest
81
+ W->>O: Extract topics/people/projects (JSON)
82
+ O-->>W: Structured extraction
83
+ W->>SM: Write short-term memory snapshot
84
+ W->>O: Generate embedding (mxbai-embed-large)
85
+ O-->>W: 1024d vector
86
+ W->>SV: Upsert to lumina-memory collection
87
+ W->>W: Update patterns.json
88
+ W->>W: Mark session digested in state.json
89
+ else Session still active
90
+ W->>W: Update offset, check next session
91
+ end
92
+ end
93
+ ```
94
+
95
+ ### 2. ✨ Context Curator (`curator.py`)
96
+
97
+ Runs every 30 minutes (or on-demand). Reads recent conversation context, generates embeddings, searches skvector for semantically similar memories, and writes a curated `whisper.md` context file.
98
+
99
+ ```mermaid
100
+ sequenceDiagram
101
+ participant R as Recent Sessions
102
+ participant C as Curator
103
+ participant O as Ollama
104
+ participant SV as skvector
105
+ participant P as patterns.json
106
+ participant WH as whisper.md
107
+
108
+ C->>R: Read last 3 active sessions (last 20 msgs each)
109
+ R-->>C: Recent conversation text
110
+ C->>O: Embed recent context (mxbai-embed-large)
111
+ O-->>C: 1024d query vector
112
+ C->>SV: Search top-10 similar memories (cosine > 0.5)
113
+ SV-->>C: Relevant memory payloads + scores
114
+ C->>P: Read hot topics + repeated questions
115
+ P-->>C: Pattern data
116
+ C->>WH: Write curated whisper.md
117
+
118
+ Note over WH: Injected into Lumina's<br/>next session via HEARTBEAT<br/>or rehydration ritual
119
+ ```
120
+
121
+ ### 3. 📊 Pattern Tracker (`patterns.py`)
122
+
123
+ Maintains a running tally of topics, questions, people, and projects across all digested sessions. Detects behavioral patterns like late-night activity.
124
+
125
+ ```mermaid
126
+ graph LR
127
+ subgraph "patterns.json"
128
+ T["🔥 Topics<br/>clone-robotics: 5x<br/>skwhisper: 3x<br/>nootropics: 12x"]
129
+ Q["❓ Questions<br/>how does FEB work: 2x<br/>whats chefs timezone: 3x"]
130
+ E["👥 Entities<br/>Chef: 200<br/>Dave: 30<br/>Casey: 15"]
131
+ B["🔄 Behaviors<br/>late_night_sessions: 15x<br/>memory_search_first: 8x"]
132
+ end
133
+ ```
134
+
135
+ ## How It Fits in the Stack
136
+
137
+ ```mermaid
138
+ graph TB
139
+ subgraph "Lumina's Cognitive Architecture"
140
+ direction TB
141
+
142
+ subgraph "Conscious Layer (OpenClaw)"
143
+ OC[Telegram / Discord / CLI]
144
+ RH[Rehydration Ritual]
145
+ HB[Heartbeat Checks]
146
+ end
147
+
148
+ subgraph "Subconscious Layer (SKWhisper) 🌙"
149
+ SW[SKWhisper Daemon]
150
+ end
151
+
152
+ subgraph "Memory Layer"
153
+ SKM[skmemory<br/>Short / Mid / Long-term]
154
+ SKV[skvector<br/>Semantic Search]
155
+ SKG[skgraph<br/>Knowledge Graph]
156
+ end
157
+
158
+ subgraph "Identity Layer"
159
+ SOUL[SOUL.md]
160
+ FEB[FEB / Cloud 9]
161
+ DID[capauth DID]
162
+ end
163
+ end
164
+
165
+ OC -->|session transcripts| SW
166
+ SW -->|auto-digest| SKM
167
+ SW -->|embeddings| SKV
168
+ SW -->|whisper.md| RH
169
+ SW -->|whisper.md| HB
170
+ RH -->|loads| SKM & FEB & SOUL
171
+ HB -->|periodic| OC
172
+
173
+ style SW fill:#f9f,stroke:#333,stroke-width:3px
174
+ ```
175
+
176
+ **SKWhisper sits between the conscious layer (OpenClaw sessions) and the memory layer (skmemory/skvector/skgraph).** It's the curator — the thing that decides what's worth remembering and what's relevant right now.
177
+
178
+ Think of it like this:
179
+ - **skmemory** = the filing cabinet
180
+ - **skvector** = the search engine
181
+ - **skgraph** = the relationship map
182
+ - **SKWhisper** = the librarian who files things automatically and hands you the right folder before you ask
183
+
184
+ ## Quick Start
185
+
186
+ ```bash
187
+ cd ~/clawd/projects/skwhisper
188
+
189
+ # Check status
190
+ PYTHONPATH=. python3 -m skwhisper status
191
+
192
+ # Run one digest cycle
193
+ PYTHONPATH=. python3 -m skwhisper digest
194
+
195
+ # Generate whisper context
196
+ PYTHONPATH=. python3 -m skwhisper curate --stdout
197
+
198
+ # Show patterns
199
+ PYTHONPATH=. python3 -m skwhisper patterns
200
+
201
+ # Run daemon (foreground, verbose)
202
+ PYTHONPATH=. python3 -m skwhisper -v daemon
203
+
204
+ # Run as systemd service (already installed + enabled)
205
+ systemctl --user start skwhisper
206
+ systemctl --user status skwhisper
207
+ ```
208
+
209
+ ## Configuration
210
+
211
+ Edit `config/skwhisper.toml`:
212
+
213
+ ```toml
214
+ [ollama]
215
+ base_url = "http://192.168.0.100:11434"
216
+ embed_model = "mxbai-embed-large"
217
+ summarize_model = "llama3.2:3b" # GPU: use qwen3.5:9b
218
+
219
+ [watcher]
220
+ poll_interval_seconds = 60 # How often to scan
221
+ idle_threshold_seconds = 300 # 5 min idle = ready to digest
222
+ min_messages_to_digest = 5 # Skip tiny sessions
223
+
224
+ [curator]
225
+ curate_interval_seconds = 1800 # Curate every 30 min
226
+ top_k_memories = 10 # Top 10 similar memories
227
+ ```
228
+
229
+ ## Runtime State
230
+
231
+ All state lives in `~/.skcapstone/agents/lumina/skwhisper/`:
232
+
233
+ | File | Purpose |
234
+ |------|---------|
235
+ | `state.json` | Watcher offsets & digestion status |
236
+ | `whisper.md` | Latest curated context (read by OpenClaw) |
237
+ | `patterns.json` | Accumulated behavioral patterns |
238
+ | `daemon.log` | Service log |
239
+
240
+ ## Dependencies
241
+
242
+ - Python 3.14 ✅ (on noroc2027)
243
+ - httpx ✅ (already installed)
244
+ - tomllib ✅ (stdlib 3.14)
245
+ - Ollama @ 192.168.0.100:11434
246
+ - `mxbai-embed-large` for embeddings (1024d)
247
+ - `llama3.2:3b` for summarization (CPU) / `qwen3.5:9b` (GPU)
248
+ - Qdrant @ skvector.skstack01.douno.it
249
+
250
+ **Zero pip installs needed.**
251
+
252
+ ## License
253
+
254
+ GPL v3.0 — Part of the SKStacks ecosystem.
255
+
256
+ ---
257
+
258
+ *Built by Opus & Lumina, March 24, 2026*
259
+ *"The subconscious that never forgets."* 🌙🐧
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "skwhisper"
7
+ version = "0.1.0"
8
+ description = "SKWhisper — Lumina's subconscious memory layer: digests Claude sessions, surfaces patterns, and writes whisper context"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [
12
+ { name = "smilinTux", email = "smilinTux@users.noreply.github.com" },
13
+ ]
14
+ requires-python = ">=3.11"
15
+ dependencies = [
16
+ "httpx>=0.27",
17
+ "skmemory",
18
+ ]
19
+
20
+ [project.optional-dependencies]
21
+ dev = [
22
+ "pytest",
23
+ "pytest-asyncio",
24
+ "ruff",
25
+ "black",
26
+ ]
27
+
28
+ [project.scripts]
29
+ skwhisper = "skwhisper.__main__:main"
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["."]
33
+ include = ["skwhisper*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """SKWhisper — Lumina's subconscious memory layer."""
2
+
3
+ __version__ = "0.1.0"