loom-learn 0.3.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.
Files changed (57) hide show
  1. loom_learn-0.3.0/PKG-INFO +17 -0
  2. loom_learn-0.3.0/README.md +345 -0
  3. loom_learn-0.3.0/loom/__init__.py +15 -0
  4. loom_learn-0.3.0/loom/cli/__init__.py +1 -0
  5. loom_learn-0.3.0/loom/cli/main.py +569 -0
  6. loom_learn-0.3.0/loom/coaching/__init__.py +5 -0
  7. loom_learn-0.3.0/loom/coaching/amplifier.py +478 -0
  8. loom_learn-0.3.0/loom/config.py +23 -0
  9. loom_learn-0.3.0/loom/engine/__init__.py +23 -0
  10. loom_learn-0.3.0/loom/engine/auto_observer.py +785 -0
  11. loom_learn-0.3.0/loom/engine/context_loader.py +602 -0
  12. loom_learn-0.3.0/loom/engine/decay_manager.py +75 -0
  13. loom_learn-0.3.0/loom/engine/domain_extractor.py +159 -0
  14. loom_learn-0.3.0/loom/engine/llm_extractor.py +103 -0
  15. loom_learn-0.3.0/loom/engine/org_store.py +812 -0
  16. loom_learn-0.3.0/loom/engine/retention.py +460 -0
  17. loom_learn-0.3.0/loom/engine/rule_store.py +251 -0
  18. loom_learn-0.3.0/loom/engine/timeline.py +432 -0
  19. loom_learn-0.3.0/loom/llm/__init__.py +15 -0
  20. loom_learn-0.3.0/loom/llm/anthropic.py +110 -0
  21. loom_learn-0.3.0/loom/llm/base.py +101 -0
  22. loom_learn-0.3.0/loom/llm/deepseek.py +108 -0
  23. loom_learn-0.3.0/loom/llm/factory.py +60 -0
  24. loom_learn-0.3.0/loom/llm/gemini.py +82 -0
  25. loom_learn-0.3.0/loom/mcp/__init__.py +24 -0
  26. loom_learn-0.3.0/loom/mcp/__main__.py +16 -0
  27. loom_learn-0.3.0/loom/mcp/proxy.py +338 -0
  28. loom_learn-0.3.0/loom/mcp/server.py +2357 -0
  29. loom_learn-0.3.0/loom/onboarding/__init__.py +9 -0
  30. loom_learn-0.3.0/loom/onboarding/packs.py +312 -0
  31. loom_learn-0.3.0/loom/onboarding/succession.py +498 -0
  32. loom_learn-0.3.0/loom/security/__init__.py +20 -0
  33. loom_learn-0.3.0/loom/security/access.py +74 -0
  34. loom_learn-0.3.0/loom/security/audit.py +97 -0
  35. loom_learn-0.3.0/loom/security/integrity.py +61 -0
  36. loom_learn-0.3.0/loom/security/private_mode.py +51 -0
  37. loom_learn-0.3.0/loom/security/rbac.py +445 -0
  38. loom_learn-0.3.0/loom/security/redactor.py +43 -0
  39. loom_learn-0.3.0/loom/security/tests/test_security.py +197 -0
  40. loom_learn-0.3.0/loom/storage/__init__.py +6 -0
  41. loom_learn-0.3.0/loom/storage/adapters.py +552 -0
  42. loom_learn-0.3.0/loom/storage/backend.py +78 -0
  43. loom_learn-0.3.0/loom/storage/migrations/001_initial.sql +129 -0
  44. loom_learn-0.3.0/loom/storage/postgres_store.py +761 -0
  45. loom_learn-0.3.0/loom_learn.egg-info/PKG-INFO +17 -0
  46. loom_learn-0.3.0/loom_learn.egg-info/SOURCES.txt +55 -0
  47. loom_learn-0.3.0/loom_learn.egg-info/dependency_links.txt +1 -0
  48. loom_learn-0.3.0/loom_learn.egg-info/entry_points.txt +2 -0
  49. loom_learn-0.3.0/loom_learn.egg-info/requires.txt +17 -0
  50. loom_learn-0.3.0/loom_learn.egg-info/top_level.txt +1 -0
  51. loom_learn-0.3.0/pyproject.toml +40 -0
  52. loom_learn-0.3.0/setup.cfg +4 -0
  53. loom_learn-0.3.0/tests/test_domain_extractor.py +115 -0
  54. loom_learn-0.3.0/tests/test_llm_extractor.py +71 -0
  55. loom_learn-0.3.0/tests/test_mcp_integration.py +181 -0
  56. loom_learn-0.3.0/tests/test_mcp_tools.py +518 -0
  57. loom_learn-0.3.0/tests/test_rule_store.py +171 -0
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.4
2
+ Name: loom-learn
3
+ Version: 0.3.0
4
+ Summary: The memory layer for AI agents β€” shared learning across your entire organization. Observe, teach, reflect, auto-capture, auto-recall, onboard, succession, coaching amplification, per-observation RBAC, auditable timeline, and more.
5
+ Requires-Python: >=3.10
6
+ Requires-Dist: pyyaml>=6.0
7
+ Requires-Dist: mcp>=1.0.0
8
+ Provides-Extra: dev
9
+ Requires-Dist: pytest>=8.0; extra == "dev"
10
+ Provides-Extra: llm
11
+ Requires-Dist: anthropic>=0.30.0; extra == "llm"
12
+ Provides-Extra: deepseek
13
+ Requires-Dist: openai>=1.0.0; extra == "deepseek"
14
+ Provides-Extra: gemini
15
+ Requires-Dist: google-generativeai>=0.8.0; extra == "gemini"
16
+ Provides-Extra: cloud
17
+ Requires-Dist: psycopg2-binary>=2.9; extra == "cloud"
@@ -0,0 +1,345 @@
1
+ <p align="center">
2
+ <img src="https://img.shields.io/badge/python-3.11+-blue?style=for-the-badge&logo=python" alt="Python 3.11+">
3
+ <img src="https://img.shields.io/badge/protocol-MCP-green?style=for-the-badge" alt="MCP Protocol">
4
+ <img src="https://img.shields.io/badge/license-MIT-purple?style=for-the-badge" alt="MIT License">
5
+ <img src="https://img.shields.io/badge/version-0.3.0-orange?style=for-the-badge" alt="Version 0.3.0">
6
+ </p>
7
+
8
+ <h1 align="center">🧠 Loom</h1>
9
+ <p align="center"><strong>Shared learning for AI agents β€” what any of them learns belongs to your whole org</strong></p>
10
+ <p align="center">An MCP server that observes, learns, and remembers conventions from everything your AI agents do β€” making every agent smarter over time.</p>
11
+
12
+ ---
13
+
14
+ ## ✨ What Loom Does
15
+
16
+ Loom is the shared memory layer for AI agents. Every agent reads from and writes to a single store. Institutional knowledge compounds across your agent fleet rather than being siloed within individual sessions.
17
+
18
+ **New in this release:**
19
+ - **Auto session_init** β€” context is injected on the first tool call. The agent never needs to remember.
20
+ - **Auto observe** β€” teach, learn, amplify, and succession calls are auto-captured as observations.
21
+ - **Multi-provider LLM extraction** β€” Anthropic, DeepSeek, Gemini. Or free keyword extraction by default.
22
+
23
+ ---
24
+
25
+ ## πŸš€ Quick Start
26
+
27
+ ### 1. Install
28
+
29
+ ```bash
30
+ git clone https://github.com/Kaushik-hub306/loom.git
31
+ cd loom
32
+ pip install -e .
33
+ ```
34
+
35
+ ### 2. Setup
36
+
37
+ ```bash
38
+ loom setup
39
+ ```
40
+
41
+ This detects your Python, creates the storage folder, and prints your Claude Desktop config. Copy the JSON it outputs.
42
+
43
+ For LLM-powered extraction, add an API key to the `"env"` block before pasting:
44
+
45
+ ```json
46
+ "env": {
47
+ "LOOM_PROJECT_ROOT": "/path/printed/by/setup",
48
+ "ANTHROPIC_API_KEY": "sk-ant-..."
49
+ }
50
+ ```
51
+
52
+ Or DeepSeek (`pip install openai` first):
53
+
54
+ ```json
55
+ "env": {
56
+ "LOOM_PROJECT_ROOT": "/path/printed/by/setup",
57
+ "LOOM_LLM_PROVIDER": "deepseek",
58
+ "LOOM_DEEPSEEK_API_KEY": "sk-..."
59
+ }
60
+ ```
61
+
62
+ Or Gemini (`pip install google-generativeai` first):
63
+
64
+ ```json
65
+ "env": {
66
+ "LOOM_PROJECT_ROOT": "/path/printed/by/setup",
67
+ "LOOM_LLM_PROVIDER": "gemini",
68
+ "GEMINI_API_KEY": "..."
69
+ }
70
+ ```
71
+
72
+ Paste into your config file:
73
+
74
+ | OS | Config file |
75
+ |----|-----------|
76
+ | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
77
+ | Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
78
+
79
+ ### 3. Restart Claude Desktop
80
+
81
+ ### 4. Verify
82
+
83
+ ```bash
84
+ loom doctor
85
+ ```
86
+
87
+ All checks should pass. If anything fails, it tells you what to fix.
88
+
89
+ **No API key?** Keyword extraction works for free β€” zero cost, zero config. The LLM is optional.
90
+
91
+ ---
92
+
93
+ ## πŸͺ How Hooks Work
94
+
95
+ Loom doesn't wait for the agent to remember to call tools. Two hooks fire automatically:
96
+
97
+ | Hook | When It Fires | What Happens |
98
+ |------|--------------|--------------|
99
+ | **Auto session_init** | First tool call of the session | ContextLoader finds all relevant conventions and injects them into the agent's context |
100
+ | **Auto observe** | Every `teach`, `learn`, `reflect`, `amplify`, `retain`, `set_clearance`, `succession`, `federate` call | The tool call is recorded as an observation in the buffer |
101
+ | **Auto flush** | When the buffer hits threshold, or on process exit | All observations are extracted into rules and written to `.loom/rules.json` |
102
+
103
+ The agent sees `<!-- LOOM:AUTO_CONTEXT -->` followed by Top Reminders, domain rules, coaching amplifications, and org-wide knowledge β€” injected automatically. No manual `session_init` call required.
104
+
105
+ **Tool division:**
106
+
107
+ | Auto (hooks guarantee) | Explicit (agent decides) |
108
+ |------------------------|-------------------------|
109
+ | `session_init` | `teach` |
110
+ | `observe` | `recall_memory` |
111
+ | `learn` | `export`, `export_timeline` |
112
+ | `reflect` | `get_stats` |
113
+ | `recall_relevant` | `onboard`, `succession` |
114
+ | | `amplify`, `retain` |
115
+ | | `set_clearance`, `timeline` |
116
+ | | `federate`, `store_outcome` |
117
+
118
+ ---
119
+
120
+ ## πŸ”Œ 18 MCP Tools
121
+
122
+ ### Core Learning
123
+ | Tool | Description |
124
+ |------|-------------|
125
+ | `learn` | Learn from observation β€” auto-captured by hooks |
126
+ | `teach` | Teach a rule directly β€” auto-captured by hooks |
127
+ | `reflect` | Reflect on completed work β€” auto-captured by hooks |
128
+
129
+ ### Recall
130
+ | Tool | Description |
131
+ |------|-------------|
132
+ | `recall_relevant` | Auto-recall everything relevant to a task |
133
+ | `recall_memory` | Search learned conventions |
134
+ | `session_init` | Pre-load context at session start β€” fires automatically |
135
+ | `observe` | Passive observation β€” fires automatically |
136
+
137
+ ### Glen-Level Features
138
+ | Tool | Description |
139
+ |------|-------------|
140
+ | `onboard` | Generate onboarding pack for a new team member |
141
+ | `succession` | Capture departing member's knowledge |
142
+ | `amplify` | Amplify coaching across the team |
143
+ | `retain` | Mark a rule for permanent retention |
144
+ | `set_clearance` | Set per-observation access control (public β†’ secret) |
145
+ | `timeline` | Query the auditable organization timeline |
146
+ | `federate` | Ingest rules from other projects |
147
+
148
+ ### Essentials
149
+ | Tool | Description |
150
+ |------|-------------|
151
+ | `export` | Export rules (markdown, JSON, compact) |
152
+ | `export_timeline` | Export full org history |
153
+ | `get_stats` | Statistics including org-wide and retention data |
154
+ | `store_outcome` | Store PR review outcome (backward compat) |
155
+
156
+ ---
157
+
158
+ ## πŸ“‚ What Loom Creates
159
+
160
+ ```
161
+ your-project/
162
+ β”œβ”€β”€ .loom/
163
+ β”‚ β”œβ”€β”€ domains/
164
+ β”‚ β”‚ β”œβ”€β”€ coding.yml # Software engineering conventions
165
+ β”‚ β”‚ β”œβ”€β”€ style.yml # Formatting & style conventions
166
+ β”‚ β”‚ β”œβ”€β”€ architecture.yml # Design patterns & module structure
167
+ β”‚ β”‚ β”œβ”€β”€ process.yml # Git workflow, CI/CD, review norms
168
+ β”‚ β”‚ β”œβ”€β”€ testing.yml # Testing conventions & frameworks
169
+ β”‚ β”‚ β”œβ”€β”€ security.yml # Security patterns & practices
170
+ β”‚ β”‚ β”œβ”€β”€ documentation.yml # Docs, READMEs, API docs
171
+ β”‚ β”‚ └── general.yml # Catch-all preferences & best practices
172
+ β”‚ β”œβ”€β”€ rules.json # Learned rules with confidence scores
173
+ β”‚ β”œβ”€β”€ conventions.md # Human-readable rules doc
174
+ β”‚ β”œβ”€β”€ timeline.jsonl # Auditable org history (append-only)
175
+ β”‚ β”œβ”€β”€ retention.json # Retention policy assignments
176
+ β”‚ β”œβ”€β”€ archive.json # Archived rules (never lost)
177
+ β”‚ β”œβ”€β”€ permissions.json # Per-observation RBAC
178
+ β”‚ β”œβ”€β”€ onboarding/ # Role-based onboarding packs
179
+ β”‚ β”œβ”€β”€ succession/ # Departing member knowledge capture
180
+ β”‚ └── coaching/ # Coaching amplifications
181
+ ```
182
+
183
+ Commit `.loom/rules.json` and `.loom/conventions.md` to git so your team shares the same conventions.
184
+
185
+ ---
186
+
187
+ ## πŸ”§ Environment Variables
188
+
189
+ | Variable | Required | Default | Description |
190
+ |----------|----------|---------|-------------|
191
+ | `LOOM_PROJECT_ROOT` | No | `$PWD` | Where to create `.loom/` |
192
+ | `LOOM_ORG_STORE` | No | `.loom/org-store.json` | Shared org-wide memory path |
193
+ | `ANTHROPIC_API_KEY` | No | β€” | Enable Anthropic extraction |
194
+ | `LOOM_DEEPSEEK_API_KEY` | No | β€” | Enable DeepSeek extraction |
195
+ | `GEMINI_API_KEY` | No | β€” | Enable Gemini extraction |
196
+ | `LOOM_LLM_PROVIDER` | No | auto-detect | Force provider: `anthropic`, `deepseek`, or `gemini` |
197
+
198
+ ---
199
+
200
+ ## πŸ—οΈ Architecture
201
+
202
+ ```
203
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
204
+ β”‚ MCP Client (Claude) β”‚
205
+ β”‚ Auto session_init ──→ first tool call β”‚
206
+ β”‚ Auto observe ──→ every teach/learn/amplify β”‚
207
+ β”‚ Explicit tools ──→ recall, export, etc. β”‚
208
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
209
+ β”‚ stdio (JSON-RPC)
210
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
211
+ β”‚ FastMCP Server (loom.mcp) β”‚
212
+ β”‚ Hook layer: auto session_init + observe β”‚
213
+ β”‚ 18 tools β€” learn, teach, reflect, recall, β”‚
214
+ β”‚ observe, onboard, succession, amplify, β”‚
215
+ β”‚ retain, timeline, federate, session_init β”‚
216
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
217
+ β”‚
218
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
219
+ β–Ό β–Ό β–Ό β–Ό
220
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
221
+ β”‚ Rule β”‚ β”‚ Domain β”‚ β”‚ LLM β”‚ β”‚ Org β”‚
222
+ β”‚ Store β”‚ β”‚ Extractor β”‚ β”‚ Extractorβ”‚ β”‚ Store β”‚
223
+ β”‚ (JSON) β”‚ β”‚ (YAML) β”‚ β”‚ (Provider)β”‚ β”‚ (JSON) β”‚
224
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
225
+ β”‚ β”‚ β”‚ β”‚
226
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
227
+ β–Ό β–Ό
228
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
229
+ β”‚ Auto β”‚ Context β”‚ Timeline β”‚ Retentionβ”‚
230
+ β”‚ Observer β”‚ Loader β”‚ (JSONL) β”‚ Manager β”‚
231
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
232
+ β”‚
233
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
234
+ β–Ό β–Ό β–Ό β–Ό
235
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
236
+ β”‚Onboardingβ”‚ β”‚Successionβ”‚ β”‚ Coaching β”‚ β”‚ Security β”‚
237
+ β”‚ Packs β”‚ β”‚ Capture β”‚ β”‚Amplifierβ”‚ β”‚ Layer (5) β”‚
238
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
239
+ ```
240
+
241
+ ---
242
+
243
+ ## πŸ“Š Example Session
244
+
245
+ ```
246
+ [Agent starts coding β€” Loom hooks fire automatically]
247
+
248
+ First tool call β†’ auto session_init injects:
249
+
250
+ <!-- LOOM:AUTO_CONTEXT -->
251
+ ## πŸ” Relevant Conventions (from Loom)
252
+
253
+ ### ⚑ Top Reminders
254
+ 1. All routes must have explicit type annotations (9/10)
255
+ 2. Use async/await for all I/O operations (8/10)
256
+ 3. Every new endpoint needs at least one test (9/10)
257
+
258
+ ### By Domain
259
+ #### coding
260
+ - type_safety (9/10): All public functions must have type hints
261
+ - error_handling (8/10): Use custom exception classes
262
+ ...
263
+
264
+ ### πŸ“’ Coaching Amplifications
265
+ - "Use async/await for all I/O" β€” Sarah Chen (Staff Eng)
266
+ This is critical because sync I/O caused 3 production incidents...
267
+
268
+ ### 🌐 Org-Wide Knowledge
269
+ - [api-service] error_handling: Always include request IDs
270
+ - [shared-infra] process: Squash commits before merging
271
+
272
+ *Session context loaded by Loom*
273
+
274
+ [Agent continues coding. Every teach/learn/amplify auto-observed.]
275
+
276
+ Agent: teach(domain="security", rule="Hash passwords with bcrypt",
277
+ rule_type="cryptography")
278
+
279
+ [Session ends β€” auto-flush extracts all observations into rules.]
280
+ ```
281
+
282
+ ---
283
+
284
+ ## πŸ“¦ Project Structure
285
+
286
+ ```
287
+ loom/
288
+ β”œβ”€β”€ engine/ # Core domain logic
289
+ β”‚ β”œβ”€β”€ rule_store.py # JSON-backed persistent rule store
290
+ β”‚ β”œβ”€β”€ domain_extractor.py # Config-driven keyword extraction (8 domains)
291
+ β”‚ β”œβ”€β”€ llm_extractor.py # Provider-agnostic LLM extraction
292
+ β”‚ β”œβ”€β”€ decay_manager.py # Confidence decay over time
293
+ β”‚ β”œβ”€β”€ auto_observer.py # Silent passive observation with buffer
294
+ β”‚ β”œβ”€β”€ context_loader.py # Smart auto-recall by task + role
295
+ β”‚ β”œβ”€β”€ org_store.py # Cross-project org-wide shared memory
296
+ β”‚ β”œβ”€β”€ timeline.py # Auditable, append-only org history
297
+ β”‚ β”œβ”€β”€ session_manager.py # Session lifecycle (create, track, cleanup)
298
+ β”‚ └── retention.py # Tiered retention (permanent β†’ transient)
299
+ β”œβ”€β”€ llm/ # Pluggable LLM providers
300
+ β”‚ β”œβ”€β”€ base.py # BaseLLMProvider ABC
301
+ β”‚ β”œβ”€β”€ anthropic.py # Claude via anthropic SDK
302
+ β”‚ β”œβ”€β”€ deepseek.py # DeepSeek via openai SDK
303
+ β”‚ β”œβ”€β”€ gemini.py # Gemini via google-generativeai SDK
304
+ β”‚ └── factory.py # Auto-detect provider from env vars
305
+ β”œβ”€β”€ mcp/ # MCP server implementation
306
+ β”‚ β”œβ”€β”€ __main__.py # Entry point: python3 -m loom.mcp
307
+ β”‚ └── server.py # Hook layer + 18 tools
308
+ β”œβ”€β”€ security/ # Security & governance
309
+ β”‚ β”œβ”€β”€ redactor.py # PII/secret redaction
310
+ β”‚ β”œβ”€β”€ private_mode.py # Privacy mode controls
311
+ β”‚ β”œβ”€β”€ integrity.py # Checksum verification
312
+ β”‚ β”œβ”€β”€ audit.py # Append-only audit log
313
+ β”‚ β”œβ”€β”€ access.py # Token-based access control
314
+ β”‚ └── rbac.py # Per-observation RBAC (5 levels)
315
+ β”œβ”€β”€ onboarding/ # Onboarding & knowledge transfer
316
+ β”‚ β”œβ”€β”€ packs.py # Role-based onboarding packs
317
+ β”‚ └── succession.py # Departing member knowledge capture
318
+ └── coaching/ # Coaching amplification
319
+ └── amplifier.py # Scale top performer patterns
320
+ ```
321
+
322
+ ---
323
+
324
+ ## πŸ”§ Requirements
325
+
326
+ | Requirement | Why |
327
+ |-------------|-----|
328
+ | **Python 3.11+** | Type hint syntax, stdlib improvements |
329
+ | **Claude Desktop / Code / Cursor** | Any MCP-compatible client |
330
+ | **LLM API key (optional)** | Anthropic, DeepSeek, or Gemini for smart extraction. Free keyword extraction by default. |
331
+ | **Optional SDKs** | `pip install openai` (DeepSeek), `pip install anthropic` (Claude), `pip install google-generativeai` (Gemini) |
332
+
333
+ ## πŸ”§ Troubleshooting
334
+
335
+ ```bash
336
+ loom doctor
337
+ ```
338
+
339
+ Checks Python version, Loom installation, storage, domain configs, LLM provider, SDK availability, and MCP protocol. Prints the fix for any failure.
340
+
341
+ ---
342
+
343
+ <p align="center">
344
+ <sub>Built with ❀️ for organizations that want their AI agents to get smarter with every interaction β€” and never forget.</sub>
345
+ </p>
@@ -0,0 +1,15 @@
1
+ """Loom β€” The memory layer for AI agents.
2
+
3
+ Glen-level features:
4
+ - Auto-capture (passive observation)
5
+ - Auto-recall (pre-loaded context every session)
6
+ - Org-wide shared memory (one repository for the whole org)
7
+ - Per-observation RBAC (agents see only what their user is cleared to see)
8
+ - Tiered retention (permanent org knowledge + decaying conventions)
9
+ - Auditable timeline (one queryable history of the organization)
10
+ - Instant onboarding (new hire's agent already knows the org)
11
+ - Succession capture (knowledge survives turnover)
12
+ - Coaching amplification (top performer patterns scale across the team)
13
+ """
14
+
15
+ __version__ = "0.3.0"
@@ -0,0 +1 @@
1
+ """Loom CLI β€” setup, doctor, and admin commands."""