ltcai 0.3.1 → 0.4.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
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
  <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/logo.svg" alt="Lattice AI" width="280"/>
3
3
  <br/>
4
- <strong>Private local AI workspace that turns your files, chats, and folders into a searchable knowledge graph.</strong>
4
+ <strong>Local-first AI workspace for your files, chats, folders, and knowledge graph.</strong>
5
5
  <br/><br/>
6
6
 
7
7
  [![PyPI](https://img.shields.io/pypi/v/ltcai?label=PyPI&color=blue)](https://pypi.org/project/ltcai/)
@@ -13,59 +13,93 @@
13
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-green)](./LICENSE)
14
14
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue)](https://www.python.org/)
15
15
 
16
- <br/>
17
-
18
- <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/lattice-ai-demo.gif" alt="Lattice AI demo showing chat, knowledge graph, and admin dashboard" width="100%"/>
16
+ <br/>
19
17
 
18
+ <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/lattice-ai-demo.gif" alt="Lattice AI demo showing chat, knowledge graph, and admin dashboard" width="100%"/>
20
19
  </div>
21
20
 
22
21
  ---
23
22
 
24
- ## What's new in 0.3.1
25
-
26
- - **Reliable model selection** — `ModelResolution` unifies recommended card ID,
27
- download ID, load ID, router cache key, and the front-end `current` so
28
- "downloaded but not loaded" / "loaded but UI shows a different model"
29
- classes of bugs are gone.
30
- - **Smoke test on load** — every local model load runs a one-shot Korean
31
- chat probe and surfaces `ready_to_chat` / `compatibility_status` to the UI.
32
- - **Model Compatibility Layer** — per-family profiles (GPT-OSS, Gemma, Qwen,
33
- Llama, Mistral, Phi, Deepseek …) with cached stop tokens, postprocess
34
- rules, and Fast / Slow / Recovery paths so chat speed stays the same.
35
- - **Auto graph curator** — topic extraction → alias clustering → promotion
36
- with secret/PII firewall, so the graph builds itself without the user
37
- managing nodes.
38
- - **AI Security & Audit Command Center** — admin dashboard now shows
39
- per-user risk matrix (compliant chats vs risky chats vs compliant files
40
- vs risky files), sensitive-type donut, drill-down, raw explorer, and
41
- JSON / CSV / XLSX / PDF exports — with hard-secret redaction
42
- enforced on every response.
43
-
44
- See [docs/CHANGELOG.md](./docs/CHANGELOG.md) for the full list.
23
+ ## What is Lattice AI?
45
24
 
46
- ---
25
+ Most AI tools answer one chat at a time. They do not remember your folders, your project history, your previous decisions, or how your files relate to each other.
47
26
 
48
- ## Why Lattice AI?
27
+ **Lattice AI turns your local workspace into an AI memory layer.**
49
28
 
50
- Most AI tools forget everything after each conversation. Your files sit in folders, your chats vanish, and nothing connects.
29
+ It reads approved local folders, indexes chats and documents, builds a searchable knowledge graph, and lets you ask questions over that graph with local or opt-in cloud models.
51
30
 
52
- **Lattice AI remembers.** It reads your local files, indexes your conversations, and builds a knowledge graph that links people, projects, concepts, and documents — all on your machine, with zero data leaving your PC.
31
+ ```text
32
+ Local files + chats + folders
33
+
34
+ Automatic knowledge graph
35
+
36
+ Graph-aware AI chat, search, document generation, and admin audit
37
+ ```
38
+
39
+ ### Built for people who want
53
40
 
54
- - **Your data stays local** everything lives in `~/.ltcai/`, never sent to external servers
55
- - **Your AI gets smarter over time** every chat and file builds your personal knowledge graph
56
- - **One install, works everywhere** web UI, VS Code, Telegram, MCP clients, all connected to the same brain
41
+ - a private AI workspace that runs from their own machine
42
+ - local model setup without hunting through many tools
43
+ - folder indexing that becomes useful AI memory
44
+ - a visual knowledge graph instead of disconnected files and chats
45
+ - optional team/admin controls for audit, permissions, and sensitive-data monitoring
57
46
 
58
47
  ---
59
48
 
60
- ## 3-Minute Workflow
49
+ ## Quick Start
50
+
51
+ ### Python / PyPI
61
52
 
53
+ ```bash
54
+ pip install ltcai
55
+ LTCAI
56
+ # open http://localhost:4825
62
57
  ```
63
- 1. Install pip install ltcai && LTCAI
64
- 2. Detect hardware Auto-detect CPU, GPU, RAM → recommend the best local model
65
- 3. Connect folders Select local folders to index into your knowledge graph
66
- 4. Build knowledge Files and chats auto-analyzed → nodes (people, concepts, files) + edges (mentions, contains, depends on)
67
- 5. Ask anything "What did I discuss about the auth migration last week?" → Graph RAG retrieves context
68
- 6. Work from anywhere Web UI · VS Code · Telegram · MCP — all connected to the same knowledge
58
+
59
+ ### Apple Silicon local models
60
+
61
+ ```bash
62
+ pip install "ltcai[local]"
63
+ LTCAI
64
+ ```
65
+
66
+ ### Node / npm
67
+
68
+ ```bash
69
+ npm install -g ltcai
70
+ LTCAI
71
+ ```
72
+
73
+ ### VS Code / Cursor
74
+
75
+ 1. Install **Lattice AI** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=parktaesoo.ltcai) or [Open VSX](https://open-vsx.org/extension/parktaesoo/ltcai)
76
+ 2. Start the local server with `LTCAI`
77
+ 3. Press `Cmd+Shift+A` to open the chat panel
78
+
79
+ **First run:** create an account → the first account becomes admin → choose a model → connect folders → start asking questions.
80
+
81
+ ---
82
+
83
+ ## The 3-minute workflow
84
+
85
+ ```text
86
+ 1. Install
87
+ pip install ltcai && LTCAI
88
+
89
+ 2. Detect hardware
90
+ CPU, GPU, RAM are detected and a suitable local model is recommended.
91
+
92
+ 3. Connect folders
93
+ Pick the local folders you want Lattice AI to index.
94
+
95
+ 4. Build knowledge
96
+ Files and chats become nodes and edges in a local knowledge graph.
97
+
98
+ 5. Ask questions
99
+ “What did I decide about the auth migration last week?”
100
+
101
+ 6. Keep working
102
+ Use the same local knowledge from the web UI, VS Code, Telegram, or MCP clients.
69
103
  ```
70
104
 
71
105
  ---
@@ -77,175 +111,215 @@ Most AI tools forget everything after each conversation. Your files sit in folde
77
111
  <td align="center" width="33%">
78
112
  <b>Workspace Chat</b><br/>
79
113
  <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/screenshot-chat.png" alt="Lattice AI workspace chat" width="100%"/>
80
- <sub>Chat with local/cloud LLM, upload files, pipeline controls</sub>
114
+ <sub>Chat with local/cloud models, upload files, and control pipelines.</sub>
81
115
  </td>
82
116
  <td align="center" width="33%">
83
117
  <b>Knowledge Graph</b><br/>
84
118
  <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/screenshot-graph.png" alt="Lattice AI knowledge graph" width="100%"/>
85
- <sub>Auto-built from chats and documents — nodes = nouns, edges = verbs</sub>
119
+ <sub>Automatically built from chats, files, folders, and project context.</sub>
86
120
  </td>
87
121
  <td align="center" width="33%">
88
122
  <b>Admin Dashboard</b><br/>
89
123
  <img src="https://raw.githubusercontent.com/TaeSooPark-PTS/LatticeAI/main/docs/images/screenshot-admin.png" alt="Lattice AI admin dashboard" width="100%"/>
90
- <sub>User management, audit log, security monitoring</sub>
124
+ <sub>User management, audit logs, permissions, and security monitoring.</sub>
91
125
  </td>
92
126
  </tr>
93
127
  </table>
94
128
 
95
129
  ---
96
130
 
97
- ## Quick Start
131
+ ## Why it is different
98
132
 
99
- **Python / PyPI**
133
+ | Problem | Lattice AI approach |
134
+ |---|---|
135
+ | AI forgets every conversation | Chats and files are indexed into persistent local memory |
136
+ | Files are scattered across folders | Approved folders become searchable graph context |
137
+ | Local model setup is confusing | Hardware detection recommends and loads a suitable model |
138
+ | Graph tools require manual node editing | Nodes and edges are created automatically from real work |
139
+ | Cloud AI may expose private data | Local models keep data on your machine; cloud is opt-in |
140
+ | Teams need visibility | Admin dashboard, audit logs, role controls, and sensitive-data monitoring |
100
141
 
101
- ```bash
102
- pip install ltcai
103
- pip install "ltcai[local]" # + Apple Silicon MLX models
104
- LTCAI
105
- # → http://localhost:4825
106
- ```
142
+ ---
107
143
 
108
- **Node / npm**
144
+ ## Core Features
109
145
 
110
- ```bash
111
- npm install -g ltcai
112
- LTCAI
113
- ```
146
+ ### Local-first AI workspace
114
147
 
115
- **VS Code / Cursor**
148
+ - Web UI running from a local server
149
+ - Local SQLite storage under `~/.ltcai/`
150
+ - Local folder indexing with explicit approval
151
+ - File upload, chat history, graph search, and document generation
152
+ - Optional cloud providers when you choose to use them
116
153
 
117
- 1. Install **Lattice AI** from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=parktaesoo.ltcai) or [Open VSX](https://open-vsx.org/extension/parktaesoo/ltcai)
118
- 2. Start the local server: `LTCAI`
119
- 3. `Cmd+Shift+A` to open the chat panel
154
+ ### Automatic knowledge graph
120
155
 
121
- **First run:** open `http://localhost:4825` sign up → first account auto-becomes admin → pick a model → start chatting.
156
+ Lattice AI turns your work into structure automatically.
122
157
 
123
- ---
158
+ **Nodes** can represent:
124
159
 
125
- ## How the Knowledge Graph Works
160
+ | Node type | Examples |
161
+ |---|---|
162
+ | Document | PDF, DOCX, PPTX, XLSX, Markdown, code files |
163
+ | Concept | technologies, project names, ideas, architecture topics |
164
+ | Person | you, teammates, mentioned people |
165
+ | Chat | previous conversations and sessions |
166
+ | Task | TODOs, action items, follow-ups |
167
+ | Decision | choices made during discussions |
126
168
 
127
- Lattice AI automatically analyzes your chats and files, extracting meaningful structure:
169
+ **Edges** describe relationships such as:
128
170
 
129
- **Nodes (nouns)** the things in your world:
130
- | Type | Examples |
131
- |------|----------|
132
- | Document | PDF, PPTX, DOCX, code files, images |
133
- | Person | You, mentioned colleagues |
134
- | Concept | Technologies, frameworks, ideas |
135
- | Chat | Conversation sessions |
136
- | Task | Action items, TODOs |
137
- | Decision | Choices made in discussions |
171
+ `mentions` · `contains` · `depends on` · `explains` · `uses` · `replaces` · `supports` · `related to`
138
172
 
139
- **Edges (verbs)** how things relate:
140
- `mentions` · `contains` · `resolves` · `depends on` · `explains` · `uses` · `replaces` · `supports` · `related to`
173
+ The graph is curated automatically: noisy tokens, file extensions, generic words, and hard secrets are filtered before promotion.
141
174
 
142
- **Local folder indexing:**
143
- 1. Browse your drives and folders from the UI
144
- 2. Preview file counts, types, and sizes before indexing
145
- 3. Approve which folders to connect (sensitive files auto-excluded)
146
- 4. Files are parsed, chunked, and linked into the graph
147
- 5. Optional: enable file watcher for real-time updates
175
+ ### Model loading that users can trust
148
176
 
149
- All data stays in a local SQLite database. Nothing leaves your machine.
177
+ Lattice AI keeps model identity consistent across recommendation, download, load, backend router state, and frontend display.
150
178
 
151
- ---
179
+ - unified model resolution
180
+ - local model smoke test after load
181
+ - `ok` / `degraded` / `failed` compatibility status
182
+ - per-family compatibility profiles for GPT-OSS, Gemma, Qwen, Llama, Mistral, Phi, Deepseek, and more
183
+ - fast post-processing path during normal chat
184
+ - recovery path only when output looks broken
152
185
 
153
- ## Comparison
186
+ ### Admin and security command center
154
187
 
155
- Based on public product behavior as of 2026-05.
188
+ For team or organization usage, Lattice AI includes admin-facing controls:
156
189
 
157
- | | Lattice AI | Open WebUI | Continue.dev | GitHub Copilot |
158
- |---|:---:|:---:|:---:|:---:|
159
- | Local model (offline, Apple Silicon) | **Yes** | Yes | Yes | No |
160
- | Cloud models (OpenAI, Groq...) | **Yes** | Yes | Yes | Yes |
161
- | Knowledge graph (auto from files + chats) | **Yes** | No | No | No |
162
- | Local folder indexing + file watcher | **Yes** | No | No | No |
163
- | VS Code extension | **Yes** | No | Yes | Yes |
164
- | Telegram bot | **Yes** | No | No | No |
165
- | MCP registry (one-click install) | **Yes** | Partial | Yes | No |
166
- | Admin + audit log | **Yes** | Yes | No | No |
167
- | Zero telemetry, self-hosted | **Yes** | Yes | Yes | No |
168
- | One-command public tunnel | **Yes** | No | No | No |
169
- | Free | **Yes** | Yes | Yes | No |
190
+ - user management and roles
191
+ - permission approvals for local file access
192
+ - audit event timeline
193
+ - sensitive chat/file detection
194
+ - risk overview by user
195
+ - raw data explorer with hard-secret redaction
196
+ - export to JSON, CSV, XLSX, TXT, or PDF
197
+
198
+ Hard secrets such as API keys, tokens, passwords, private keys, and common cloud credentials are redacted from security responses.
170
199
 
171
200
  ---
172
201
 
173
202
  ## Supported Models
174
203
 
175
- **Local (Apple Silicon MLX):**
204
+ ### Local on Apple Silicon MLX
176
205
 
177
- | Model | Best for | Size | Min RAM |
178
- |-------|----------|------|---------|
206
+ | Model | Best for | Approx. size | Suggested RAM |
207
+ |---|---|---:|---:|
179
208
  | Qwen3-VL 4B | Multimodal / low spec | ~2.7 GB | 8 GB |
180
209
  | Qwen3-VL 8B | Multimodal / balanced | ~4.8 GB | 16 GB |
181
210
  | GPT-OSS 20B | Reasoning / open-weight | ~12.1 GB | 32 GB |
182
211
  | Gemma 4 26B | Multimodal / large | ~15.6 GB | 32 GB |
183
212
  | Gemma 4 31B | Multimodal / latest Gemma 4 | ~18.4 GB | 48 GB |
184
- | Qwen3-VL 30B A3B | Multimodal / top | ~18 GB | 48 GB |
185
- | GPT-OSS 120B | Reasoning / top open-weight | ~62.3 GB | 128 GB |
186
- | Phi 4 Mini | Coding (fast) | ~2.2 GB | 8 GB |
187
- | Llama 3.1 8B | General | ~4.7 GB | 8 GB |
213
+ | Qwen3-VL 30B A3B | Multimodal / top local | ~18 GB | 48 GB |
214
+ | GPT-OSS 120B | Large reasoning model | ~62.3 GB | 128 GB |
215
+ | Phi 4 Mini | Fast coding/general chat | ~2.2 GB | 8 GB |
216
+ | Llama 3.1 8B | General chat | ~4.7 GB | 8 GB |
188
217
  | Mistral 7B v0.3 | General / Apache | ~4.1 GB | 8 GB |
189
218
 
190
- **Cross-platform (Ollama / LM Studio / vLLM / llama.cpp):**
191
- Same models via Ollama pull, LM Studio download, vLLM serve, or llama.cpp GGUF where available.
219
+ ### Cross-platform engines
220
+
221
+ Lattice AI can also work with models served by:
222
+
223
+ - Ollama
224
+ - LM Studio
225
+ - llama.cpp
226
+ - vLLM
227
+ - OpenAI-compatible local or remote endpoints
192
228
 
193
- **Cloud (any platform):**
194
- OpenAI GPT-5.5 · Claude Opus 4.7 / Sonnet 4.6 / Haiku 4.5 via OpenRouter · Groq · Together · xAI · any OpenAI-compatible endpoint
229
+ ### Cloud providers
195
230
 
196
- The setup wizard auto-detects your hardware and recommends the best model for your specs.
231
+ Cloud models are optional. When enabled, prompts are sent to the selected provider.
232
+
233
+ Supported routes include OpenAI-compatible APIs, OpenRouter, Groq, Together, xAI, and other compatible endpoints.
197
234
 
198
235
  ---
199
236
 
200
- ## Data Privacy
237
+ ## Privacy and data storage
201
238
 
202
- | | |
239
+ | Area | Default behavior |
203
240
  |---|---|
204
- | **Storage** | All data in `~/.ltcai/` on your machine |
205
- | **Telemetry** | None no analytics, no tracking, no phoning home |
206
- | **File access** | Approval-token gated explicit consent per folder |
207
- | **Cloud models** | When using cloud APIs, prompts are sent to the provider. Local models keep everything offline. |
208
- | **Sensitive files** | `.env`, credentials, keys, certificates auto-excluded from indexing |
209
- | **Delete** | Clear chat history, delete graph nodes, remove indexed folders at any time |
241
+ | Storage | Data is stored locally under `~/.ltcai/` |
242
+ | Default binding | `127.0.0.1:4825` local server |
243
+ | Telemetry | No built-in product telemetry by default |
244
+ | Folder access | Explicit approval per folder/action scope |
245
+ | Sensitive files | `.env`, credentials, keys, certificates, and similar files are auto-excluded |
246
+ | Cloud models | Off unless configured; cloud prompts go to the selected provider |
247
+ | Delete controls | Remove chats, graph nodes, indexed folders, and local data |
248
+
249
+ ---
250
+
251
+ ## Comparison
252
+
253
+ | Capability | Lattice AI | Open WebUI | Continue.dev | GitHub Copilot |
254
+ |---|:---:|:---:|:---:|:---:|
255
+ | Local model workflow | Yes | Yes | Yes | No |
256
+ | Local folder indexing | Yes | Limited | Workspace-focused | Limited |
257
+ | Automatic knowledge graph | Yes | No | No | No |
258
+ | Chat + file memory | Yes | Partial | Partial | Partial |
259
+ | VS Code / Cursor extension | Yes | No | Yes | Yes |
260
+ | Admin dashboard | Yes | Yes | No | No |
261
+ | Security audit exports | Yes | Limited | No | No |
262
+ | Optional cloud models | Yes | Yes | Yes | Yes |
263
+ | Local-first by default | Yes | Self-hosted | Local/dev focused | No |
264
+
265
+ ---
266
+
267
+ ## Current release
268
+
269
+ **0.4.0** completes the Knowledge Graph v2 read/write cutover:
270
+
271
+ - graph reads and writes flow through the v2 store, behind the unchanged
272
+ `KnowledgeGraphStore` interface
273
+ - legacy ↔ v2 result equivalence guaranteed (single read path + reconstruction
274
+ views), backed by a dedicated equivalence test suite
275
+ - dual-write projection keeps the v2 graph in sync on every write and delete
276
+ - deterministic ordering (`… , id ASC`) so results match across both paths
277
+
278
+ See the full [changelog](docs/CHANGELOG.md).
210
279
 
211
280
  ---
212
281
 
213
282
  <details>
214
283
  <summary><b>All Features</b></summary>
215
284
 
216
- ### Core Experience
285
+ ### Core experience
286
+
217
287
  | Feature | Description |
218
- |---------|-------------|
219
- | **Web UI** | Responsive chat, file upload, model picker, knowledge graph |
220
- | **Auto Setup Wizard** | Detect hardware recommend model install dependencies verify |
221
- | **Graph RAG** | Chats and files auto-indexed into SQLite knowledge graph |
222
- | **Local folder indexing** | Browse, audit, and index local folders with file watcher |
288
+ |---|---|
289
+ | Web UI | Chat, file upload, model picker, graph view, admin pages |
290
+ | Auto setup wizard | Detect hardware, recommend model, install dependencies, verify load |
291
+ | Graph RAG | Retrieve context from indexed chats, files, and graph relationships |
292
+ | Local folder indexing | Browse, audit, approve, index, and optionally watch folders |
293
+ | Document generation | Use graph context to generate reports, summaries, and structured drafts |
294
+
295
+ ### Developer tools
223
296
 
224
- ### Developer Tools
225
297
  | Feature | Description |
226
- |---------|-------------|
227
- | **VS Code / Cursor** | Chat panel, Edit Selection, Explain, Generate command |
228
- | **Multi-step agent** | File edit/create, grep, todo, terminal (25 steps, human-in-the-loop) |
229
- | **Multi-LLM pipeline** | Plan Execute Review with different models |
230
- | **MCP server** | Use Lattice tools in Claude Desktop / Cursor |
231
- | **MCP registry** | One-click install from registry.modelcontextprotocol.io |
232
- | **Skills marketplace** | 77 official skills (Anthropic + verified third-party) |
233
- | **Plugin directory** | Browse 149 open-source plugins |
234
-
235
- ### Access & Communication
298
+ |---|---|
299
+ | VS Code / Cursor | Chat panel, edit selection, explain code, generate code |
300
+ | Multi-step agent | File edit/create, grep, todo, and terminal workflow with human-in-the-loop |
301
+ | Multi-LLM pipeline | Plan, execute, and review with different models |
302
+ | MCP server | Expose Lattice tools to MCP-compatible clients |
303
+ | MCP registry | Install MCP servers from supported registries |
304
+ | Skills browser | Browse and install optional skills |
305
+ | Plugin browser | Browse compatible open-source plugins |
306
+
307
+ ### Access and communication
308
+
236
309
  | Feature | Description |
237
- |---------|-------------|
238
- | **Telegram bot** | Chat, upload files, manage models from anywhere |
239
- | **PWA** | Install on iPad / Android home screen |
240
- | **Public tunnel** | `LTCAI --tunnel` Cloudflare HTTPS, no account needed |
310
+ |---|---|
311
+ | Telegram bot | Chat, upload files, and manage models remotely |
312
+ | PWA | Install the web UI on mobile/tablet home screens |
313
+ | Public tunnel | `LTCAI --tunnel` for a temporary Cloudflare HTTPS URL |
241
314
 
242
315
  ### Administration
316
+
243
317
  | Feature | Description |
244
- |---------|-------------|
245
- | **User management** | Roles, permissions, disable/enable accounts |
246
- | **SSO** | Entra ID / Okta OIDC |
247
- | **Audit dashboard** | Per-user AI usage, sensitive data detection, event log, TXT/CSV/Excel export |
248
- | **Security monitoring** | Rate limits, file access approvals, MCP install audit trail |
318
+ |---|---|
319
+ | User management | Roles, permissions, account enable/disable |
320
+ | SSO | Entra ID / Okta OIDC configuration |
321
+ | Audit dashboard | AI usage, sensitive-data events, file access, exports |
322
+ | Security monitoring | Rate limits, approval logs, raw explorer, redaction |
249
323
 
250
324
  </details>
251
325
 
@@ -253,18 +327,18 @@ The setup wizard auto-detects your hardware and recommends the best model for yo
253
327
  <summary><b>Security</b></summary>
254
328
 
255
329
  | Property | Detail |
256
- |----------|--------|
257
- | Binding | Default `127.0.0.1:4825` local only |
330
+ |---|---|
331
+ | Binding | Default `127.0.0.1:4825` local only |
258
332
  | Auth | Session required when network-exposed or public mode |
259
- | Cookies | `HttpOnly + SameSite=Lax` no localStorage token |
260
- | Local file access | Approval-token gated (path + user + action scope) |
261
- | Package install | Admin-only with audit trail (MCP, skills, pip, npm) |
262
- | CORS | Localhost only by default; configure via `LATTICEAI_CORS_ALLOWED_ORIGINS` |
263
- | File upload | Magic-number signature check (blocks extension spoofing) |
333
+ | Cookies | `HttpOnly + SameSite=Lax`; no localStorage token |
334
+ | Local file access | Approval-token gated by path, user, and action scope |
335
+ | Package install | Admin-only with audit trail for MCP, skills, pip, npm |
336
+ | CORS | Localhost only by default; configurable via `LATTICEAI_CORS_ALLOWED_ORIGINS` |
337
+ | File upload | Magic-number signature checks for extension spoofing defense |
264
338
  | Rate limits | `/chat` 30/min · `/agent` 6/min · `/upload` 12/min per user |
265
- | Telemetry | None all data in `~/.ltcai/` |
339
+ | Telemetry | No built-in product telemetry by default |
266
340
 
267
- Report vulnerabilities: [SECURITY.md](SECURITY.md)
341
+ Report vulnerabilities in [SECURITY.md](SECURITY.md).
268
342
 
269
343
  </details>
270
344
 
@@ -274,10 +348,10 @@ Report vulnerabilities: [SECURITY.md](SECURITY.md)
274
348
  ### VS Code shortcuts
275
349
 
276
350
  | Shortcut | Action |
277
- |----------|--------|
351
+ |---|---|
278
352
  | `Cmd+Shift+A` | Open chat |
279
353
  | `Cmd+Shift+E` | Edit selected code |
280
- | `Cmd+Shift+M` | Load / switch model |
354
+ | `Cmd+Shift+M` | Load or switch model |
281
355
  | Right-click | Explain / Save to Knowledge Garden |
282
356
 
283
357
  ### Telegram bot
@@ -286,7 +360,7 @@ Report vulnerabilities: [SECURITY.md](SECURITY.md)
286
360
  LATTICEAI_TELEGRAM_BOT_TOKEN=your-token LTCAI
287
361
  ```
288
362
 
289
- ### Public server (Docker / Render / Fly.io)
363
+ ### Public server
290
364
 
291
365
  ```bash
292
366
  LATTICEAI_MODE=public \
@@ -296,14 +370,14 @@ LATTICEAI_INVITE_CODE=my-secret \
296
370
  LTCAI
297
371
  ```
298
372
 
299
- ### Public tunnel (Cloudflare, no account)
373
+ ### Public tunnel
300
374
 
301
375
  ```bash
302
376
  LTCAI --tunnel
303
377
  # → https://xxxx.trycloudflare.com
304
378
  ```
305
379
 
306
- ### Auto-start (Mac)
380
+ ### Auto-start on macOS
307
381
 
308
382
  ```bash
309
383
  cat > ~/Library/LaunchAgents/com.ltcai.plist << 'EOF'
@@ -329,21 +403,21 @@ launchctl load ~/Library/LaunchAgents/com.ltcai.plist
329
403
  <summary><b>API Reference</b></summary>
330
404
 
331
405
  | Method | Path | Description |
332
- |--------|------|-------------|
333
- | GET | `/health` | Server status & current model |
334
- | GET | `/models` | Model list + load state |
406
+ |---|---|---|
407
+ | GET | `/health` | Server status and current model |
408
+ | GET | `/models` | Model list and load state |
335
409
  | POST | `/models/load` | Load a model |
336
- | POST | `/chat` | Chat (`stream=true/false`) |
410
+ | POST | `/chat` | Chat with streaming or non-streaming output |
337
411
  | POST | `/agent` | Multi-step file agent |
338
412
  | GET | `/knowledge-graph/stats` | Graph statistics |
339
413
  | GET | `/knowledge-graph/search?q=` | Search the knowledge graph |
340
- | GET | `/knowledge-graph/local/roots` | Discover local drives & folders |
414
+ | GET | `/knowledge-graph/local/roots` | Discover local drives and folders |
341
415
  | POST | `/knowledge-graph/local/audit` | Audit a folder before indexing |
342
416
  | POST | `/knowledge-graph/local/index` | Index a folder into Graph RAG |
343
417
  | GET | `/mcp/installed` | Installed MCP servers |
344
- | POST | `/mcp/install` | Install MCP server (admin) |
418
+ | POST | `/mcp/install` | Install MCP server as admin |
345
419
  | GET | `/skills/marketplace` | Skills marketplace |
346
- | POST | `/skills/install` | Install a skill (admin) |
420
+ | POST | `/skills/install` | Install a skill as admin |
347
421
  | GET | `/admin/audit` | Audit report |
348
422
  | GET | `/permissions/pending` | Pending file-access approvals |
349
423
 
@@ -355,12 +429,13 @@ Full reference: [docs/mcp-tools.md](docs/mcp-tools.md)
355
429
  <summary><b>Troubleshooting</b></summary>
356
430
 
357
431
  | Symptom | Fix |
358
- |---------|-----|
359
- | Port 4825 in use | `lsof -i :4825` `kill <PID>` or `LTCAI --port 4826` |
360
- | `ModuleNotFoundError: mlx` | `pip install "ltcai[local]"` (Apple Silicon only) |
361
- | Python < 3.11 | Upgrade Python: `python3 --version` |
362
- | No API key warning | `OPENAI_API_KEY=sk-... LTCAI` or set in admin panel |
363
- | Can't reach from iPad | `LATTICEAI_HOST=0.0.0.0 LTCAI` or use `--tunnel` |
432
+ |---|---|
433
+ | Port 4825 is already in use | `lsof -i :4825` then `kill <PID>`, or run `LTCAI --port 4826` |
434
+ | `ModuleNotFoundError: mlx` | Install local extras with `pip install "ltcai[local]"` on Apple Silicon |
435
+ | Python version is too old | Use Python 3.11 or newer |
436
+ | No API key warning | Set a provider key or use a local model |
437
+ | Cannot reach from iPad | Use `LATTICEAI_HOST=0.0.0.0 LTCAI` or `LTCAI --tunnel` |
438
+ | Model loads but chat looks broken | Check compatibility status; try another engine or model family |
364
439
 
365
440
  </details>
366
441
 
@@ -369,31 +444,29 @@ Full reference: [docs/mcp-tools.md](docs/mcp-tools.md)
369
444
  ## Platform Support
370
445
 
371
446
  | Feature | macOS Apple Silicon | macOS Intel / Windows / Linux |
372
- |---------|:---:|:---:|
447
+ |---|:---:|:---:|
373
448
  | Web UI + cloud models | Yes | Yes |
374
449
  | VS Code / Cursor extension | Yes | Yes |
375
450
  | Telegram bot | Yes | Yes |
376
- | MLX local models | Yes | -- |
377
- | Ollama / LM Studio / vLLM | Yes | Yes |
451
+ | MLX local models | Yes | No |
452
+ | Ollama / LM Studio / vLLM / llama.cpp | Yes | Yes |
378
453
 
379
454
  ---
380
455
 
381
456
  ## Distribution
382
457
 
383
458
  | Channel | Link |
384
- |---------|------|
459
+ |---|---|
385
460
  | PyPI | [pypi.org/project/ltcai](https://pypi.org/project/ltcai/) |
386
461
  | npm | [npmjs.com/package/ltcai](https://www.npmjs.com/package/ltcai) |
387
462
  | VS Code Marketplace | [marketplace.visualstudio.com](https://marketplace.visualstudio.com/items?itemName=parktaesoo.ltcai) |
388
463
  | Open VSX | [open-vsx.org](https://open-vsx.org/extension/parktaesoo/ltcai) |
389
464
 
390
- Current version: **0.2.2** — [Changelog](docs/CHANGELOG.md)
391
-
392
465
  ---
393
466
 
394
467
  ## Contributing
395
468
 
396
- See [CONTRIBUTING.md](CONTRIBUTING.md). All PRs welcome.
469
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Issues and pull requests are welcome.
397
470
 
398
471
  ## License
399
472
 
@@ -406,49 +479,53 @@ MIT — [TaeSoo Park](https://github.com/TaeSooPark-PTS)
406
479
 
407
480
  ## Lattice AI
408
481
 
409
- **내 PC의 파일, 대화, 프로젝트를 기억하고 연결하는 로컬 AI 워크스페이스**
410
-
411
- 대부분의 AI 도구는 대화가 끝나면 모든 것을 잊습니다. Lattice AI는 다릅니다. 로컬 파일을 읽고, 대화를 기록하고, 사람·프로젝트·개념·문서를 연결하는 지식 그래프를 자동으로 만듭니다. 모든 데이터는 내 PC에만 저장됩니다.
482
+ **내 PC의 파일, 대화, 폴더를 기억하고 연결하는 로컬 우선 AI 워크스페이스**
412
483
 
413
- ### 3분 사용 흐름
484
+ 대부분의 AI 도구는 대화가 끝나면 맥락을 잊습니다. Lattice AI는 승인한 로컬 폴더와 대화를 인덱싱하고, 사람·프로젝트·개념·문서를 자동으로 지식 그래프로 연결합니다.
414
485
 
415
- ```
416
- 1. 설치 pip install ltcai && LTCAI
417
- 2. 하드웨어 감지 CPU, GPU, RAM 자동 감지 → 최적 로컬 모델 추천
418
- 3. 폴더 연결 로컬 폴더를 선택하여 지식 그래프에 연결
419
- 4. 지식 구축 파일과 대화 자동 분석 → 점(사람, 개념, 파일) + 선(언급함, 포함함, 의존함)
420
- 5. 질문 "지난주 인증 마이그레이션 논의 내용은?" Graph RAG가 컨텍스트 검색
421
- 6. 어디서든 작업 웹 UI · VS Code · Telegram · MCP — 같은 지식에 연결
486
+ ```text
487
+ 로컬 파일 + 대화 + 폴더
488
+
489
+ 자동 지식 그래프
490
+
491
+ 그래프 기반 AI 검색, 채팅, 문서 생성, 관리자 감사
422
492
  ```
423
493
 
424
494
  ### 설치
425
495
 
426
496
  ```bash
427
- pip install ltcai # 클라우드 모델
428
- pip install "ltcai[local]" # + Apple Silicon MLX 로컬 모델
429
- LTCAI # 서버 실행 → http://localhost:4825
430
- LTCAI --tunnel # + Cloudflare 공개 URL 자동 발급
497
+ pip install ltcai
498
+ LTCAI
499
+ # http://localhost:4825
431
500
  ```
432
501
 
433
- ### 핵심 차별점
502
+ Apple Silicon에서 로컬 모델까지 쓰려면:
434
503
 
435
- - **내 데이터가 AI의 기억이 된다** — 채팅과 파일이 자동으로 지식 그래프로 구조화
436
- - **로컬 폴더를 연결하면 프로젝트 전체를 이해** — 파일 변경 시 실시간 업데이트
437
- - **모든 데이터는 내 PC에** — `~/.ltcai/`에 저장, 텔레메트리 없음, 외부 전송 없음
438
- - **설치 한 번으로 어디서든** — 웹 · VS Code · Telegram · MCP 클라이언트
504
+ ```bash
505
+ pip install "ltcai[local]"
506
+ LTCAI
507
+ ```
508
+
509
+ ### 사용 흐름
439
510
 
440
- ### 추천 로컬 모델 (M-series Mac)
511
+ ```text
512
+ 1. 설치한다.
513
+ 2. CPU, GPU, RAM을 감지해서 적합한 로컬 모델을 추천받는다.
514
+ 3. 연결할 로컬 폴더를 선택한다.
515
+ 4. 파일과 대화가 자동으로 지식 그래프가 된다.
516
+ 5. “지난주 인증 마이그레이션에서 결정한 게 뭐였지?”처럼 질문한다.
517
+ 6. 같은 지식을 웹 UI, VS Code, Telegram, MCP에서 사용한다.
518
+ ```
519
+
520
+ ### 핵심 차별점
441
521
 
442
- | 모델 | 용도 | 크기 | 최소 RAM |
443
- |------|------|------|----------|
444
- | Qwen3-VL 4B | 멀티모달 / 저사양 | ~2.7GB | 8GB |
445
- | Qwen3-VL 8B | 멀티모달 / 균형 추천 | ~4.8GB | 16GB |
446
- | GPT-OSS 20B | 추론 / 오픈가중치 | ~12.1GB | 32GB |
447
- | Gemma 4 26B | 멀티모달 / 대형 | ~15.6GB | 32GB |
448
- | Gemma 4 31B | 멀티모달 / 최신 Gemma 4 | ~18.4GB | 48GB |
449
- | Qwen3-VL 30B A3B | 멀티모달 / 최고급 | ~18GB | 48GB |
450
- | GPT-OSS 120B | 추론 / 최고급 오픈가중치 | ~62.3GB | 128GB |
522
+ - **내 데이터가 AI의 기억이 됨** 채팅과 파일을 자동으로 구조화
523
+ - **로컬 우선** — 기본 데이터는 `~/.ltcai/`에 저장
524
+ - **자동 그래프** 사용자가 노드와 엣지를 직접 만들 필요 없음
525
+ - **모델 추천/로드 흐름** 하드웨어 감지 적합한 모델 추천
526
+ - **선택형 클라우드** 클라우드 모델은 사용자가 설정한 경우에만 사용
527
+ - **관리자/보안 기능** 권한, 감사 로그, 민감정보 감지, export 지원
451
528
 
452
- 자세한 내용: [docs/CHANGELOG.md](docs/CHANGELOG.md) · [보안](SECURITY.md) · [기여](CONTRIBUTING.md)
529
+ 자세한 내용은 [docs/CHANGELOG.md](docs/CHANGELOG.md), [SECURITY.md](SECURITY.md), [CONTRIBUTING.md](CONTRIBUTING.md)를 참고하세요.
453
530
 
454
531
  </details>