localagentbrowser-cleanroom 1.67__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.
- localagentbrowser_cleanroom-1.67/LICENSE +21 -0
- localagentbrowser_cleanroom-1.67/MANIFEST.in +4 -0
- localagentbrowser_cleanroom-1.67/PKG-INFO +114 -0
- localagentbrowser_cleanroom-1.67/README.md +82 -0
- localagentbrowser_cleanroom-1.67/agent_browser.py +24 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/__init__.py +26 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/agent.py +558 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/checklist.py +99 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/checks.py +516 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/config.py +134 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/coverage.py +585 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/dates.py +101 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/grounding.py +233 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/pages.py +583 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/prompts.py +149 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/report.py +1113 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/text.py +88 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser/windows.py +184 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser_cleanroom.egg-info/PKG-INFO +114 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser_cleanroom.egg-info/SOURCES.txt +41 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser_cleanroom.egg-info/dependency_links.txt +1 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser_cleanroom.egg-info/entry_points.txt +2 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser_cleanroom.egg-info/requires.txt +6 -0
- localagentbrowser_cleanroom-1.67/localagentbrowser_cleanroom.egg-info/top_level.txt +2 -0
- localagentbrowser_cleanroom-1.67/pyproject.toml +62 -0
- localagentbrowser_cleanroom-1.67/setup.cfg +4 -0
- localagentbrowser_cleanroom-1.67/tests/conftest.py +8 -0
- localagentbrowser_cleanroom-1.67/tests/fakes.py +128 -0
- localagentbrowser_cleanroom-1.67/tests/golden/prompts.json +2298 -0
- localagentbrowser_cleanroom-1.67/tests/test_checklist.py +1099 -0
- localagentbrowser_cleanroom-1.67/tests/test_decisions.py +701 -0
- localagentbrowser_cleanroom-1.67/tests/test_duplicates.py +71 -0
- localagentbrowser_cleanroom-1.67/tests/test_golden_prompts.py +134 -0
- localagentbrowser_cleanroom-1.67/tests/test_journal.py +81 -0
- localagentbrowser_cleanroom-1.67/tests/test_main_loop.py +189 -0
- localagentbrowser_cleanroom-1.67/tests/test_model_turns.py +299 -0
- localagentbrowser_cleanroom-1.67/tests/test_page_text.py +165 -0
- localagentbrowser_cleanroom-1.67/tests/test_regression.py +647 -0
- localagentbrowser_cleanroom-1.67/tests/test_show_report.py +66 -0
- localagentbrowser_cleanroom-1.67/tests/test_windows_launcher.py +0 -0
- localagentbrowser_cleanroom-1.67/tools/live_test.py +69 -0
- localagentbrowser_cleanroom-1.67/tools/regression.py +577 -0
- localagentbrowser_cleanroom-1.67/tools/windows/show_report.py +182 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SnowFX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: localagentbrowser-cleanroom
|
|
3
|
+
Version: 1.67
|
|
4
|
+
Summary: Clean Room, a private edition of LocalAgentBrowser: an autonomous web research agent with checked answers, on a local LLM (LM Studio) only, and Playwright.
|
|
5
|
+
Author: SnowFX
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/SnowFXXX/LocalAgentBrowser
|
|
8
|
+
Project-URL: Website, https://snowfxxx.github.io/LocalAgentBrowser/
|
|
9
|
+
Project-URL: Issues, https://github.com/SnowFXXX/LocalAgentBrowser/issues
|
|
10
|
+
Keywords: ai-agent,autonomous-agent,llm,local-llm,lm-studio,playwright,browser-automation,web-agent,web-research,qwen,local-first,privacy
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: openai>=2.0
|
|
27
|
+
Requires-Dist: playwright>=1.50
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
30
|
+
Requires-Dist: ruff>=0.15; extra == "dev"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# LocalAgentBrowser Clean Room
|
|
34
|
+
|
|
35
|
+
**Clean Room is a private edition of [LocalAgentBrowser](https://github.com/SnowFXXX/LocalAgentBrowser):** an
|
|
36
|
+
autonomous web research agent with checked answers, run by a language model on your own PC in
|
|
37
|
+
[LM Studio](https://lmstudio.ai), with a Chromium browser you can watch.
|
|
38
|
+
|
|
39
|
+
The full edition can also use hosted AI models over the internet, if you turn that on. Clean Room doesn't have that
|
|
40
|
+
option at all: the code for it is removed before the edition is built, not just switched off, and the build fails if
|
|
41
|
+
any of it is left. What Clean Room connects to:
|
|
42
|
+
|
|
43
|
+
- **The model server:** LM Studio on this PC, or another machine on your own network. Clean Room refuses any other
|
|
44
|
+
address, whatever `LMSTUDIO_BASE_URL` says.
|
|
45
|
+
- **The search engine** (DuckDuckGo) and **the pages the agent reads**, the same as a person browsing.
|
|
46
|
+
- During setup only: the Chromium browser download, and the model you pick (from Hugging Face, through LM Studio).
|
|
47
|
+
|
|
48
|
+
Your objective, the pages read and the report stay on your PC. Each run writes its research log and report to its
|
|
49
|
+
own folder.
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
### Windows: the installer
|
|
54
|
+
|
|
55
|
+
1. Install [LM Studio](https://lmstudio.ai) (free).
|
|
56
|
+
2. Download **`LocalAgentBrowser-CleanRoom-<version>-setup.exe`** from the
|
|
57
|
+
[latest release](https://github.com/SnowFXXX/LocalAgentBrowser/releases/latest) and run it.
|
|
58
|
+
- Windows may say **"Windows protected your PC"**, because the installer isn't code-signed yet. Click
|
|
59
|
+
**More info → Run anyway**.
|
|
60
|
+
- It installs for your Windows account only, with no administrator rights, and brings its own Python.
|
|
61
|
+
- It installs beside the full edition, in its own folder (`LocalAgentBrowser Clean Room`) with its own
|
|
62
|
+
shortcuts, so you can have both.
|
|
63
|
+
3. Setup asks which of the tested models to download through LM Studio, then downloads the Chromium browser the agent
|
|
64
|
+
uses (about 150 MB, once).
|
|
65
|
+
4. Open **LocalAgentBrowser Clean Room** from the Start menu or the desktop.
|
|
66
|
+
|
|
67
|
+
To remove it: **Start menu → LocalAgentBrowser Clean Room → Uninstall**, or Windows Settings → Apps. Your reports in
|
|
68
|
+
Documents are kept.
|
|
69
|
+
|
|
70
|
+
### Any system: pip
|
|
71
|
+
|
|
72
|
+
You need Python 3.10 or later and LM Studio.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python -m venv venv
|
|
76
|
+
venv\Scripts\activate
|
|
77
|
+
pip install localagentbrowser-cleanroom
|
|
78
|
+
python -m playwright install chromium
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
On macOS or Linux, activate with `source venv/bin/activate` instead. The package installs the same `localagentbrowser`
|
|
82
|
+
command and module as the full edition, so install one or the other in a given environment, not both.
|
|
83
|
+
|
|
84
|
+
## First run
|
|
85
|
+
|
|
86
|
+
1. In LM Studio, load your model with a **context length of 8192** and start the local server (Developer tab → Start
|
|
87
|
+
Server).
|
|
88
|
+
2. Start LocalAgentBrowser Clean Room: the Start-menu shortcut on Windows, or `localagentbrowser` in a terminal.
|
|
89
|
+
3. Type your objective, for example *What is the tallest mountain in Africa, and how tall is it in meters and in
|
|
90
|
+
feet?* A Chromium window opens and the agent starts working. The first step takes a minute or two on a CPU.
|
|
91
|
+
4. When it finishes, the report opens in your browser, or read `research_report.md` in the folder you ran it from.
|
|
92
|
+
Runs from the shortcut each get their own folder under **Documents\LocalAgentBrowser runs**.
|
|
93
|
+
|
|
94
|
+
A run takes about 10 to 60 minutes on a CPU. Press Ctrl+C at any time to stop; the report is still written with
|
|
95
|
+
everything found so far.
|
|
96
|
+
|
|
97
|
+
## Settings
|
|
98
|
+
|
|
99
|
+
| Environment variable | Default | Meaning |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `LMSTUDIO_BASE_URL` | `http://localhost:1234/v1` | LM Studio's address: this PC or your own network only |
|
|
102
|
+
| `LMSTUDIO_MODEL` | `qwen2.5-7b-instruct` | Model identifier as LM Studio lists it |
|
|
103
|
+
| `LMSTUDIO_API_KEY` | `lm-studio` | A key, if your LM Studio server requires one |
|
|
104
|
+
| `LMSTUDIO_CONTEXT_LENGTH` | `8192` | Context length the model is loaded with |
|
|
105
|
+
| `LAB_SIDE_BY_SIDE` | on | On Windows, `0` keeps the console and the browser from being placed side by side |
|
|
106
|
+
|
|
107
|
+
## More
|
|
108
|
+
|
|
109
|
+
How the agent works, what it was tested on and its limitations are in the
|
|
110
|
+
[project README](https://github.com/SnowFXXX/LocalAgentBrowser#readme) and
|
|
111
|
+
[How it works](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/docs/how-it-works.md). Clean Room runs the
|
|
112
|
+
same agent and the same checks as the full edition, from the same code.
|
|
113
|
+
|
|
114
|
+
MIT License; see `LICENSE`.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# LocalAgentBrowser Clean Room
|
|
2
|
+
|
|
3
|
+
**Clean Room is a private edition of [LocalAgentBrowser](https://github.com/SnowFXXX/LocalAgentBrowser):** an
|
|
4
|
+
autonomous web research agent with checked answers, run by a language model on your own PC in
|
|
5
|
+
[LM Studio](https://lmstudio.ai), with a Chromium browser you can watch.
|
|
6
|
+
|
|
7
|
+
The full edition can also use hosted AI models over the internet, if you turn that on. Clean Room doesn't have that
|
|
8
|
+
option at all: the code for it is removed before the edition is built, not just switched off, and the build fails if
|
|
9
|
+
any of it is left. What Clean Room connects to:
|
|
10
|
+
|
|
11
|
+
- **The model server:** LM Studio on this PC, or another machine on your own network. Clean Room refuses any other
|
|
12
|
+
address, whatever `LMSTUDIO_BASE_URL` says.
|
|
13
|
+
- **The search engine** (DuckDuckGo) and **the pages the agent reads**, the same as a person browsing.
|
|
14
|
+
- During setup only: the Chromium browser download, and the model you pick (from Hugging Face, through LM Studio).
|
|
15
|
+
|
|
16
|
+
Your objective, the pages read and the report stay on your PC. Each run writes its research log and report to its
|
|
17
|
+
own folder.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
### Windows: the installer
|
|
22
|
+
|
|
23
|
+
1. Install [LM Studio](https://lmstudio.ai) (free).
|
|
24
|
+
2. Download **`LocalAgentBrowser-CleanRoom-<version>-setup.exe`** from the
|
|
25
|
+
[latest release](https://github.com/SnowFXXX/LocalAgentBrowser/releases/latest) and run it.
|
|
26
|
+
- Windows may say **"Windows protected your PC"**, because the installer isn't code-signed yet. Click
|
|
27
|
+
**More info → Run anyway**.
|
|
28
|
+
- It installs for your Windows account only, with no administrator rights, and brings its own Python.
|
|
29
|
+
- It installs beside the full edition, in its own folder (`LocalAgentBrowser Clean Room`) with its own
|
|
30
|
+
shortcuts, so you can have both.
|
|
31
|
+
3. Setup asks which of the tested models to download through LM Studio, then downloads the Chromium browser the agent
|
|
32
|
+
uses (about 150 MB, once).
|
|
33
|
+
4. Open **LocalAgentBrowser Clean Room** from the Start menu or the desktop.
|
|
34
|
+
|
|
35
|
+
To remove it: **Start menu → LocalAgentBrowser Clean Room → Uninstall**, or Windows Settings → Apps. Your reports in
|
|
36
|
+
Documents are kept.
|
|
37
|
+
|
|
38
|
+
### Any system: pip
|
|
39
|
+
|
|
40
|
+
You need Python 3.10 or later and LM Studio.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
python -m venv venv
|
|
44
|
+
venv\Scripts\activate
|
|
45
|
+
pip install localagentbrowser-cleanroom
|
|
46
|
+
python -m playwright install chromium
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
On macOS or Linux, activate with `source venv/bin/activate` instead. The package installs the same `localagentbrowser`
|
|
50
|
+
command and module as the full edition, so install one or the other in a given environment, not both.
|
|
51
|
+
|
|
52
|
+
## First run
|
|
53
|
+
|
|
54
|
+
1. In LM Studio, load your model with a **context length of 8192** and start the local server (Developer tab → Start
|
|
55
|
+
Server).
|
|
56
|
+
2. Start LocalAgentBrowser Clean Room: the Start-menu shortcut on Windows, or `localagentbrowser` in a terminal.
|
|
57
|
+
3. Type your objective, for example *What is the tallest mountain in Africa, and how tall is it in meters and in
|
|
58
|
+
feet?* A Chromium window opens and the agent starts working. The first step takes a minute or two on a CPU.
|
|
59
|
+
4. When it finishes, the report opens in your browser, or read `research_report.md` in the folder you ran it from.
|
|
60
|
+
Runs from the shortcut each get their own folder under **Documents\LocalAgentBrowser runs**.
|
|
61
|
+
|
|
62
|
+
A run takes about 10 to 60 minutes on a CPU. Press Ctrl+C at any time to stop; the report is still written with
|
|
63
|
+
everything found so far.
|
|
64
|
+
|
|
65
|
+
## Settings
|
|
66
|
+
|
|
67
|
+
| Environment variable | Default | Meaning |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `LMSTUDIO_BASE_URL` | `http://localhost:1234/v1` | LM Studio's address: this PC or your own network only |
|
|
70
|
+
| `LMSTUDIO_MODEL` | `qwen2.5-7b-instruct` | Model identifier as LM Studio lists it |
|
|
71
|
+
| `LMSTUDIO_API_KEY` | `lm-studio` | A key, if your LM Studio server requires one |
|
|
72
|
+
| `LMSTUDIO_CONTEXT_LENGTH` | `8192` | Context length the model is loaded with |
|
|
73
|
+
| `LAB_SIDE_BY_SIDE` | on | On Windows, `0` keeps the console and the browser from being placed side by side |
|
|
74
|
+
|
|
75
|
+
## More
|
|
76
|
+
|
|
77
|
+
How the agent works, what it was tested on and its limitations are in the
|
|
78
|
+
[project README](https://github.com/SnowFXXX/LocalAgentBrowser#readme) and
|
|
79
|
+
[How it works](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/docs/how-it-works.md). Clean Room runs the
|
|
80
|
+
same agent and the same checks as the full edition, from the same code.
|
|
81
|
+
|
|
82
|
+
MIT License; see `LICENSE`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""LocalAgentBrowser: an autonomous web agent driven by a local language model.
|
|
2
|
+
|
|
3
|
+
Run: python agent_browser.py (or `localagentbrowser` once installed; it asks for the objective)
|
|
4
|
+
|
|
5
|
+
The code lives in the localagentbrowser package (see its __init__.py for how it is organized). This file keeps
|
|
6
|
+
`python agent_browser.py` working from a clone, and `import agent_browser` working for the tests and tools: it
|
|
7
|
+
gives access to every name in the package. To replace a part of the agent in a test, patch the module that
|
|
8
|
+
uses it (for example localagentbrowser.agent.AsyncOpenAI), not this file.
|
|
9
|
+
"""
|
|
10
|
+
from localagentbrowser.config import * # noqa: F403
|
|
11
|
+
from localagentbrowser.prompts import * # noqa: F403
|
|
12
|
+
from localagentbrowser.text import * # noqa: F403
|
|
13
|
+
from localagentbrowser.pages import * # noqa: F403
|
|
14
|
+
from localagentbrowser.grounding import * # noqa: F403
|
|
15
|
+
from localagentbrowser.dates import * # noqa: F403
|
|
16
|
+
from localagentbrowser.checklist import * # noqa: F403
|
|
17
|
+
from localagentbrowser.coverage import * # noqa: F403
|
|
18
|
+
from localagentbrowser.checks import * # noqa: F403
|
|
19
|
+
from localagentbrowser.report import * # noqa: F403
|
|
20
|
+
from localagentbrowser.agent import * # noqa: F403
|
|
21
|
+
from localagentbrowser.agent import main, run # noqa: F401
|
|
22
|
+
|
|
23
|
+
if __name__ == "__main__":
|
|
24
|
+
run()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""LocalAgentBrowser: an autonomous web agent driven by a local language model.
|
|
2
|
+
|
|
3
|
+
A model served by LM Studio decides, one JSON action at a time, whether to SEARCH, NAVIGATE, READ_MORE,
|
|
4
|
+
DISCOVER or FINISH; Playwright carries the actions out in a visible Chromium window. Everything the
|
|
5
|
+
agent does and finds is written to research_log.txt.
|
|
6
|
+
|
|
7
|
+
Run: python agent_browser.py (or `localagentbrowser` once installed; it asks for the objective)
|
|
8
|
+
|
|
9
|
+
Settings (environment variables):
|
|
10
|
+
LMSTUDIO_BASE_URL OpenAI-compatible server address (default http://localhost:1234/v1)
|
|
11
|
+
LMSTUDIO_MODEL model identifier (default qwen2.5-7b-instruct)
|
|
12
|
+
LMSTUDIO_API_KEY API key, if the server needs one (default lm-studio)
|
|
13
|
+
LMSTUDIO_CONTEXT_LENGTH context length the model is loaded with (default 8192)
|
|
14
|
+
|
|
15
|
+
The package, one file per job; each imports only from the ones listed before it:
|
|
16
|
+
config settings and every limit and threshold
|
|
17
|
+
prompts every fixed text the model reads
|
|
18
|
+
text small word helpers the checks share
|
|
19
|
+
pages search results, page parts, the outline and its pointer, links
|
|
20
|
+
grounding whether a finding is really on the page shown, or already recorded
|
|
21
|
+
checklist the objective split into a fixed checklist; findings linked to its items
|
|
22
|
+
coverage the coverage check before finishing, verified in code
|
|
23
|
+
checks decisions refused or confirmed before they are carried out
|
|
24
|
+
report the journal, research log, final result and report file
|
|
25
|
+
agent the loop: each turn's conversation with the model, and main()
|
|
26
|
+
"""
|