localagentbrowser 1.41__py3-none-any.whl
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.
- agent_browser.py +1107 -0
- localagentbrowser-1.41.dist-info/METADATA +358 -0
- localagentbrowser-1.41.dist-info/RECORD +7 -0
- localagentbrowser-1.41.dist-info/WHEEL +5 -0
- localagentbrowser-1.41.dist-info/entry_points.txt +2 -0
- localagentbrowser-1.41.dist-info/licenses/LICENSE +21 -0
- localagentbrowser-1.41.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: localagentbrowser
|
|
3
|
+
Version: 1.41
|
|
4
|
+
Summary: An autonomous web agent driven by a local LLM (LM Studio) and Playwright. Runs entirely on your own machine.
|
|
5
|
+
Author: SnowFX
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/SnowFXXX/LocalAgentBrowser
|
|
8
|
+
Project-URL: Changelog, https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/CHANGELOG.md
|
|
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,offline-ai
|
|
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
|
|
34
|
+
|
|
35
|
+
**An autonomous web agent powered by a local LLM. Give it an objective; it searches, reads, takes notes and
|
|
36
|
+
decides when it's done, all on your own computer.**
|
|
37
|
+
|
|
38
|
+
[](https://github.com/SnowFXXX/LocalAgentBrowser/actions/workflows/tests.yml)
|
|
39
|
+
[](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/LICENSE)
|
|
40
|
+

|
|
41
|
+
-green.svg)
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src="https://raw.githubusercontent.com/SnowFXXX/LocalAgentBrowser/main/docs/social-preview.png" alt="LocalAgentBrowser: SEARCH, NAVIGATE, READ_MORE, DISCOVER, FINISH. No cloud AI, 7B model on a CPU, LM Studio and Playwright." width="820">
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
A local language model served by [LM Studio](https://lmstudio.ai) decides what to do next, and
|
|
48
|
+
[Playwright](https://playwright.dev/python/) carries it out in a visible Chromium window you can watch. Built
|
|
49
|
+
and tuned to work well with a **small 7B model on a CPU, no GPU required**.
|
|
50
|
+
|
|
51
|
+
- 🔒 **No cloud AI and no API keys.** The model runs in your own LM Studio.
|
|
52
|
+
- 🧭 **Goes from objective to findings unattended.** It searches, opens pages, reads long pages part by part,
|
|
53
|
+
records what's relevant and finishes when the objective is met.
|
|
54
|
+
- 🛡️ **Keeps a small model on track.** Rules enforced in code stop loops, repeats and drifting, and the model
|
|
55
|
+
is regularly asked to check its progress against the objective.
|
|
56
|
+
- ⚡ **Built for slow hardware.** It reuses LM Studio's prompt cache, so most turns process only what changed.
|
|
57
|
+
- 📝 **A readable report every time.** `research_report.md` holds the final result and every finding with its
|
|
58
|
+
source, written however the run ends; `research_log.txt` keeps every action and reason.
|
|
59
|
+
- ✅ **Tested.** 89 tests on Linux and Windows, Python 3.10–3.13, run in about a second with no model or browser,
|
|
60
|
+
plus live runs on six different kinds of task (see [results](#results-on-different-kinds-of-tasks)).
|
|
61
|
+
|
|
62
|
+
## Contents
|
|
63
|
+
|
|
64
|
+
[Quick start](#quick-start) · [What a run looks like](#what-a-run-looks-like) · [How it works](#how-it-works) ·
|
|
65
|
+
[Settings](#settings) · [Performance](#performance) · [FAQ](#faq) · [Limitations](#limitations) ·
|
|
66
|
+
[Roadmap](#roadmap) · [Contributing](#contributing)
|
|
67
|
+
|
|
68
|
+
## Quick start
|
|
69
|
+
|
|
70
|
+
1. Install [LM Studio](https://lmstudio.ai), download a model (developed with **Qwen2.5-7B-Instruct**),
|
|
71
|
+
load it and start the local server (Developer tab → Start Server).
|
|
72
|
+
2. Install the agent from [PyPI](https://pypi.org/project/localagentbrowser/) (Python 3.10 or later, ideally
|
|
73
|
+
in a virtual environment) and the Chromium browser it drives:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install localagentbrowser
|
|
77
|
+
python -m playwright install chromium
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
3. Run it and type your objective:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
localagentbrowser
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
When it finishes, read `research_report.md` in the folder you ran it from. Press Ctrl+C at any time to
|
|
87
|
+
stop; the report is still written with everything found so far.
|
|
88
|
+
|
|
89
|
+
To work on the code instead, clone the repository and install from it:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git clone https://github.com/SnowFXXX/LocalAgentBrowser.git
|
|
93
|
+
cd LocalAgentBrowser
|
|
94
|
+
pip install -r requirements.txt
|
|
95
|
+
python -m playwright install chromium
|
|
96
|
+
python agent_browser.py
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## What a run looks like
|
|
100
|
+
|
|
101
|
+
A complete real run with version 1.40, using the [live test runner](#testing) (which adds the timing lines);
|
|
102
|
+
repetitive status lines are left out and long lines are wrapped. Objective: *"What is the tallest mountain in
|
|
103
|
+
Africa, and how tall is it in meters and in feet?"*
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
🧠 [TURN 1/100] Active reasoning cycle executing...
|
|
107
|
+
(model call 38.6s, prompt=676 tok, completion=54 tok)
|
|
108
|
+
💡 Agent Thoughts: I need to find out the tallest mountain in Africa and its height in meters and feet.
|
|
109
|
+
I should start by searching for this information.
|
|
110
|
+
🎬 Chosen Action: [SEARCH] -> Parameter: tallest mountain in Africa
|
|
111
|
+
|
|
112
|
+
🧠 [TURN 2/100] Active reasoning cycle executing...
|
|
113
|
+
⚡ Continuing the conversation (follow-up 1/12, ~1654 tokens)
|
|
114
|
+
(model call 122.8s, prompt=1491 tok, completion=86 tok)
|
|
115
|
+
💡 Agent Thoughts: From the search results, I can see that Mount Kilimanjaro is mentioned as the tallest
|
|
116
|
+
mountain in Africa ... I will navigate to one of these pages to find the exact height in meters and feet.
|
|
117
|
+
🎬 Chosen Action: [NAVIGATE] -> Parameter: https://en.wikipedia.org/wiki/Mount_Kilimanjaro
|
|
118
|
+
|
|
119
|
+
🧠 [TURN 3/100] Active reasoning cycle executing...
|
|
120
|
+
⚡ Continuing the conversation (follow-up 2/12, ~3693 tokens)
|
|
121
|
+
(model call 347.3s, prompt=3753 tok, completion=84 tok)
|
|
122
|
+
💡 Agent Thoughts: The page provides the height of Mount Kilimanjaro in meters and feet. I will extract
|
|
123
|
+
this information to complete the objective.
|
|
124
|
+
🎬 Chosen Action: [DISCOVER] -> Parameter: Mount Kilimanjaro is the highest mountain in Africa, with an
|
|
125
|
+
elevation of 5,895 m (19,341 ft) above sea level.
|
|
126
|
+
|
|
127
|
+
🧠 [TURN 4/100] Active reasoning cycle executing...
|
|
128
|
+
⚡ Continuing the conversation (follow-up 3/12, ~3955 tokens)
|
|
129
|
+
(model call 63.9s, prompt=3975 tok, completion=127 tok)
|
|
130
|
+
♻️ Cheap retry 1/2: [FINISH] refused. Your only discovery comes from
|
|
131
|
+
https://en.wikipedia.org/wiki/Mount_Kilimanjaro. Consider whether the objective needs more. The current
|
|
132
|
+
page still has 32 unread parts: use its outline to judge whether any of them is relevant before reading
|
|
133
|
+
them. Before finishing, split the OBJECTIVE into its separate parts and, in thought_process, write each
|
|
134
|
+
part followed by the discovery that covers it, or 'not covered'. ...
|
|
135
|
+
(model call 80.6s, prompt=4368 tok, completion=97 tok)
|
|
136
|
+
💡 Agent Thoughts: The objective has two parts: the name of the tallest mountain in Africa and its height
|
|
137
|
+
in meters and feet. Both are covered by the discovery from Mount Kilimanjaro's Wikipedia page.
|
|
138
|
+
🎬 Chosen Action: [FINISH] -> Parameter: The tallest mountain in Africa is Mount Kilimanjaro, which has an
|
|
139
|
+
elevation of 5,895 meters (19,341 feet) above sea level.
|
|
140
|
+
🎯 Agent has signaled mission complete. Writing the final result...
|
|
141
|
+
(model call 52.3s, prompt=312 tok, completion=41 tok)
|
|
142
|
+
🔒 Shutting down browser instance. Report: research_report.md; full journal: research_log.txt.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Four turns and 11.8 minutes of model time on a CPU: it searched, chose a page, recorded the answer, checked
|
|
146
|
+
each part of the question against what it had found before finishing, and then wrote the final result in a
|
|
147
|
+
separate step. The `research_report.md` it produced:
|
|
148
|
+
|
|
149
|
+
> **Status:** finished by the agent on turn 4
|
|
150
|
+
>
|
|
151
|
+
> **Final result:** The tallest mountain in Africa is Mount Kilimanjaro [1], and its elevation is 5,895 meters
|
|
152
|
+
> (19,341 feet) above sea level [1].
|
|
153
|
+
>
|
|
154
|
+
> **Discoveries (1)**
|
|
155
|
+
> 1. Turn 3, from https://en.wikipedia.org/wiki/Mount_Kilimanjaro: *Mount Kilimanjaro is the highest mountain
|
|
156
|
+
> in Africa, with an elevation of 5,895 m (19,341 ft) above sea level.*
|
|
157
|
+
|
|
158
|
+
### Results on different kinds of tasks
|
|
159
|
+
|
|
160
|
+
Live runs on the development machine (CPU only, Qwen2.5-7B). Each kind of task is used to find and fix what
|
|
161
|
+
does not generalise; the [changelog](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/CHANGELOG.md) has the details.
|
|
162
|
+
|
|
163
|
+
| Kind of task | Objective (abridged) | Version | Outcome |
|
|
164
|
+
|---|---|---|---|
|
|
165
|
+
| Documentation research | Setup commands and file layout for Playwright's test agents | 1.27 | Finished on its own in 13 turns (~36 min) with commands, roles and file layout |
|
|
166
|
+
| Documentation research, strict | The same, but "do not FINISH until fully validated", including "parameter schemas" | 1.38–1.40 | Its most detailed findings (per-client setup, seed test, agent definition files), but it keeps searching for schemas the docs do not contain and has not finished within an hour |
|
|
167
|
+
| Opinion from several sources | How spiritual traditions view cats, then form an opinion | 1.30 | Six traditions from two sources and a stated opinion, in 18 turns (37 min of model time) |
|
|
168
|
+
| Factual question | Tallest mountain in Africa, height in meters and feet | 1.35, 1.40 | Correct, cited answer in 4 turns (about 12 min of model time) in both versions; before 1.35 it kept reading after finding it |
|
|
169
|
+
| Comparison and recommendation | Python vs Rust for command-line tools; recommend one for a beginner | 1.36 | Cited comparison of performance, learning and Python's libraries, recommending Python, in 16 turns (33 min); Rust's libraries were not covered |
|
|
170
|
+
| List of items | Three free, open-source Photoshop alternatives and the strengths of each | 1.37–1.38 | GIMP, Krita and Darktable with their strengths, all cited, in 9 turns (24 min); 1.37 listed a fourth and added an unrequested opinion, which 1.38 fixes |
|
|
171
|
+
| Step-by-step how-to | Make a sourdough starter, with quantities and what to do each day | 1.36–1.37 | A clear plan in 7 turns (19 min), but it invented the first water amount; 1.37 stops guessing and flags unsupported numbers, and the agent then went looking for the missing details |
|
|
172
|
+
|
|
173
|
+
## How it works
|
|
174
|
+
|
|
175
|
+
Each turn, the model sees the objective, what it has found so far, a journal of its recent actions and the
|
|
176
|
+
current page, and answers with exactly one JSON action:
|
|
177
|
+
|
|
178
|
+
| Action | What it does |
|
|
179
|
+
|---|---|
|
|
180
|
+
| `SEARCH` | Searches DuckDuckGo (HTML version) and shows a numbered list of results with their real URLs |
|
|
181
|
+
| `NAVIGATE` | Opens a URL taken from the results or from the current page's links |
|
|
182
|
+
| `READ_MORE` | Shows the next part of a long page (pages are read in parts of about 2,500 characters) |
|
|
183
|
+
| `DISCOVER` | Records information from the current page as a finding |
|
|
184
|
+
| `FINISH` | Ends the run (after checking each part of the objective is covered); the final result is then written in a separate step |
|
|
185
|
+
|
|
186
|
+
```mermaid
|
|
187
|
+
flowchart LR
|
|
188
|
+
O[Objective] --> P[Build prompt]
|
|
189
|
+
P --> M[Local model<br/>LM Studio]
|
|
190
|
+
M -->|JSON action| C{Rule checks}
|
|
191
|
+
C -->|refused: cheap retry| M
|
|
192
|
+
C -->|accepted| B[Playwright<br/>Chromium]
|
|
193
|
+
B -->|page text, links| P
|
|
194
|
+
C -->|FINISH| R[research_report.md]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Keeping a small model on track
|
|
198
|
+
|
|
199
|
+
- **Rules enforced in code, not just stated in the prompt.** Repeated searches, visiting the current page,
|
|
200
|
+
empty or duplicate findings and impossible `READ_MORE` requests are refused, and the model is told why.
|
|
201
|
+
Duplicate findings are recognised even when reworded into different lines, punctuation or order.
|
|
202
|
+
- **Cheap retries.** A refused reply is corrected inside the same turn by appending a short note to the
|
|
203
|
+
conversation, instead of wasting a whole turn.
|
|
204
|
+
- **Confirm before leaving.** Leaving a page without recording anything from it triggers one check: record
|
|
205
|
+
something, or repeat the action to leave.
|
|
206
|
+
- **Knowing when it's done.** After every new finding the model is asked whether the objective is now fully
|
|
207
|
+
covered, and if so to finish instead of reading on for extra details.
|
|
208
|
+
- **Progress and objective checks.** After 4 turns without a new finding, and every 8 turns regardless, the
|
|
209
|
+
model is asked to check each part of the objective against its findings, then finish or name what is still
|
|
210
|
+
missing. Finishing itself gets the same part-by-part check (with the number of sources and any unread parts
|
|
211
|
+
of the current page), and a finish whose own check lists a part as "not covered" is sent back to work on it.
|
|
212
|
+
A part that cannot be found after several tries can be reported as missing instead of blocking for good.
|
|
213
|
+
- **Writing is a separate step.** When the agent finishes, one more model call writes the final result from
|
|
214
|
+
only the objective and the recorded findings, under a short list of rules: no guessing or outside knowledge,
|
|
215
|
+
cite findings by number, give exactly as many items as asked for, and add a "My view:" paragraph only when
|
|
216
|
+
the objective asks for an opinion. A small model writes far better when that is its only job, and every
|
|
217
|
+
claim stays traceable to a recorded finding. The report flags any number in the final result that appears
|
|
218
|
+
in none of the findings, the most harmful kind of slip in a how-to.
|
|
219
|
+
- **Error pages are recognised.** A page answering 404, 403 and so on counts as a failed visit, not content.
|
|
220
|
+
- **Readable pages.** Navigation menus, footers and cookie banners are hidden; code blocks and tables are
|
|
221
|
+
never split between parts; links already shown are not repeated. Long pages come with an outline of the
|
|
222
|
+
headings in each part, marking the parts already read, so the agent can jump to the part it needs instead of
|
|
223
|
+
reading in order.
|
|
224
|
+
|
|
225
|
+
### Built for slow hardware
|
|
226
|
+
|
|
227
|
+
On a CPU, reading the prompt is about 90% of the time of every model call, and LM Studio can skip whatever
|
|
228
|
+
part of a prompt matches the start of its previous one. So the agent keeps one growing conversation and only
|
|
229
|
+
appends what changed (a short result, the next page part or a new page), building a fresh prompt only when
|
|
230
|
+
the conversation nears the context limit. The journal uses a compact one-line-per-entry format.
|
|
231
|
+
|
|
232
|
+
## Settings
|
|
233
|
+
|
|
234
|
+
| Environment variable | Default | Meaning |
|
|
235
|
+
|---|---|---|
|
|
236
|
+
| `LMSTUDIO_BASE_URL` | `http://localhost:1234/v1` | Address of the OpenAI-compatible server |
|
|
237
|
+
| `LMSTUDIO_MODEL` | `qwen2.5-7b-instruct` | Model identifier as the server lists it |
|
|
238
|
+
| `LMSTUDIO_API_KEY` | `lm-studio` | API key, if your server requires one |
|
|
239
|
+
| `LMSTUDIO_CONTEXT_LENGTH` | `8192` | Context length the model is loaded with; the conversation budget follows it |
|
|
240
|
+
|
|
241
|
+
Behaviour limits (part size, retry counts, check intervals and so on) are named constants at the top of
|
|
242
|
+
`agent_browser.py`, each with a comment explaining it.
|
|
243
|
+
|
|
244
|
+
## Performance
|
|
245
|
+
|
|
246
|
+
Measured on an Intel i5-9500 (6 cores, no GPU) with Qwen2.5-7B-Instruct Q4_K_M at an 8,192-token context:
|
|
247
|
+
|
|
248
|
+
| Kind of turn | Typical time |
|
|
249
|
+
|---|---|
|
|
250
|
+
| Follow-up on the same page (finding recorded, cheap retry) | 35–60 s |
|
|
251
|
+
| Next part of a page, or a new page appended | 100–280 s |
|
|
252
|
+
| First turn of a run | 45–110 s |
|
|
253
|
+
| Fresh prompt after the context budget is reached | 160–380 s (longest with long pages) |
|
|
254
|
+
| Writing the final result (once, at the end) | 50–190 s, depending on how much was found |
|
|
255
|
+
|
|
256
|
+
Whole runs from the results table: a factual question in about 12 minutes of model time, a list of three items
|
|
257
|
+
in 24, a comparison in 33. A GPU or a smaller model will be much faster.
|
|
258
|
+
|
|
259
|
+
## FAQ
|
|
260
|
+
|
|
261
|
+
**Does it need a GPU?**
|
|
262
|
+
No. It was developed entirely on a CPU. A GPU just makes each turn faster.
|
|
263
|
+
|
|
264
|
+
**Which models work?**
|
|
265
|
+
It was developed and tested with Qwen2.5-7B-Instruct (Q4_K_M). Any instruction-tuned model that LM Studio
|
|
266
|
+
serves should work, as long as the server supports `response_format` with a JSON schema (LM Studio 0.3 and
|
|
267
|
+
later). Set `LMSTUDIO_MODEL` and `LMSTUDIO_CONTEXT_LENGTH` to match. Reports with other models are very welcome.
|
|
268
|
+
|
|
269
|
+
**Can I use another OpenAI-compatible server instead of LM Studio?**
|
|
270
|
+
Probably: point `LMSTUDIO_BASE_URL` at it. It has only been tested with LM Studio, and the speed tricks rely
|
|
271
|
+
on the server reusing cached prompt prefixes (llama.cpp-based servers do).
|
|
272
|
+
|
|
273
|
+
**Is anything sent to the internet?**
|
|
274
|
+
No AI service is involved, and nothing about your run is uploaded. The agent does browse the real web,
|
|
275
|
+
though: search queries go to DuckDuckGo, and pages it opens load normally, as if you visited them yourself.
|
|
276
|
+
|
|
277
|
+
**Where are the results?**
|
|
278
|
+
In the folder you ran it from: `research_report.md` has the final result and every finding with its source,
|
|
279
|
+
and `research_log.txt` has the full journal of actions and reasons, updated after every turn.
|
|
280
|
+
|
|
281
|
+
**Why does a turn take minutes?**
|
|
282
|
+
On a CPU the model reads the prompt slowly (about 8 tokens per second on the development machine), so a
|
|
283
|
+
turn that brings in a new page takes a few minutes. See [Performance](#performance) and
|
|
284
|
+
[Built for slow hardware](#built-for-slow-hardware).
|
|
285
|
+
|
|
286
|
+
## Limitations
|
|
287
|
+
|
|
288
|
+
- **Tried on six kinds of task so far** (see [results](#results-on-different-kinds-of-tasks)): documentation
|
|
289
|
+
research, an opinion from several sources, a factual question, a comparison, a how-to and a list. Each one
|
|
290
|
+
exposed something that did not generalise and was fixed; other kinds of tasks may expose more.
|
|
291
|
+
- **Reading without recording.** The model sometimes reads a long page part by part without recording the
|
|
292
|
+
relevant parts, even with the outline in front of it. This is currently its main weakness.
|
|
293
|
+
- **A small model's judgement is the ceiling.** It sometimes drifts to loosely related pages, prefers
|
|
294
|
+
secondary sources or stays with one source too long, and results vary with the first pages a search turns
|
|
295
|
+
up; every finding is in `research_report.md` regardless.
|
|
296
|
+
- **Very strict objectives can keep it searching.** An objective that forbids finishing until everything is
|
|
297
|
+
"fully validated" can keep the agent looking for something the web may not contain. It is told to finish
|
|
298
|
+
and name what it could not find after looking in several places, but a 7B model does not always judge
|
|
299
|
+
when that point has come; the turn limit (100) and Ctrl+C still apply, and the report is always current.
|
|
300
|
+
- **Check the citations.** The final result only uses recorded findings, but a 7B model sometimes puts the
|
|
301
|
+
wrong number on a citation, so verify a claim against the listed findings before relying on it.
|
|
302
|
+
- **Some sites refuse automated browsers** (HTTP 403). The agent respects that and does not try to disguise
|
|
303
|
+
itself; it moves on to other sources.
|
|
304
|
+
- **Reading only.** The agent searches, opens pages and reads them. It does not click, fill in forms or sign in.
|
|
305
|
+
- **Web pages go into the prompt.** A page can contain text written to manipulate the model (prompt
|
|
306
|
+
injection), so treat findings as unverified. See [SECURITY.md](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/SECURITY.md).
|
|
307
|
+
- **One search provider.** DuckDuckGo's HTML search occasionally returns an error page; the agent retries once.
|
|
308
|
+
|
|
309
|
+
## Roadmap
|
|
310
|
+
|
|
311
|
+
- [x] Include every finding in the final report, not only the model's own summary (1.29)
|
|
312
|
+
- [x] Write the final result in a separate, rule-bound step and flag unsupported numbers (1.32–1.38)
|
|
313
|
+
- [x] Finish as soon as the objective is covered (1.35)
|
|
314
|
+
- [ ] Get the model to record relevant parts while it reads long pages
|
|
315
|
+
- [ ] Let very strict objectives end with the gaps named instead of searching indefinitely
|
|
316
|
+
- [ ] Try more kinds of objectives (six so far) and adjust the rules that don't generalise
|
|
317
|
+
- [ ] Make fresh prompts (the slowest kind of turn) cheaper still (31% cheaper since 1.34)
|
|
318
|
+
- [ ] Interacting with pages (clicking, forms) for tasks beyond reading
|
|
319
|
+
|
|
320
|
+
Ideas and requests are welcome in [issues](https://github.com/SnowFXXX/LocalAgentBrowser/issues).
|
|
321
|
+
|
|
322
|
+
## Testing
|
|
323
|
+
|
|
324
|
+
The test suite runs in about a second and needs neither LM Studio nor a browser: the model and the website
|
|
325
|
+
are replaced by scripted fakes, including an end-to-end run of the main loop.
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
pip install -r requirements-dev.txt
|
|
329
|
+
python -m pytest
|
|
330
|
+
python -m ruff check .
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
To try the real agent with a fixed objective and a time limit, logging the time and tokens of every model
|
|
334
|
+
call:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
python tools/live_test.py "Your objective here" --minutes 25
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Contributing
|
|
341
|
+
|
|
342
|
+
Contributions are welcome! See [CONTRIBUTING.md](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/CONTRIBUTING.md) for setup and guidelines, and please follow
|
|
343
|
+
the [Code of Conduct](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/CODE_OF_CONDUCT.md). Security issues: see [SECURITY.md](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/SECURITY.md).
|
|
344
|
+
|
|
345
|
+
## Project history
|
|
346
|
+
|
|
347
|
+
Every version is a tagged commit, and [CHANGELOG.md](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/CHANGELOG.md) describes what changed in each one and
|
|
348
|
+
why, with the measurements behind the decisions.
|
|
349
|
+
|
|
350
|
+
## Acknowledgements
|
|
351
|
+
|
|
352
|
+
Versions 1.13 onwards were developed together with [Claude](https://www.anthropic.com/claude) (Anthropic),
|
|
353
|
+
working in Claude Code; those commits list Claude as co-author. Built on [LM Studio](https://lmstudio.ai),
|
|
354
|
+
[Playwright](https://playwright.dev/python/) and the [OpenAI Python library](https://github.com/openai/openai-python).
|
|
355
|
+
|
|
356
|
+
## License
|
|
357
|
+
|
|
358
|
+
[MIT](https://github.com/SnowFXXX/LocalAgentBrowser/blob/main/LICENSE) © 2026 SnowFX
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
agent_browser.py,sha256=lSsu3OvEtw6tTtaUrPl9kWAU6hh5LA2qO8LpXl_TwZs,66634
|
|
2
|
+
localagentbrowser-1.41.dist-info/licenses/LICENSE,sha256=slSv3Zs6aGs-yJGbm7Nz0r0thJ6ABUwkEyXUWbGKZ7M,1063
|
|
3
|
+
localagentbrowser-1.41.dist-info/METADATA,sha256=zMJUMxtSupTFMeLGdpuZfIxV1i54Hb8g68NEI3Tew5Y,21604
|
|
4
|
+
localagentbrowser-1.41.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
5
|
+
localagentbrowser-1.41.dist-info/entry_points.txt,sha256=M8N-YjMwQbP0FqW3OdTjvn8f76k77HiRe9ay0ervTBc,56
|
|
6
|
+
localagentbrowser-1.41.dist-info/top_level.txt,sha256=dNG4hD8lHlr8VzLft2BjK6iYu7oEpasb7eROGeAWBlQ,14
|
|
7
|
+
localagentbrowser-1.41.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
agent_browser
|