# Advanced Browser Modes ## Headed Debugging ```bash agent-browser --headed open https://example.com agent-browser highlight @e1 agent-browser record start demo.webm agent-browser profiler start agent-browser profiler stop trace.json ``` Or set `AGENT_BROWSER_HEADED=1`. ## Local Files ```bash agent-browser --allow-file-access open file:///path/to/document.pdf agent-browser --allow-file-access open file:///path/to/page.html agent-browser screenshot output.png ``` ## iOS Simulator Requires macOS, Xcode, Appium, and the xcuitest driver. ```bash agent-browser device list agent-browser -p ios --device "iPhone 16 Pro" open https://example.com agent-browser -p ios snapshot -i agent-browser -p ios tap @e1 agent-browser -p ios swipe up agent-browser -p ios screenshot mobile.png agent-browser -p ios close ``` ## Color Scheme ```bash agent-browser --color-scheme dark open https://example.com AGENT_BROWSER_COLOR_SCHEME=dark agent-browser open https://example.com agent-browser set media dark ``` ## Configuration Project config file: `agent-browser.json`. ```json { "headed": true, "proxy": "http://localhost:8080", "profile": "./browser-data" } ``` Priority: user config < project config < environment variables < CLI flags. ## Engine Selection ```bash agent-browser --engine lightpanda open example.com export AGENT_BROWSER_ENGINE=lightpanda ``` Supported engines include `chrome` and `lightpanda`. Lightpanda is faster but lacks some Chrome features such as extensions and profiles.