Agent Browser is an open-source browser automation layer for AI agents. It gives coding agents, deploy agents, and research agents a safe way to inspect web pages, capture screenshots, read console and network signals, and validate web apps.
Modern AI agents need a browser tool that is:
- safe by default
- easy to inspect
- usable from CLI and MCP
- suitable for testing, deploy validation, and page understanding
Agent Browser provides that foundation without credential automation, anti-detection tooling, or private-network scraping.
Agent Browser fits into the Talocode stack:
- Codra CLI — the coding agent
- Codra Action — GitHub automation
- Codra Deploy — deployment and runtime validation
- Agent Browser — browser automation and web inspection
Typical uses:
- AI agents test web apps
- Codra checks frontend behavior
- Codra Deploy validates live deployments
- LaunchPix captures landing pages
- TeraAI reads and understands web pages
- Developers run browser automation through CLI and MCP
npm install -g @talocode/agent-browser
npx playwright install chromiumFor local development from source:
npm install
npm run build
npx playwright install chromiumnpm install
npm run dev -- --help
npm run typecheck
npm run test
npm run buildLocal development against localhost:
export AGENT_BROWSER_ALLOW_LOCALHOST=1agent-browser --help
agent-browser check https://example.com
agent-browser check https://example.com --screenshot-out ./deploy.png --vision --json
agent-browser navigate https://example.com
agent-browser snapshot https://example.com
agent-browser screenshot https://example.com --out ./example.png
agent-browser console https://example.com
agent-browser network https://example.com
agent-browser session create --name "deploy-check"
agent-browser navigate https://example.com --session <sessionId>
agent-browser session report <sessionId> --format markdown
agent-browser api --host 127.0.0.1 --port 7340
agent-browser mcpMachine-readable output:
agent-browser --json snapshot https://example.comScreenshot overwrite protection:
agent-browser screenshot https://example.com --out ./example.png --forceStart the MCP server:
agent-browser mcpAvailable tools:
browser_navigatebrowser_snapshotbrowser_screenshotbrowser_consolebrowser_networkbrowser_checkbrowser_session_createbrowser_session_listbrowser_session_closebrowser_session_tracebrowser_session_report
Each tool validates URL safety and returns structured JSON results. Existing browser tools accept optional sessionId for multi-step trace recording.
See docs/SESSIONS.md for session lifecycle, trace format, and v0.2 limitations.
browser_check runs the deploy-friendly smoke check preset and returns a normalized pass/warn/fail protocol result. Optional vision uses the Python module when available.
Agent Browser blocks unsafe protocols and private network targets by default. Localhost is disabled unless AGENT_BROWSER_ALLOW_LOCALHOST=1 is set for local development.
Sensitive query parameters are redacted from network output. The project does not store secrets, automate login, bypass CAPTCHAs, or provide anti-detection behavior.
See docs/SAFETY.md for details.
See docs/ARCHITECTURE.md.
Agent Browser also includes an optional Python package for screenshot visual inspection. OpenCV is not required for normal TypeScript CLI or MCP usage.
cd python/agent-browser-vision
pip install -e ".[dev]"
agent-browser vision inspect ./screenshot.png --json
agent-browser vision diff ./before.png ./after.png --out ./diff.png --jsonYou can also call the Python CLI directly:
agent-browser-vision inspect ./screenshot.png --json
agent-browser-vision diff ./before.png ./after.png --out ./diff.png --jsonThe vision module can detect blank or blurry screenshots, compare before/after captures, save diff images, and flag major layout shifts.
See docs/VISION.md for details.
Deploy-friendly preset for agents, Codra CLI, and Codra Deploy:
agent-browser check https://example.com
agent-browser check https://example.com --screenshot-out ./deploy.png --vision --json
codra browser check https://example.comSee docs/CHECKS.md for the pass/warn/fail model.
Run deploy-friendly smoke checks in any external repository:
- uses: talocode/agent-browser@v0
with:
url: https://example.com
screenshot-out: agent-browser-screenshot.png
vision: "false"
upload-artifact: "true"Pin an immutable release when needed:
- uses: talocode/agent-browser@v0.1.0
with:
url: https://example.comExternal verification passed from talocode/agent-browser-action-test using talocode/agent-browser@v0.
Copy a full external verification workflow from docs/examples/external-verification.md or examples/github-action/external-smoke.yml.
For Codra Deploy post-deploy checks, see docs/CODRA_DEPLOY_INTEGRATION.md.
See also docs/GITHUB_ACTION.md, docs/RELEASE.md, and examples/github-action/.
Persistent local sessions for multi-step agent workflows with step tracing and JSON/Markdown reports:
agent-browser session create --json
agent-browser check https://example.com --session <sessionId> --screenshot-out ./deploy.png --json
agent-browser session trace <sessionId> --json
agent-browser session report <sessionId> --format markdownSee docs/SESSIONS.md.
Run the hosted API locally for HTTP-based browser validation. The CLI and MCP remain local-first — the hosted API is optional.
export TALOCODE_API_KEY=replace_me
agent-browser api --host 127.0.0.1 --port 7340Managed Talocode cloud is not deployed yet; v0.1 is for self-hosted/local use. See docs/HOSTED_API.md and examples/api/.
- Deeper Codra and Codra Deploy integrations
- True cross-process browser state reuse for sessions
- Accessibility-oriented snapshots
- CI-friendly smoke check presets
- Optional form inspection without credential automation
MIT