ltcai 9.7.0 → 9.9.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 +114 -320
- package/docs/BENCHMARKS.md +107 -0
- package/docs/CHANGELOG.md +72 -0
- package/docs/CI_AND_RELEASE_GATES.md +106 -0
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +11 -8
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +15 -6
- package/docs/PERFORMANCE.md +9 -1
- package/docs/SECURITY_AUDIT.md +91 -0
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/USABILITY_AUDIT.md +164 -0
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/architecture.md +4 -2
- package/docs/kg-schema.md +1 -1
- package/docs/spec-vs-impl.md +8 -1
- package/lattice_brain/__init__.py +1 -1
- package/lattice_brain/graph/retrieval.py +93 -4
- package/lattice_brain/graph/retrieval_vector.py +43 -0
- package/lattice_brain/ingestion.py +399 -14
- package/lattice_brain/runtime/multi_agent.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/api/brain_intelligence.py +12 -0
- package/latticeai/api/chat.py +17 -0
- package/latticeai/api/chat_helpers.py +48 -0
- package/latticeai/api/chat_stream.py +9 -1
- package/latticeai/api/local_files.py +120 -2
- package/latticeai/api/review_queue.py +7 -0
- package/latticeai/core/agent.py +105 -8
- package/latticeai/core/agent_eval.py +222 -1
- package/latticeai/core/legacy_compatibility.py +1 -1
- package/latticeai/core/marketplace.py +1 -1
- package/latticeai/core/tool_governor.py +92 -1
- package/latticeai/core/workspace_os.py +1 -1
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/automation_intelligence.py +151 -14
- package/latticeai/services/brain_intelligence.py +72 -0
- package/latticeai/services/change_proposals.py +165 -23
- package/latticeai/services/product_readiness.py +1 -1
- package/latticeai/services/tool_dispatch.py +33 -0
- package/package.json +5 -3
- package/scripts/bench_models.py +312 -0
- package/scripts/check_bundle_budget.mjs +103 -0
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/check_doc_status.mjs +149 -0
- package/scripts/generate_sbom.py +70 -0
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +27 -11
- package/static/app/assets/Act-CfOPUKPs.js +2 -0
- package/static/app/assets/Brain-Cgkh0Hpn.js +321 -0
- package/static/app/assets/BrainHome-D8e3wQiW.js +3 -0
- package/static/app/assets/BrainSignals-BjRBA18L.js +1 -0
- package/static/app/assets/Capture-CQQYQ1Ga.js +1 -0
- package/static/app/assets/CommandPalette-pss56Mg4.js +1 -0
- package/static/app/assets/Library-CoI3xYJk.js +1 -0
- package/static/app/assets/LivingBrain-CaU_hCxQ.js +1 -0
- package/static/app/assets/ProductFlow-Db-1O71-.js +1 -0
- package/static/app/assets/System-Dfocn0zN.js +1 -0
- package/static/app/assets/bot-Bp2x1i6F.js +1 -0
- package/static/app/assets/circle-check-CyGal42W.js +1 -0
- package/static/app/assets/cpu-DQFk82hG.js +1 -0
- package/static/app/assets/download-C70gKQVi.js +1 -0
- package/static/app/assets/folder-open-DNGytsVw.js +1 -0
- package/static/app/assets/hard-drive-CYo_bEl4.js +1 -0
- package/static/app/assets/i18n-BBMJshCW.js +7 -0
- package/static/app/assets/index-BjaXCeOZ.js +10 -0
- package/static/app/assets/{index-85wQvEie.css → index-BqRcLZR3.css} +1 -1
- package/static/app/assets/input-ChWD-Fsh.js +1 -0
- package/static/app/assets/navigation-D9D9_FPC.js +1 -0
- package/static/app/assets/network-DzLDGmtV.js +1 -0
- package/static/app/assets/primitives-CmaSAyGG.js +1 -0
- package/static/app/assets/sparkles-DXiaM1NS.js +1 -0
- package/static/app/assets/textarea-CV43-o79.js +1 -0
- package/static/app/index.html +4 -2
- package/static/sw.js +1 -1
- package/static/app/assets/Act-B6c39ays.js +0 -2
- package/static/app/assets/Brain-D7Qg4k6M.js +0 -321
- package/static/app/assets/Capture-VF_di68r.js +0 -1
- package/static/app/assets/Library-D_Gis2PA.js +0 -1
- package/static/app/assets/System-C5s5H2ov.js +0 -1
- package/static/app/assets/index-DJC_2oub.js +0 -18
- package/static/app/assets/primitives-DL4Nip8C.js +0 -1
- package/static/app/assets/textarea-woZfCXHy.js +0 -1
package/README.md
CHANGED
|
@@ -1,62 +1,8 @@
|
|
|
1
1
|
# Lattice AI
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> The 9.6.0 release engineers trust into the agent loop: a structured
|
|
8
|
-
> LoopTrace makes every run observable (llm calls, parse recoveries, format
|
|
9
|
-
> repairs, corrections, tool outcomes — returned as `loop` in the agent API),
|
|
10
|
-
> weak-model tolerance gains python-literal repair and escalating format
|
|
11
|
-
> corrections, a deterministic agent evaluation harness gates CI, and a
|
|
12
|
-
> central change governor stages edits/deletions of existing files as review
|
|
13
|
-
> proposals (`/api/proposals`) applied exactly as reviewed — while new-file
|
|
14
|
-
> creation now runs without approval friction.
|
|
15
|
-
> The 9.5.0 release adds the Command Center: a deterministic, local
|
|
16
|
-
> `/api/command` surface serving a daily briefing (recent knowledge,
|
|
17
|
-
> conversation activity, automation state, pending reviews, health snapshot,
|
|
18
|
-
> top suggestions, state-derived quick actions) and a universal search across
|
|
19
|
-
> knowledge nodes, the user's own conversations, and installed automations —
|
|
20
|
-
> surfaced in the app as a Cmd+K command palette and a Today's Briefing panel.
|
|
21
|
-
> The 9.4.0 release adds question-driven automation: a deterministic local
|
|
22
|
-
> pattern miner clusters your recurring questions (the evidence shown is your
|
|
23
|
-
> own words, no model call), an /api/automation surface turns patterns and
|
|
24
|
-
> connected folders into one-click suggestions, and every accepted suggestion
|
|
25
|
-
> becomes a disabled, review-gated draft workflow you enable deliberately.
|
|
26
|
-
> The 9.3.0 release wired the previously dormant Brain quality layer into
|
|
27
|
-
> the product: /api/brain health diagnosis with recommended care actions, a
|
|
28
|
-
> proactive insights digest, contradiction surfacing across memories and the
|
|
29
|
-
> graph, dry-run-first duplicate consolidation, and hybrid recall that blends
|
|
30
|
-
> vector similarity with lexical evidence behind an honest quality gate.
|
|
31
|
-
> The 9.2.0 release hardened file creation end to end: chat file requests are
|
|
32
|
-
> routed to a deterministic direct-write path (including type-only requests
|
|
33
|
-
> like "html 파일 만들어줘"), model replies are treated as untrusted content
|
|
34
|
-
> and cleaned of fences, reasoning blocks, and chat framing, and the agent
|
|
35
|
-
> JSON loop tolerates small-model formatting slips instead of aborting.
|
|
36
|
-
> The 9.1.0 release added request-scoped model routing,
|
|
37
|
-
> workspace-isolated graph identities and frontend caches, fail-closed admin
|
|
38
|
-
> gates, SSRF-safe web capture, private local state permissions, and reproducible
|
|
39
|
-
> release/test isolation. The same release introduced a human-first UI:
|
|
40
|
-
> a visible knowledge journey from conversation or source capture into the
|
|
41
|
-
> living Brain, its real relationship graph, and memory-grounded automation;
|
|
42
|
-
> the empty Brain home now keeps that complete loop inside one viewport, with
|
|
43
|
-
> continuous vital motion and behavior-driven listening, recall, synthesis,
|
|
44
|
-
> and action states. Task navigation and technical detail stay calm and
|
|
45
|
-
> approachable.
|
|
46
|
-
> Telegram access requires an explicit chat allowlist and server session token;
|
|
47
|
-
> public invitation access uses signed, expiring authorization instead of a
|
|
48
|
-
> static cookie; and unknown or unreadable Knowledge Graph scope fails closed.
|
|
49
|
-
|
|
50
|
-
Your model is the voice you use today. Your Brain is the asset you keep.
|
|
51
|
-
Lattice AI preserves conversations, documents, decisions, project context,
|
|
52
|
-
relationships, and workflows on your computer by default. Cloud models, model
|
|
53
|
-
downloads, update checks, and other external communication happen only after
|
|
54
|
-
explicit consent.
|
|
55
|
-
|
|
56
|
-
It is not a ChatGPT clone, a model launcher, a graph database, or a note app.
|
|
57
|
-
It is a Living Brain: chatting or adding a file, folder, note, or web page grows
|
|
58
|
-
durable memory; the real graph shows how that knowledge connects; and reviewed,
|
|
59
|
-
user-enabled automations can act from the same evidence.
|
|
3
|
+
**Your model is the voice you use today. Your Brain is the asset you keep.**
|
|
4
|
+
|
|
5
|
+
**모델은 갈아타도, 내 지식은 내 컴퓨터에 남는 로컬 우선 AI 브레인.**
|
|
60
6
|
|
|
61
7
|
[](https://pypi.org/project/ltcai/)
|
|
62
8
|
[](https://www.npmjs.com/package/ltcai)
|
|
@@ -65,305 +11,153 @@ user-enabled automations can act from the same evidence.
|
|
|
65
11
|
[](https://github.com/TaeSooPark-PTS/LatticeAI/actions/workflows/ci.yml)
|
|
66
12
|
[](LICENSE)
|
|
67
13
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
You need Lattice AI when:
|
|
14
|
+

|
|
71
15
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- you want your AI Brain to stay on your computer by default;
|
|
76
|
-
- you want backup, restore, inspect, and export paths for your Brain.
|
|
16
|
+
Chat, files, folders, notes, and web pages all flow into one durable knowledge
|
|
17
|
+
graph on your computer. Any model — local MLX or cloud — can speak with that
|
|
18
|
+
memory. Nothing leaves your machine without explicit consent.
|
|
77
19
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- 매번 AI를 바꿀 때마다 프로젝트 맥락을 다시 설명하는 사람
|
|
81
|
-
- 문서, 대화, 결정, 파일이 여기저기 흩어져 있는 사람
|
|
82
|
-
- 내 지식을 특정 AI 서비스 안에 묶어두고 싶지 않은 사람
|
|
83
|
-
- 로컬에 저장되는 개인 AI 브레인을 원하는 사람
|
|
20
|
+
대화·파일·폴더·웹페이지가 전부 내 컴퓨터 안의 지식 그래프로 쌓이고, 어떤
|
|
21
|
+
모델이든 그 기억을 이어받아 대화합니다.
|
|
84
22
|
|
|
85
23
|
## What You Can Do
|
|
86
24
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
relationship graph before opening the full graph explorer.
|
|
93
|
-
- See the Brain breathe, pulse, listen, recall, synthesize, and act while the
|
|
94
|
-
source, graph, composer, and next memory-grounded action remain visible in a
|
|
95
|
-
single desktop or mobile viewport.
|
|
96
|
-
- Create evidence-linked Brain automation drafts for memory digests, project
|
|
97
|
-
reviews, and follow-up suggestions, then explicitly enable them when ready.
|
|
98
|
-
- Use a recommended local model without learning model internals first.
|
|
99
|
-
- Keep advanced controls, audit logs, roles, and retention in a separate Admin
|
|
100
|
-
surface.
|
|
101
|
-
- Export or back up your Brain as an encrypted `.latticebrain` archive.
|
|
102
|
-
|
|
103
|
-
## One-Minute Flow
|
|
104
|
-
|
|
105
|
-
1. Launch the app and wake the Brain.
|
|
106
|
-
2. Create or open a local profile.
|
|
107
|
-
3. Let Lattice explain what this computer can run.
|
|
108
|
-
4. Start with the recommended model as the Brain's voice, or skip and choose later.
|
|
109
|
-
5. Talk to your Brain or add a file, folder, note, or web page.
|
|
110
|
-
6. Watch the source become memory and connect to the visible knowledge graph.
|
|
111
|
-
7. Ask, delegate, review, or explicitly enable a memory-grounded automation.
|
|
112
|
-
8. Back up, inspect, export, or restore the Brain when you need ownership actions.
|
|
113
|
-
|
|
114
|
-
## Living Brain Flow
|
|
115
|
-
|
|
116
|
-
The screenshots below are the latest checked-in visual evidence captures. They
|
|
117
|
-
keep the first-run Brain flow, memory graph, source capture, model library,
|
|
118
|
-
system view, admin console, and review center visible as release gates while
|
|
119
|
-
9.6.0 makes autonomous work trustworthy: agents create new things freely,
|
|
120
|
-
but every change to existing content becomes a reviewable proposal with a
|
|
121
|
-
diff, and the reasoning loop itself is observable and regression-gated. The
|
|
122
|
-
captures below are the checked-in 9.6.0 visual release evidence for that
|
|
123
|
-
product flow.
|
|
124
|
-
|
|
125
|
-
### 1. Wake Brain
|
|
126
|
-
|
|
127
|
-
The first screen makes the Brain the product. It explains the three-step path:
|
|
128
|
-
confirm owner, check the computer, choose the Brain voice.
|
|
129
|
-
|
|
130
|
-
### 2. Login
|
|
131
|
-
|
|
132
|
-
Choose the owner of the Brain. The profile is not a SaaS account by default; it
|
|
133
|
-
is the local identity for the knowledge you keep.
|
|
134
|
-
|
|
135
|
-

|
|
136
|
-
|
|
137
|
-
### 3. Recommended Models
|
|
138
|
-
|
|
139
|
-
Start with a short list: safest recommendation, faster model, stronger model.
|
|
140
|
-
Advanced details stay available without overwhelming first-time users.
|
|
141
|
-
|
|
142
|
-

|
|
143
|
-
|
|
144
|
-
### 4. Install And Load
|
|
145
|
-
|
|
146
|
-
Download and load only after consent. Lattice explains model size, local
|
|
147
|
-
execution, and network use before work starts.
|
|
148
|
-
|
|
149
|
-

|
|
150
|
-
|
|
151
|
-
### 5. Brain Chat
|
|
25
|
+
| | |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| **Chat with a Brain that remembers** — every conversation grows durable, source-linked memory  | **See how knowledge connects** — a real relationship graph, not a file list  |
|
|
28
|
+
| **Capture anything** — files, whole folders, notes, screenshots, web pages  | **Automate with review** — agent changes become proposals you approve first  |
|
|
29
|
+
| **Pick a model in one click** — recommended local models for your hardware  | **Stay in control** — audit, roles, retention in a separate admin surface  |
|
|
152
30
|
|
|
153
|
-
|
|
154
|
-
fits the complete knowledge lifecycle into one viewport: source controls feed
|
|
155
|
-
the breathing Brain, real nodes and animated relationships stay visible beside
|
|
156
|
-
it, and the composer plus grounded next action remain within reach. Brain motion
|
|
157
|
-
and its visible life signal follow real listening, recall, synthesis, and action
|
|
158
|
-
state. Detailed memory rings, provenance, conversation history, and
|
|
159
|
-
model/runtime proof open as overlays only when requested.
|
|
31
|
+
## Why Lattice AI
|
|
160
32
|
|
|
161
|
-
|
|
33
|
+
- **Own your memory** — knowledge lives in a local SQLite Brain you can back up,
|
|
34
|
+
export, inspect, and restore (`.latticebrain` encrypted archive).
|
|
35
|
+
- **Model-independent** — switch between local MLX models and cloud models
|
|
36
|
+
without rebuilding context from zero.
|
|
37
|
+
- **Honest by design** — the Brain tells you when retrieval context is limited,
|
|
38
|
+
when captured pages extracted poorly, and when the vector index is catching up.
|
|
39
|
+
- **Safe automation** — automations are consent-first drafts; edits to existing
|
|
40
|
+
content always pass through a reviewable proposal with a diff.
|
|
162
41
|
|
|
163
|
-
|
|
42
|
+
매번 AI에게 프로젝트 맥락을 다시 설명하고 있다면, 지식이 여러 서비스에 흩어져
|
|
43
|
+
있다면, 그 기억을 특정 회사가 아니라 내가 소유하고 싶다면 — Lattice AI가 그
|
|
44
|
+
브레인입니다.
|
|
164
45
|
|
|
165
|
-
|
|
166
|
-
Snooze, unsnooze, run now, approve, and dismiss actions stay explicit.
|
|
46
|
+
## Quick Start
|
|
167
47
|
|
|
168
|
-
|
|
48
|
+
```bash
|
|
49
|
+
pip install ltcai # or: npm install -g ltcai
|
|
50
|
+
LTCAI # then open http://127.0.0.1:4825/app
|
|
51
|
+
```
|
|
169
52
|
|
|
170
|
-
|
|
53
|
+
Apple Silicon local models: `pip install "ltcai[local]"`. Desktop app (Tauri)
|
|
54
|
+
ships as a dmg on each [GitHub Release](https://github.com/TaeSooPark-PTS/LatticeAI/releases).
|
|
171
55
|
|
|
172
|
-
|
|
56
|
+
First-run flow — wake the Brain, pick the owner, load a recommended model:
|
|
173
57
|
|
|
174
|
-
|
|
|
58
|
+
| | | |
|
|
175
59
|
| --- | --- | --- |
|
|
176
|
-
|
|
|
177
|
-
| Level 2 | Older memory | Durable memories with source-aware recall |
|
|
178
|
-
| Level 3 | Topics | Recurring themes across chats and documents |
|
|
179
|
-
| Level 4 | Relationships | How decisions, people, files, and ideas connect |
|
|
180
|
-
| Level 5 | Full knowledge graph | Nodes, edges, search, and focused detail for advanced exploration |
|
|
181
|
-
|
|
182
|
-
Walkthrough:
|
|
183
|
-
|
|
184
|
-

|
|
60
|
+
|  |  |  |
|
|
185
61
|
|
|
186
62
|
Screenshot index and capture notes:
|
|
187
|
-
[output/release/v9.
|
|
63
|
+
[output/release/v9.9.0/SCREENSHOT_INDEX.md](output/release/v9.9.0/SCREENSHOT_INDEX.md)
|
|
188
64
|
|
|
189
|
-
##
|
|
190
|
-
|
|
191
|
-
Run from Python:
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
pip install ltcai
|
|
195
|
-
LTCAI
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Run from npm:
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
npm install -g ltcai
|
|
202
|
-
ltcai
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Open the local app:
|
|
206
|
-
|
|
207
|
-
```text
|
|
208
|
-
http://127.0.0.1:4825/app
|
|
209
|
-
```
|
|
65
|
+
## Current Release
|
|
210
66
|
|
|
211
|
-
|
|
67
|
+
The current release is **9.9.0 — Fail-Closed Trust**:
|
|
68
|
+
|
|
69
|
+
- **Change proposals can't clobber your edits.** A proposal now records the
|
|
70
|
+
original content hash; if the file changed before you approve, the apply is
|
|
71
|
+
rejected with a conflict instead of silently overwriting your work, and the
|
|
72
|
+
write is atomic. Duplicate/concurrent approvals apply exactly once.
|
|
73
|
+
- **A confused verifier never reports success.** If the agent's critic output
|
|
74
|
+
can't be parsed (after one strict retry), the run ends as `NEEDS_REVIEW`
|
|
75
|
+
instead of a fabricated "done"; completion now requires a valid PASS *and*
|
|
76
|
+
real execution evidence.
|
|
77
|
+
- **Every mutating tool is governed.** A single-source inventory classifies
|
|
78
|
+
each side-effecting tool; a CI gate fails closed if a new mutator ships
|
|
79
|
+
ungoverned, and tools that would overwrite existing content without a
|
|
80
|
+
reviewable proposal are blocked rather than applied.
|
|
81
|
+
- **Honest onboarding.** Device analysis is modeled as
|
|
82
|
+
`loading | ready | unavailable`; a failed probe no longer fabricates a
|
|
83
|
+
"supported, ready on this computer" model card — it shows the cause, a
|
|
84
|
+
retry, and "continue without a model."
|
|
85
|
+
- **Leaner & audited.** Initial JS bundle is ~22% smaller (lazy-loaded heavy
|
|
86
|
+
views, with a CI budget), plus dependency/SBOM audit and scheduled
|
|
87
|
+
PostgreSQL integration workflows, a security-scan report, a model benchmark
|
|
88
|
+
harness, and current/architecture documentation classification.
|
|
89
|
+
|
|
90
|
+
Release notes: [RELEASE.md](RELEASE.md) · Full history: [docs/CHANGELOG.md](docs/CHANGELOG.md)
|
|
91
|
+
|
|
92
|
+
Expected artifacts for 9.9.0 release must use exact filenames:
|
|
93
|
+
|
|
94
|
+
- `dist/ltcai-9.9.0-py3-none-any.whl`
|
|
95
|
+
- `dist/ltcai-9.9.0.tar.gz`
|
|
96
|
+
- `ltcai-9.9.0.tgz`
|
|
97
|
+
- `dist/ltcai-9.9.0.vsix`
|
|
98
|
+
- `src-tauri/target/release/bundle/dmg/Lattice AI_9.9.0_aarch64.dmg`
|
|
212
99
|
|
|
213
|
-
|
|
214
|
-
pip install "ltcai[local]"
|
|
215
|
-
```
|
|
100
|
+
Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
|
|
216
101
|
|
|
217
102
|
## Architecture At A Glance
|
|
218
103
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
centered on the Living Brain, not a generic chat or operations dashboard.
|
|
224
|
-
- **Product navigation**: desktop task navigation and a mobile bottom bar expose
|
|
225
|
-
Chat, Sources, Memory, and Work; model, workspace, and admin controls live in
|
|
226
|
-
the secondary menu.
|
|
227
|
-
- **Desktop shell**: Tauri 2 starts a localhost sidecar.
|
|
228
|
-
- **Frontend**: React, TypeScript, Vite, TanStack Query, Zustand, Cytoscape.js,
|
|
229
|
-
React Flow, and generated OpenAPI types.
|
|
230
|
-
- **Backend**: FastAPI on localhost is the UI source of truth.
|
|
231
|
-
- **Brain Core**: independent `lattice_brain` package for graph, memory,
|
|
232
|
-
context, conversations, ingestion, runtime, workflow, storage, and portability.
|
|
233
|
-
- **Storage**: SQLite is the live local Brain store; PostgreSQL/pgvector tooling
|
|
234
|
-
is optional scale-mode planning/migration support, not the default live graph
|
|
235
|
-
backend.
|
|
236
|
-
- **Portability**: encrypted `.latticebrain` archives plus backup, restore,
|
|
237
|
-
inspect, verify, import dry-run, and confirmed restore/import flows.
|
|
238
|
-
- **Trust boundary**: local-first by default; cloud calls, downloads, Telegram,
|
|
239
|
-
Brain Network, Docker/Postgres setup, and update checks are opt-in.
|
|
240
|
-
- **Admin separation**: normal Brain use stays separate from users, audit logs,
|
|
241
|
-
policies, security events, retention, and index rebuilds.
|
|
242
|
-
|
|
243
|
-
See [ARCHITECTURE.md](ARCHITECTURE.md) for the current architecture.
|
|
244
|
-
|
|
245
|
-
## Local Development
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
npm install
|
|
249
|
-
npm run dev
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
Main validation set:
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
npm run check:python
|
|
256
|
-
npm run lint
|
|
257
|
-
npm run typecheck
|
|
258
|
-
npm run test:unit
|
|
259
|
-
npm run test:integration
|
|
260
|
-
npm run test:visual
|
|
261
|
-
npm run desktop:tauri:check
|
|
262
|
-
npm run docs:check-links
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
`npm run lint` includes the Python Ruff baseline, frontend TypeScript lint
|
|
266
|
-
gate, visual smoke syntax checks, and i18n literal checks.
|
|
267
|
-
|
|
268
|
-
See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for developer workflow details.
|
|
269
|
-
|
|
270
|
-
## Current Release
|
|
271
|
-
|
|
272
|
-
The current release is **9.7.0 — Proactive Hybrid Brain**:
|
|
273
|
-
|
|
274
|
-
- Retrieval is unified: `KnowledgeGraphStore.hybrid_search()` fuses lexical
|
|
275
|
-
and vector search in the graph layer itself (normalized scores, per-source
|
|
276
|
-
provenance, rank fusion), degrades honestly to `lexical_only` when the
|
|
277
|
-
vector index is unavailable, and `context_for_query()` can opt into it.
|
|
278
|
-
- The vector index stays in sync automatically: every successful ingest runs
|
|
279
|
-
an incremental `index_node_incremental()` pass (opt-out via
|
|
280
|
-
`LATTICEAI_AUTO_VECTOR_INDEX`), and failures downgrade to an explicit
|
|
281
|
-
`pending` status that the next `rebuild_vector_index` picks up.
|
|
282
|
-
- Ingestion covers whole folders: `ingest_folder()` walks directories with
|
|
283
|
-
`.latticeignore` support (gitignore-like globs), size/extension filters,
|
|
284
|
-
and optional background scheduling; `ingest_web_page()` formalizes the
|
|
285
|
-
web seam — fetching/parsing stays upstream, the graph receives clean text.
|
|
286
|
-
- The Brain is proactive in the graph layer: `lattice_brain/graph/proactive.py`
|
|
287
|
-
finds duplicate and contradictory knowledge, produces a combined quality
|
|
288
|
-
report with stale-node and edge-quality signals, and plans consent-first
|
|
289
|
-
duplicate consolidation — surfaced at `GET /api/brain/duplicates`,
|
|
290
|
-
`GET /api/brain/quality-report`, and the existing contradiction/consolidate
|
|
291
|
-
endpoints.
|
|
292
|
-
- The change-governance loop is closed: Review Center approval now applies
|
|
293
|
-
staged proposals through the single application path (no more
|
|
294
|
-
status-only approvals), proposals carry tool/risk/change-class/conversation
|
|
295
|
-
provenance, reject records a reason, and pending-proposal counts badge the
|
|
296
|
-
review inbox.
|
|
297
|
-
- The agent evaluation gate grew to 12 scenarios, adding file-generation
|
|
298
|
-
happy path and recovery, a 3-step multi-step workflow chain, and a
|
|
299
|
-
governed-write proposal path that pins the approve()-excludes-governed-tools
|
|
300
|
-
invariant.
|
|
301
|
-
- Engineering health: `SingleAgentRuntime.execute` decomposed into focused
|
|
302
|
-
helpers, multi-agent/single-agent runtime consistency pinned by tests, all
|
|
303
|
-
root legacy modules emit deprecation warnings pointing at their package
|
|
304
|
-
homes, and `scripts/profile_kg.py` + `docs/PERFORMANCE.md` establish a
|
|
305
|
-
measured KG performance baseline.
|
|
306
|
-
|
|
307
|
-
Expected artifacts for 9.7.0 release must use exact filenames:
|
|
308
|
-
|
|
309
|
-
- `dist/ltcai-9.7.0-py3-none-any.whl`
|
|
310
|
-
- `dist/ltcai-9.7.0.tar.gz`
|
|
311
|
-
- `ltcai-9.7.0.tgz`
|
|
312
|
-
- `dist/ltcai-9.7.0.vsix`
|
|
313
|
-
- `src-tauri/target/release/bundle/dmg/Lattice AI_9.7.0_aarch64.dmg`
|
|
314
|
-
|
|
315
|
-
Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
|
|
104
|
+
FastAPI on localhost is the source of truth; the React/Vite frontend and the
|
|
105
|
+
Tauri desktop shell sit on top; the independent `lattice_brain` package owns
|
|
106
|
+
the graph, memory, ingestion, and portability. Local-first by default — cloud
|
|
107
|
+
calls, downloads, Telegram, and update checks are opt-in.
|
|
316
108
|
|
|
317
|
-
See [
|
|
318
|
-
|
|
109
|
+
See [ARCHITECTURE.md](ARCHITECTURE.md) for details and
|
|
110
|
+
[docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for the developer workflow
|
|
111
|
+
(`npm install && npm run dev`, validation via `npm run lint`,
|
|
112
|
+
`npm run test:unit`, `npm run test:visual`).
|
|
319
113
|
|
|
320
114
|
## Known Limitations
|
|
321
115
|
|
|
322
116
|
- External package registries are owner-published and can lag behind GitHub.
|
|
323
117
|
- PostgreSQL/pgvector is optional scale/migration tooling. SQLite remains the
|
|
324
|
-
live local Brain store in 9.
|
|
325
|
-
- Docker, model downloads, cloud model calls, Telegram, Brain Network, and
|
|
326
|
-
checks require explicit user action.
|
|
327
|
-
- Conversation does not fabricate answers when no model is loaded.
|
|
328
|
-
|
|
329
|
-
call a model
|
|
330
|
-
|
|
118
|
+
live local Brain store in 9.9.0.
|
|
119
|
+
- Docker, model downloads, cloud model calls, Telegram, Brain Network, and
|
|
120
|
+
update checks require explicit user action.
|
|
121
|
+
- Conversation does not fabricate answers when no model is loaded. Agent and
|
|
122
|
+
workflow simulation without a loaded LLM is deterministic and LLM-free (it
|
|
123
|
+
does not call a model) — labeled as such, never presented as autonomous
|
|
124
|
+
model success.
|
|
331
125
|
|
|
332
126
|
## Release History
|
|
333
127
|
|
|
334
128
|
| Version | Theme |
|
|
335
129
|
| --- | --- |
|
|
336
|
-
| 9.
|
|
337
|
-
| 9.
|
|
338
|
-
| 9.
|
|
339
|
-
| 9.
|
|
340
|
-
| 9.
|
|
341
|
-
| 9.
|
|
342
|
-
| 9.
|
|
343
|
-
| 9.
|
|
344
|
-
|
|
|
345
|
-
|
|
|
346
|
-
| 8.
|
|
347
|
-
| 8.
|
|
348
|
-
| 8.
|
|
349
|
-
| 8.
|
|
350
|
-
| 8.
|
|
351
|
-
| 8.
|
|
352
|
-
| 8.
|
|
353
|
-
| 8.
|
|
130
|
+
| 9.9.0 | Fail-Closed Trust |
|
|
131
|
+
| 9.8.0 | Honest Knowledge Pipeline |
|
|
132
|
+
| 9.7.0 | Proactive Hybrid Brain |
|
|
133
|
+
| 9.6.0 | Trusted Agent Loop |
|
|
134
|
+
| 9.5.0 | Command Center |
|
|
135
|
+
| 9.4.0 | Question-Driven Everyday Automation |
|
|
136
|
+
| 9.3.0 | Proactive Brain Intelligence |
|
|
137
|
+
| 9.2.0 | Model-Agnostic File Generation |
|
|
138
|
+
| 9.1.0 | Code Review Completion & Fail-Closed Runtime |
|
|
139
|
+
| 9.0.0 | Code Review Closure & Runtime Cleanup |
|
|
140
|
+
| 8.9.0 | Scoped Memory & Tool Policy Hardening |
|
|
141
|
+
| 8.8.0 | Brain Core Extraction & Recall Proof Hardening |
|
|
142
|
+
| 8.7.0 | Runtime State Hygiene & Release Evidence Refresh |
|
|
143
|
+
| 8.6.0 | Desktop Capture & Navigation Reliability |
|
|
144
|
+
| 8.5.0 | Tool Registry Readiness & Config DI |
|
|
145
|
+
| 8.4.0 | Action-Aware Brain Chat |
|
|
146
|
+
| 8.3.0 | Orchestrated Brain Readiness |
|
|
147
|
+
| 8.2.0 | Brain Brief |
|
|
148
|
+
| 8.1.0 | Intuitive Brain Home |
|
|
149
|
+
| 8.0.0 | Runtime Architecture Contract |
|
|
150
|
+
|
|
151
|
+
Per-release details: [RELEASE_NOTES.md](RELEASE_NOTES.md)
|
|
354
152
|
|
|
355
153
|
## Documentation
|
|
356
154
|
|
|
357
|
-
- [docs/WHY_LATTICE.md](docs/WHY_LATTICE.md)
|
|
358
|
-
- [docs/TRUST_MODEL.md](docs/TRUST_MODEL.md)
|
|
359
|
-
- [PRIVACY.md](PRIVACY.md)
|
|
360
|
-
- [
|
|
361
|
-
- [
|
|
362
|
-
- [
|
|
363
|
-
- [docs/LEGACY_COMPATIBILITY.md](docs/LEGACY_COMPATIBILITY.md) - root legacy shim map.
|
|
364
|
-
- [RELEASE.md](RELEASE.md) - release guide and current release notes.
|
|
365
|
-
- [docs/CHANGELOG.md](docs/CHANGELOG.md) - historical changes.
|
|
366
|
-
- [SECURITY.md](SECURITY.md) - security posture.
|
|
155
|
+
- [docs/WHY_LATTICE.md](docs/WHY_LATTICE.md) — product philosophy
|
|
156
|
+
- [docs/TRUST_MODEL.md](docs/TRUST_MODEL.md) — local-first trust model
|
|
157
|
+
- [PRIVACY.md](PRIVACY.md) — privacy and external communication policy
|
|
158
|
+
- [FEATURE_STATUS.md](FEATURE_STATUS.md) — feature status and limitations
|
|
159
|
+
- [SECURITY.md](SECURITY.md) — security posture
|
|
160
|
+
- [RELEASE.md](RELEASE.md) — release guide and notes
|
|
367
161
|
|
|
368
162
|
## License
|
|
369
163
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Model Robustness Benchmarks
|
|
2
|
+
|
|
3
|
+
> Status: reference 2026-07-21
|
|
4
|
+
|
|
5
|
+
Methodology and results for `scripts/bench_models.py`, a harness that measures
|
|
6
|
+
how well the agent loop turns model output into executable actions across model
|
|
7
|
+
quality tiers. Companion to [CI & Release Gates](CI_AND_RELEASE_GATES.md).
|
|
8
|
+
|
|
9
|
+
## What is measured
|
|
10
|
+
|
|
11
|
+
The product claim is that the Brain stays durable "across any AI model": weaker
|
|
12
|
+
models emit sloppier output, but the loop repairs it and still completes the
|
|
13
|
+
task. The harness turns that into three numbers per tier:
|
|
14
|
+
|
|
15
|
+
- **success_rate** — fraction of model outputs that become a valid agent action
|
|
16
|
+
(the task can proceed).
|
|
17
|
+
- **repair_rate** — of the successful parses, the fraction that succeeded *only
|
|
18
|
+
because* the loop's tolerant parser had to repair the output. High = "this
|
|
19
|
+
tier leans hard on the loop's robustness".
|
|
20
|
+
- **latency_ms** — see the honesty note below.
|
|
21
|
+
|
|
22
|
+
Every output is fed through the **real** parser the production loop uses:
|
|
23
|
+
`latticeai.core.agent.extract_action_details` (called from `agent.py` in the
|
|
24
|
+
plan/execute/verify phases). The harness does not reimplement parsing — it
|
|
25
|
+
measures the shipping code. Its known repair tolerances are: `think_strip`
|
|
26
|
+
(strip `<think>` blocks), `fence` (unwrap ```` ```json ````), `slice` (extract
|
|
27
|
+
the `{...}` span from prose), `trailing_comma`, and `python_literal`
|
|
28
|
+
(`ast.literal_eval` of a single-quoted dict).
|
|
29
|
+
|
|
30
|
+
An `agent-loop` reference row additionally runs the real
|
|
31
|
+
`latticeai.core.agent_eval.run_agent_eval` state machine over its 20 scripted
|
|
32
|
+
scenarios and reports its success and recovery rates.
|
|
33
|
+
|
|
34
|
+
## Honesty note on latency
|
|
35
|
+
|
|
36
|
+
In **scripted** mode, `latency_ms` is the **parse+repair cost only**
|
|
37
|
+
(microseconds). It is **not** model inference time and must not be read as such.
|
|
38
|
+
True generation latency is only meaningful in **live** mode against a real
|
|
39
|
+
endpoint.
|
|
40
|
+
|
|
41
|
+
## Modes
|
|
42
|
+
|
|
43
|
+
1. **scripted** (default; no model, no network): a curated corpus of
|
|
44
|
+
model-realistic outputs per tier. Deterministic; proves the harness works and
|
|
45
|
+
exposes the loop's repair boundary. Some weak-tier entries are *intentionally
|
|
46
|
+
broken* past the repair boundary so `success_rate < 1.0` is a real finding,
|
|
47
|
+
not a rigged demo. A self-check asserts every corpus entry's expected
|
|
48
|
+
parse/fail outcome matches reality (0 mismatches = healthy).
|
|
49
|
+
2. **live** (opt-in): sends a fixed prompt set to an OpenAI-compatible local
|
|
50
|
+
endpoint (LM Studio / llama.cpp / vLLM), runs the real completions through
|
|
51
|
+
the same parser, and reports **true** generation latency. Falls back to a
|
|
52
|
+
clear "SKIPPED" line if the endpoint is unreachable.
|
|
53
|
+
|
|
54
|
+
## Running
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Scripted matrix (always works):
|
|
58
|
+
.venv/bin/python scripts/bench_models.py
|
|
59
|
+
|
|
60
|
+
# With machine-readable output:
|
|
61
|
+
.venv/bin/python scripts/bench_models.py --json bench.json
|
|
62
|
+
|
|
63
|
+
# Against a real local model (OpenAI-compatible endpoint):
|
|
64
|
+
.venv/bin/python scripts/bench_models.py \
|
|
65
|
+
--live-endpoint http://127.0.0.1:1234/v1 --model my-local-model
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Exit code is non-zero only if the harness self-check finds an inconsistency (a
|
|
69
|
+
real bug); a low score on a weak tier is a finding, not a failure.
|
|
70
|
+
|
|
71
|
+
## Reference results (scripted, 2026-07-21)
|
|
72
|
+
|
|
73
|
+
Captured on the maintainer's machine; latency is parse-only.
|
|
74
|
+
|
|
75
|
+
| Tier | success_rate | repair_rate | n | repairs exercised |
|
|
76
|
+
|------|-------------:|------------:|--:|-------------------|
|
|
77
|
+
| frontier (clean JSON) | 1.00 | 0.00 | 6 | — |
|
|
78
|
+
| mid-local (fenced/prose/commas) | 1.00 | 1.00 | 6 | fence×3, slice×1, trailing_comma×2 |
|
|
79
|
+
| weak-local (think/py-literal/broken) | 0.625 | 1.00 | 8 | think_strip×2, python_literal×2, fence×1, trailing_comma×1 |
|
|
80
|
+
|
|
81
|
+
Agent-loop reference (real state machine): **success_rate 1.00**, **recovery_rate
|
|
82
|
+
0.70** over 20 scenarios. Harness self-check: **0 mismatches**.
|
|
83
|
+
|
|
84
|
+
Reading the matrix: the mid tier is fully recoverable — every output needed a
|
|
85
|
+
repair, and all succeeded, which is exactly the "durable across models" claim in
|
|
86
|
+
action. The weak tier's 0.625 is the honest boundary: the 3 genuinely broken
|
|
87
|
+
outputs (pure prose, missing `action` field, truncated braces) cannot and should
|
|
88
|
+
not parse.
|
|
89
|
+
|
|
90
|
+
## Measurable vs not-measurable (honest scope)
|
|
91
|
+
|
|
92
|
+
**This harness can measure:**
|
|
93
|
+
- Whether a given model's raw output survives the loop's parser (success_rate).
|
|
94
|
+
- How much the loop's repair layer is doing the work (repair_rate + which
|
|
95
|
+
tolerances fire).
|
|
96
|
+
- Real end-to-end generation latency in `live` mode.
|
|
97
|
+
- End-to-end loop completion over the scripted scenario suite.
|
|
98
|
+
|
|
99
|
+
**This harness does NOT measure:**
|
|
100
|
+
- Task *correctness* / answer quality — only that an action is well-formed and
|
|
101
|
+
executable, not that it is the *right* action.
|
|
102
|
+
- Multi-turn reasoning quality or tool-selection accuracy beyond the scripted
|
|
103
|
+
scenarios.
|
|
104
|
+
- Throughput/latency under concurrency or on other hardware.
|
|
105
|
+
- Any cloud model (no keys are used; live mode targets local endpoints only).
|
|
106
|
+
- A representative sample of "all models" — scripted tiers are archetypes, not a
|
|
107
|
+
statistical population. For real numbers on a specific model, use `live` mode.
|