Lightpanda Browser logo

Lightpanda Browser

Community
Mathews-Tom
lightpanda-browser

Lightweight headless browser automation via Lightpanda and agent-browser CLI: 9x lower memory, 11x faster than Chromium, for scraping and DOM interaction without rendering. Triggers on: "lightpanda", "lightweight browser", "fast headless browser", "headless scraping", "low memory browser", "browser without rendering".

Overview

PublisherMathews-Tom
Repositoryarmory
Skill namelightpanda-browser
Stars
318
Forks
47
Bundled files
7
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Mathews-Tom on GitHub. Read the source before you install it.

Installation

Install the Lightpanda Browser AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Mathews-Tom/armory.git /tmp/armory
mkdir -p .claude/skills
cp -r /tmp/armory/skills/lightpanda-browser .claude/skills/lightpanda-browser
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Lightpanda Browser in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Lightpanda Browser on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Lightpanda Browser is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Lightpanda Browser — Fast Headless Automation

Headless browser automation using Lightpanda as the backend engine, controlled through the agent-browser CLI via CDP (Chrome DevTools Protocol).

When to use this over agent-browser:

Use LightpandaUse agent-browser (Chromium)
Web scraping / data extractionScreenshots, PDFs, visual testing
Form automation / submissionVideo recording / visual debugging
API response inspectionCSS layout verification
DOM traversal / content parsingMobile device emulation (iOS)
CI environments with limited RAMFull browser extension support
High-volume parallel sessionsSites requiring full rendering

Triggers:

  • "lightpanda", "lightweight browser", "fast headless"
  • "scrape with low memory", "headless scraping"
  • "browser without rendering", "DOM-only browser"
  • "fast browser automation", "efficient scraping"
  • "is lightpanda faster than chromium?", "which headless browser uses less memory?"
  • "how do I scrape without chromium?", "can I run a browser with less RAM?"
  • Any browser task where visual output is not needed

Prerequisites

Install Lightpanda

bash
# macOS (Apple Silicon)
curl -fsSL https://github.com/nichochar/install-lightpanda/raw/main/install.sh | bash

# Or build from source
git clone https://github.com/lightpanda-io/browser.git
cd browser && zig build -Doptimize=ReleaseSafe

Install agent-browser (if not already present)

bash
brew install agent-browser

Verify installation

bash
lightpanda --version
agent-browser --version

Core Workflow

Every session follows this lifecycle:

1. Start Lightpanda daemon (CDP server)
2. Connect agent-browser via --cdp
3. Navigate, snapshot, interact
4. Stop daemon when done

Step 1 — Start Lightpanda

bash
# Start Lightpanda CDP server on port 9222 (background)
lightpanda serve --host 127.0.0.1 --port 9222 &
LIGHTPANDA_PID=$!

# Wait for CDP to be ready
sleep 1

Step 2 — Connect and Automate

bash
# All agent-browser commands work via --cdp flag
agent-browser --cdp 9222 open https://example.com
agent-browser --cdp 9222 snapshot -i
agent-browser --cdp 9222 fill @e1 "search query"
agent-browser --cdp 9222 click @e2
agent-browser --cdp 9222 snapshot -i  # Re-snapshot after navigation

Step 3 — Cleanup

bash
agent-browser --cdp 9222 close
kill $LIGHTPANDA_PID 2>/dev/null

Supported Commands

All commands below are invoked as agent-browser --cdp <port> <command>.

Navigation

bash
agent-browser --cdp 9222 open <url>
agent-browser --cdp 9222 back
agent-browser --cdp 9222 forward
agent-browser --cdp 9222 reload
agent-browser --cdp 9222 close

Snapshot (DOM Analysis)

bash
agent-browser --cdp 9222 snapshot -i         # Interactive elements with refs
agent-browser --cdp 9222 snapshot -i -C      # Include cursor-interactive elements
agent-browser --cdp 9222 snapshot -s "#main"  # Scope to CSS selector
agent-browser --cdp 9222 snapshot -i --json   # JSON output for parsing

Interaction (use @refs from snapshot)

bash
agent-browser --cdp 9222 click @e1
agent-browser --cdp 9222 dblclick @e1
agent-browser --cdp 9222 fill @e2 "text"
agent-browser --cdp 9222 type @e2 "text"
agent-browser --cdp 9222 press Enter
agent-browser --cdp 9222 select @e1 "option"
agent-browser --cdp 9222 check @e1
agent-browser --cdp 9222 hover @e1
agent-browser --cdp 9222 scroll down 500
agent-browser --cdp 9222 drag @e1 @e2
agent-browser --cdp 9222 upload @e1 file.pdf

Get Information

bash
agent-browser --cdp 9222 get text @e1        # Element text
agent-browser --cdp 9222 get html @e1        # innerHTML
agent-browser --cdp 9222 get value @e1       # Input value
agent-browser --cdp 9222 get attr @e1 href   # Attribute
agent-browser --cdp 9222 get title           # Page title
agent-browser --cdp 9222 get url             # Current URL
agent-browser --cdp 9222 get count ".item"   # Count elements

Wait

bash
agent-browser --cdp 9222 wait @e1                     # Wait for element
agent-browser --cdp 9222 wait 2000                    # Wait milliseconds
agent-browser --cdp 9222 wait --text "Success"        # Wait for text
agent-browser --cdp 9222 wait --url "**/dashboard"    # Wait for URL
agent-browser --cdp 9222 wait --load networkidle      # Wait for network idle
agent-browser --cdp 9222 wait --fn "window.ready"     # Wait for JS condition

Cookies and Storage

bash
agent-browser --cdp 9222 cookies
agent-browser --cdp 9222 cookies set name value
agent-browser --cdp 9222 cookies clear
agent-browser --cdp 9222 storage local
agent-browser --cdp 9222 storage local set key value

Network Interception

bash
agent-browser --cdp 9222 network route <url>              # Intercept
agent-browser --cdp 9222 network route <url> --abort      # Block
agent-browser --cdp 9222 network route <url> --body '{}'  # Mock response
agent-browser --cdp 9222 network requests                 # View tracked
agent-browser --cdp 9222 network requests --filter api    # Filter

JavaScript Execution

bash
agent-browser --cdp 9222 eval "document.title"
agent-browser --cdp 9222 eval -b "<base64>"
cat script.js | agent-browser --cdp 9222 eval --stdin

Semantic Locators

bash
agent-browser --cdp 9222 find text "Sign In" click
agent-browser --cdp 9222 find label "Email" fill "user@test.com"
agent-browser --cdp 9222 find role button click --name "Submit"
agent-browser --cdp 9222 find testid "submit-btn" click

Tabs

bash
agent-browser --cdp 9222 tab                 # List tabs
agent-browser --cdp 9222 tab new [url]       # New tab
agent-browser --cdp 9222 tab 2               # Switch tab
agent-browser --cdp 9222 tab close           # Close tab

Frames

bash
agent-browser --cdp 9222 frame "#iframe"     # Enter iframe
agent-browser --cdp 9222 frame main          # Back to main

State Management

bash
agent-browser --cdp 9222 state save auth.json    # Save session state
agent-browser --cdp 9222 state load auth.json    # Restore session state

Unsupported Commands

Lightpanda does not have a rendering engine. These commands will fail or produce empty output:

CommandReasonAlternative
screenshotNo visual renderingUse get text / get html for content
pdfNo CSS layout engineUse get html and convert externally
record start/stopNo visual output to recordUse network request logs
highlightNo visual renderingUse snapshot -i to identify elements
set deviceNo viewport emulationSet user-agent via set headers
set mediaNo CSS media query supportN/A
get stylesNo computed stylesParse raw HTML/CSS
get boxNo layout computationN/A
is visibleNo visibility computationCheck DOM presence instead

Common Patterns

High-Volume Scraping

bash
# Start Lightpanda — uses ~60MB vs ~550MB for Chromium
lightpanda serve --host 127.0.0.1 --port 9222 &
LIGHTPANDA_PID=$!
sleep 1

URLS=("https://site.com/page/1" "https://site.com/page/2" "https://site.com/page/3")
for url in "${URLS[@]}"; do
  agent-browser --cdp 9222 open "$url"
  agent-browser --cdp 9222 wait --load networkidle
  agent-browser --cdp 9222 get text body >> output.txt
  echo "---" >> output.txt
done

kill $LIGHTPANDA_PID 2>/dev/null

Form Automation

bash
lightpanda serve --host 127.0.0.1 --port 9222 &
LIGHTPANDA_PID=$!
sleep 1

agent-browser --cdp 9222 open https://example.com/form
agent-browser --cdp 9222 snapshot -i
agent-browser --cdp 9222 fill @e1 "Jane Doe"
agent-browser --cdp 9222 fill @e2 "jane@example.com"
agent-browser --cdp 9222 select @e3 "California"
agent-browser --cdp 9222 check @e4
agent-browser --cdp 9222 click @e5
agent-browser --cdp 9222 wait --load networkidle
agent-browser --cdp 9222 snapshot -i  # Verify result

kill $LIGHTPANDA_PID 2>/dev/null

Authenticated Session

bash
lightpanda serve --host 127.0.0.1 --port 9222 &
LIGHTPANDA_PID=$!
sleep 1

# Login and save state
agent-browser --cdp 9222 open https://app.example.com/login
agent-browser --cdp 9222 snapshot -i
agent-browser --cdp 9222 fill @e1 "$USERNAME"
agent-browser --cdp 9222 fill @e2 "$PASSWORD"
agent-browser --cdp 9222 click @e3
agent-browser --cdp 9222 wait --url "**/dashboard"
agent-browser --cdp 9222 state save auth.json

# Reuse state later (new session)
agent-browser --cdp 9222 state load auth.json
agent-browser --cdp 9222 open https://app.example.com/dashboard
agent-browser --cdp 9222 snapshot -i

kill $LIGHTPANDA_PID 2>/dev/null

API Response Inspection

bash
lightpanda serve --host 127.0.0.1 --port 9222 &
LIGHTPANDA_PID=$!
sleep 1

# Intercept API calls
agent-browser --cdp 9222 open https://app.example.com
agent-browser --cdp 9222 network requests --filter "/api/"

# Or mock API responses for testing
agent-browser --cdp 9222 network route "**/api/users" --body '{"users": []}'
agent-browser --cdp 9222 open https://app.example.com/users
agent-browser --cdp 9222 snapshot -i

kill $LIGHTPANDA_PID 2>/dev/null

Parallel Sessions on Different Ports

bash
# Launch multiple Lightpanda instances for true parallelism
lightpanda serve --host 127.0.0.1 --port 9222 &
PID1=$!
lightpanda serve --host 127.0.0.1 --port 9223 &
PID2=$!
sleep 1

agent-browser --cdp 9222 open https://site-a.com &
agent-browser --cdp 9223 open https://site-b.com &
wait

agent-browser --cdp 9222 get text body > site-a.txt
agent-browser --cdp 9223 get text body > site-b.txt

kill $PID1 $PID2 2>/dev/null

Environment Variables

bash
LIGHTPANDA_HOST="127.0.0.1"    # Bind address (default: 127.0.0.1)
LIGHTPANDA_PORT="9222"          # CDP port (default: 9222)

Troubleshooting

Lightpanda won't start

bash
# Check if port is in use
lsof -i :9222
# Kill existing process
kill $(lsof -t -i :9222) 2>/dev/null

CDP connection refused

bash
# Verify Lightpanda is listening
curl -s http://127.0.0.1:9222/json/version
# Expected: JSON with browser info

Command fails with "not supported"

Lightpanda is in beta. If a CDP method is not yet implemented:

  1. Check the Lightpanda status page for supported APIs
  2. Fall back to agent-browser (Chromium) for that specific operation
  3. File an issue at https://github.com/lightpanda-io/browser/issues

JavaScript execution errors

Lightpanda uses V8 but not all Web APIs are implemented. If eval fails:

  1. Check if the API is listed in Lightpanda's supported features
  2. Use simpler DOM operations (get text, get html) instead of complex JS

Performance Benchmarks

Reference numbers for choosing between Lightpanda and Chromium. Measured on typical scraping workloads.

MetricLightpandaChromium (Playwright)When It Matters
Memory per page~60MB~550MBParallel sessions, CI runners, constrained environments
Cold start<100ms~2sShort-lived scripts, serverless, high-frequency invocations
DOM-only page load~50ms~300msBulk scraping (difference compounds over hundreds of pages)
Binary size~15MB~300MBDocker images, CI caching, disk-constrained hosts
JS execution (V8)EquivalentEquivalentNo difference — same engine
Full page renderN/A~500msLightpanda cannot render — use Chromium

Decision Thresholds

ScenarioRecommendation
< 10 pages, need screenshotsChromium — overhead is negligible
10-100 pages, text extraction onlyLightpanda — saves 5-50GB RAM
100+ pages, parallel sessionsLightpanda — Chromium hits memory limits
CI with 2GB RAM limitLightpanda — fits 30+ pages vs 3 with Chromium
Visual regression testingChromium — Lightpanda cannot produce images
Form submission + response validationEither — Lightpanda is faster but both work

Calibration Rules

  1. Always start Lightpanda before agent-browser commands. CDP connection fails silently if the daemon is not running — verify with curl -sf http://127.0.0.1:9222/json/version before proceeding.
  2. Re-snapshot after every navigation. Refs (@e1, @e2) are invalidated when the page changes — this is inherited from agent-browser, not Lightpanda-specific.
  3. Prefer get text over eval for content extraction. Lightpanda's Web API surface is incomplete — document.querySelector works but complex APIs (IntersectionObserver, getComputedStyle) do not.
  4. Use separate ports for parallel sessions, not --session. Lightpanda instances are single-threaded — multiple ports give true parallelism, --session multiplexes on one instance.
  5. Fall back to Chromium explicitly, not silently. If a command fails with "not supported", switch to agent-browser (no --cdp flag) for that operation. Do not retry or suppress the error.
  6. Kill the daemon on exit. Use trap cleanup EXIT in scripts to prevent orphaned Lightpanda processes consuming port 9222.
  7. Check Lightpanda release notes before upgrading. Beta software — CDP method coverage changes between versions. Run agent-browser --cdp 9222 snapshot -i on a known page as a smoke test after updates.

Deep-Dive Documentation

ReferenceWhen to Use
references/commands.mdFull command reference with CDP flag usage
references/lightpanda-setup.mdInstallation, configuration, build from source
references/compatibility.mdSupported vs unsupported CDP methods and Web APIs

Ready-to-Use Templates

TemplateDescription
templates/scrape-session.shStart daemon, scrape pages, cleanup
templates/form-submit.shForm fill + submission with validation
templates/parallel-extract.shMulti-port parallel data extraction

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Lightpanda Browser AI skill do?

Lightweight headless browser automation via Lightpanda and agent-browser CLI: 9x lower memory, 11x faster than Chromium, for scraping and DOM interaction without rendering. Triggers on: "lightpanda", "lightweight browser", "fast headless browser", "headless scraping", "low memory browser", "browser without rendering".

Why use Lightpanda Browser on TypingMind?

Because you install it once and use it with any model. Lightpanda Browser is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Lightpanda Browser in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Mathews-Tom/armory/tree/main/skills/lightpanda-browser. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Lightpanda Browser?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Lightpanda Browser?

As many as you like. As long as a model supports skills, you can use Lightpanda Browser with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Lightpanda Browser AI skill free?

Yes. It is published on GitHub by Mathews-Tom under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇