mirror of
https://github.com/usestrix/strix.git
synced 2026-08-25 12:22:37 +02:00
chore: trim the idle-timeout comment; show the named-session pattern once
This commit is contained in:
+1
-10
@@ -117,16 +117,7 @@ ENV AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
|
|||||||
ENV AGENT_BROWSER_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
|
ENV AGENT_BROWSER_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
|
||||||
ENV AGENT_BROWSER_ARGS="--disable-blink-features=AutomationControlled,--no-first-run,--no-default-browser-check,--lang=en-US"
|
ENV AGENT_BROWSER_ARGS="--disable-blink-features=AutomationControlled,--no-first-run,--no-default-browser-check,--lang=en-US"
|
||||||
ENV AGENT_BROWSER_SCREENSHOT_DIR=/workspace/.agent-browser-screenshots
|
ENV AGENT_BROWSER_SCREENSHOT_DIR=/workspace/.agent-browser-screenshots
|
||||||
# Reclaim abandoned browsers. Each `--session` name is a separate daemon owning its
|
# Nothing owns a browser's lifecycle, so reclaim idle ones (~340 MB each).
|
||||||
# own Chromium process group — measured at ~340 MB and ~12 processes with one page
|
|
||||||
# open — and nothing in the engine owns a browser's lifecycle: agents drive
|
|
||||||
# `agent-browser` through exec_command, so an agent that finishes, is stopped, or
|
|
||||||
# crashes leaves its browser resident for the life of the sandbox. Upstream
|
|
||||||
# disables the idle timeout by default, which turns a wide fan-out into gigabytes
|
|
||||||
# of stranded Chromium. The daemon relaunches transparently on the next command, so
|
|
||||||
# the only cost of reclamation is losing browser state (see the skill's note on
|
|
||||||
# persisting it). Three minutes is longer than the gap between two browser commands
|
|
||||||
# in an active agent turn; override the env var to tune.
|
|
||||||
ENV AGENT_BROWSER_IDLE_TIMEOUT_MS=180000
|
ENV AGENT_BROWSER_IDLE_TIMEOUT_MS=180000
|
||||||
RUN /home/pentester/.npm-global/bin/agent-browser doctor --offline --quick
|
RUN /home/pentester/.npm-global/bin/agent-browser doctor --offline --quick
|
||||||
|
|
||||||
|
|||||||
@@ -59,10 +59,18 @@ The browser stays running across commands so these feel like a single
|
|||||||
session. Use `agent-browser close` (or `close --all`) when you're done.
|
session. Use `agent-browser close` (or `close --all`) when you're done.
|
||||||
|
|
||||||
The default session is **shared with every other agent in the sandbox** — if
|
The default session is **shared with every other agent in the sandbox** — if
|
||||||
another agent navigates it, your page and your refs are gone from under you. Use
|
another agent navigates it, your page and your refs are gone from under you. So
|
||||||
`--session <your-agent-name>` for your own browser work so nobody else can move
|
claim your own by passing `--session <your-agent-name>` on **every** command:
|
||||||
it. Each session is a separate Chromium (~340 MB) on a shared box, so keep one
|
|
||||||
rather than several, and close it when you're finished with the target.
|
```bash
|
||||||
|
agent-browser --session recon-3 open https://example.com
|
||||||
|
agent-browser --session recon-3 snapshot -i
|
||||||
|
agent-browser --session recon-3 close # when done with the target
|
||||||
|
```
|
||||||
|
|
||||||
|
The examples in the rest of this skill omit `--session` to keep them readable;
|
||||||
|
keep passing yours. Each session is a separate Chromium (~340 MB) on a shared
|
||||||
|
box, so hold one rather than several, and close it when you're finished.
|
||||||
|
|
||||||
A browser left idle for 3 minutes is reclaimed automatically to free memory for
|
A browser left idle for 3 minutes is reclaimed automatically to free memory for
|
||||||
the other agents; the next command relaunches it, but the page, tabs, refs and
|
the other agents; the next command relaunches it, but the page, tabs, refs and
|
||||||
|
|||||||
Reference in New Issue
Block a user