Agent
lightpanda agent lets you drive a headless browser by talking to it. Tell it where to go and what to extract, in plain English or with slash commands, and it controls a real browser to do the work. Then save the session as a script you can replay without an LLM.
Prerequisites
- An API key for an LLM provider, such as Anthropic, OpenAI, or Gemini, or a local Ollama server.
lightpanda agent --no-llmruns without any of these, using slash commands only.
Steps
Install Lightpanda
curl -fsSL https://pkg.lightpanda.io/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"Other options: WSL2 on Windows, Docker, package managers.
Set your provider’s API key
export ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_KEY>Find the full list of providers and env vars in the Agent reference.
Launch the REPL
lightpanda agentRespect robots.txt and avoid high-frequency requests against small sites. Pass --obey-robots to have Lightpanda follow robots.txt for you.
Tell it what you want
❯ go to news.ycombinator.com and get me the top story title and pointsThe agent navigates, extracts, and prints the answer. You can also drive it directly with commands. Here /links prints every link on the current page:
❯ /goto news.ycombinator.com
❯ /linksSave it as a reproducible script
❯ /save <my_script>.jsExit the REPL, then replay the script with Lightpanda, no LLM needed:
lightpanda run <my_script>.jsLearn more about saved scripts and the agent’s commands, providers, and one-shot mode.