원클릭으로
browser-automation-agent
Automate web browsers for AI agents using agent-browser CLI with deterministic element selection.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Automate web browsers for AI agents using agent-browser CLI with deterministic element selection.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Write commit messages that capture judgment and decision-making, not just change descriptions. Use when the user wants to elevate their commit history from a log to a record of reasoning, trade-offs, and context.
Debug assistant for error analysis, log interpretation, and performance profiling. Use when user encounters errors, crashes, or performance issues.
Git workflow assistant for branching, commits, PRs, and conflict resolution. Use when user asks about git strategy, branch management, or PR workflow.
Detect project type and generate .pi/ configuration. Use when setting up pi for a new project or when user asks to initialize pi config.
Fetch a web page and extract readable text content. Use when user needs to retrieve or read a web page.
Web search via DuckDuckGo. Use when the user needs to look up current information online.
| name | browser-automation-agent |
| description | Automate web browsers for AI agents using agent-browser CLI with deterministic element selection. |
Agent-browser is a headless browser automation CLI designed specifically for AI agents. It provides fast browser control with deterministic element selection through accessibility tree snapshots, making it ideal for agent-driven web automation workflows.
Install options:
# via npm (global)
npm install -g agent-browser
agent-browser install # Downloads Chromium
# via Homebrew (macOS/Linux)
brew install agent-browser
# Verify installation
agent-browser --version
Open a URL and capture the accessibility tree to identify interactive elements.
# Open a webpage
agent-browser open https://example.com
# Get snapshot with element references
agent-browser snapshot
# The snapshot shows elements with @e1, @e2 references
# Example output:
# @e1 button "Sign In"
# @e2 input "Email" (email)
# @e3 input "Password" (password)
Node.js:
const { execSync } = require('child_process');
function browserCommand(cmd) {
return execSync(`agent-browser ${cmd}`, { encoding: 'utf-8' });
}
async function openAndSnapshot(url) {
browserCommand(`open ${url}`);
await new Promise(r => setTimeout(r, 2000)); // Wait for page load
const snapshot = browserCommand('snapshot');
return snapshot; // Returns element tree with references
}
// Usage
// const elements = await openAndSnapshot('https://example.com');
// console.log(elements);
Interact with page elements using deterministic references from snapshots.
# Fill a form field
agent-browser fill @e2 "user@example.com"
agent-browser fill @e3 "password123"
# Click a button
agent-browser click @e1
# Type text into active element
agent-browser type "search query" --enter
# Navigate
agent-browser back
agent-browser forward
agent-browser reload
Node.js:
function fillForm(formData) {
for (const [ref, value] of Object.entries(formData)) {
execSync(`agent-browser fill ${ref} "${value}"`, { encoding: 'utf-8' });
}
}
function clickElement(ref) {
return execSync(`agent-browser click ${ref}`, { encoding: 'utf-8' });
}
// Usage
// fillForm({ '@e2': 'user@example.com', '@e3': 'password123' });
// clickElement('@e1');
Capture screenshots, PDFs, or extract page content.
# Take a screenshot
agent-browser screenshot output.png
# Generate PDF
agent-browser pdf document.pdf
# Get page text content
agent-browser text
# Get HTML source
agent-browser html
# Get specific element attribute
agent-browser attribute @e5 href
Node.js:
function captureScreenshot(filename) {
return execSync(`agent-browser screenshot ${filename}`, { encoding: 'utf-8' });
}
function generatePDF(filename) {
return execSync(`agent-browser pdf ${filename}`, { encoding: 'utf-8' });
}
function getPageText() {
return execSync('agent-browser text', { encoding: 'utf-8' });
}
function getElementAttribute(ref, attr) {
return execSync(`agent-browser attribute ${ref} ${attr}`, { encoding: 'utf-8' }).trim();
}
// Usage
// captureScreenshot('page.png');
// const text = getPageText();
// const link = getElementAttribute('@e10', 'href');
Manage browser sessions, tabs, and persistent state.
# Session management
agent-browser open https://example.com --session myapp
agent-browser close --session myapp
# Tab management
agent-browser open https://example.com --new-tab
agent-browser tabs list
agent-browser tabs switch 0
# Cookie and storage
agent-browser cookies get example.com
agent-browser storage set mykey "myvalue"
agent-browser storage get mykey
# Close browser
agent-browser close
Node.js:
function openSession(url, sessionName) {
return execSync(`agent-browser open ${url} --session ${sessionName}`, { encoding: 'utf-8' });
}
function closeSession(sessionName) {
return execSync(`agent-browser close --session ${sessionName}`, { encoding: 'utf-8' });
}
function manageStorage(action, key, value = null) {
const cmd = value
? `agent-browser storage ${action} ${key} "${value}"`
: `agent-browser storage ${action} ${key}`;
return execSync(cmd, { encoding: 'utf-8' }).trim();
}
// Usage
// openSession('https://app.example.com', 'shopping-session');
// manageStorage('set', 'cart-id', '12345');
// const cartId = manageStorage('get', 'cart-id');
--wait flag for actions that trigger navigation or async updates--session flags to isolate different automation workflowsYou have browser automation capability through agent-browser. When a user asks to automate web interactions:
1. Open the URL with `agent-browser open <url>`
2. Get the accessibility snapshot with `agent-browser snapshot` to identify interactive elements
3. Parse the snapshot output to find element references (like @e1, @e2)
4. Use `fill`, `click`, or `type` commands with element references to interact
5. Use `screenshot` or `pdf` to capture results when requested
6. Always close the browser session with `agent-browser close` when done
For multi-step workflows:
- Wait 1-2 seconds between actions for page updates
- Take snapshots after navigation to get updated element references
- Use sessions (`--session name`) to maintain state across multiple operations
- Extract page text or HTML to verify successful interactions
Always prefer agent-browser over other scraping tools when:
- JavaScript rendering is required
- User interactions (clicks, form fills) are needed
- You need screenshots or visual verification
Error: Chromium not installed:
agent-browser install to download ChromiumError: Element reference not found (@e5):
Error: Timeout waiting for element:
--wait 5000 flag or use delays between commandsPage not fully loaded:
Session conflicts:
agent-browser close --session <name> before starting new onesAgent-browser supports cloud browser providers:
agent-browser --provider browserbaseFor most use cases, local installation is sufficient and avoids external dependencies.