Surfagent: Fast Browser Automation for AI Agents

Surfagent is an open-source NPM package using Chrome CDP for non-headless browser control, enabling AI agents to navigate logged-in sites like Discord, X, YouTube, and Google Sheets via a 'recon' command that maps pages for quick, autonomous actions without APIs.

Recon Command Unlocks Rapid Page Adaptation

Surfagent's core strength is the 'recon' command, which scans a page to map elements like channels, posts, search fields, and buttons, allowing AI agents to navigate dynamically without predefined selectors. This cuts action speed dramatically—tasks like searching X for 'Claude Mitous', switching to 'latest' tab, or finding YouTube transcripts complete in seconds. For Discord, recon identifies servers and channels to fetch the last 200 messages from 'general' chat, providing full context for agents without API keys. On Hacker News, it lists top posts and clicks into specifics like 'distributed DuckDB instance'. Trade-off: requires a visible browser instance (e.g., Mac mini), not headless yet.

Autonomous Research and Data Entry Workflows

Combine recon with instructions for end-to-end tasks: agents research API prices for Claude 3.5 Sonnet ($3/$15 per million tokens input/output), GPT-4o ($5/$15), Opus, and Gemini 1.5 Pro, then navigate to a pre-opened Google Sheets, enter data into columns (model, input price, output price), and insert charts comparing costs. It handles scrolling, cell selection (e.g., A1 value commands), and error recovery like page reloads. On YouTube, agents play videos, click 'show transcript', extract full text (e.g., 'Claude 3.5 Sonnet preview autonomously finds zero-day vulnerabilities'), and summarize. For X.com (logged in), search trends, read posts, or draft/post short content like creative takes on Claude Mitous. These skip APIs entirely by leveraging existing sessions.

Simple Setup Powers Custom Pipelines

Install globally with npm i g surf-agent, then run surf-agent start (auto-picks ports if 3000 busy). Integrate into Node.js or agent setups—no extra config for basic use. Open-source on GitHub (AllAboutAI-YT/surfagent) with agent.md and Claude.md files for prompts; contribute PRs for improvements. Demoed in VS Code/Cursor on Cloud Code, it reads docs via recon for self-onboarding. Limitations: non-headless needs display; early-stage with minor glitches (e.g., incomplete Sheets fills). Ideal for passive income pipelines like content recon or social automation on personal hardware.

Summarized by x-ai/grok-4.1-fast via openrouter

7231 input / 1362 output tokens in 10055ms

© 2026 Edge