agentrhq/webcmd

Self-learning agent browser

What is Webcmd?

Webcmd is a self‑learning browser automation layer aimed at AI agents. It lets an agent control a real browser (via Playwright‑style commands) while automatically building a local “sitemap memory” of the pages, actions, and APIs it encounters. The next time an agent needs to work on the same site, it can reuse that memory instead of re‑exploring the whole site, cutting token usage and cost by up to 90%.


Core Concepts

Layer When it helps What it provides
0. Live browser control The site is new or the task needs fresh data. webcmd browser lets agents click, type, capture network calls, and scrape content in a real browser session.
1. Sitemap memory The site is known but the exact workflow isn’t. Webcmd records a sitemap of observed pages, states, actions, and fallback paths. This memory is stored locally (or in Webcmd Cloud) and can be queried by later agents.

How It Works (High‑level)

  1. Start a session – A profile stores cookies; a session is an isolated browser window inside that profile.
  2. Run live commands – Agents send a Playwright‑style script (or simple CLI commands) to the session.
  3. Learn silently – While the browser runs, Webcmd extracts useful navigation facts (links, forms, API calls, page titles, etc.) and adds them to the local memory.
  4. Reuse memory – Future agents can ask Webcmd for the stored sitemap or specific page data, avoiding the need to re‑navigate.
  5. Optional Cloud – The first access can pull a seed from Webcmd Cloud; subsequent learning stays on the user’s machine.

Quick Start (from the README)

# Install globally (requires Node 20.6+)
npm install -g @agentrhq/webcmd

# Add the browser skill (choose Claude, Codex, etc.)
webcmd skills add

After the skill is installed you can run commands such as:

Use webcmd to research the latest discussions about browser automation across Hacker News and Reddit, then return a concise comparison with source links.

The agent will launch a real browser, perform the search, and store the navigation context for later reuse.


Example Use Cases

  • Research aggregation – Pull titles, abstracts, and URLs from PubMed, Reddit, or Hacker News and return a tidy summary.
  • E‑commerce monitoring – Look up a part number on Grainger, fetch price/stock info, and combine it with an SAP purchase‑order status.
  • Social media curation – With a logged‑in LinkedIn profile, summarize unread messages; with an X/Twitter profile, collect recent bookmarks.
  • AI‑tool retrieval – Fetch past ChatGPT or Claude conversations, notebooks, or generated assets.
  • Booking & shopping – Compare product availability, prices, or appointment slots across Amazon, Blinkit, Practo, etc.

Benchmarks

Webcmd was evaluated on the BU Bench V1 100‑task browser automation suite. It achieved:

  • 67 % accuracy (highest among tested tools)
  • $0.255 cost per completed task (lowest)
  • 9.8 agent turns per task (fewest) The benchmark used the same Pi controller, Codex gpt‑5.4 judge, and CloakBrowser engine for all tools, making the comparison fair.

Installation & Basic Commands

Command Purpose
webcmd skills add Install a browser‑skill harness (Claude, Codex, custom).
webcmd --profile <name> session create "<desc>" -f json Create a new isolated session; returns a session ID.
webcmd --profile <name> --session <id> browser run --file explore.js Execute a Playwright‑style script inside the session.
webcmd --profile <name> --session <id> browser tabs List open tabs in the session.
webcmd --profile <name> --session <id> browser run --stdin Pipe a single‑line script (e.g., return await page.title();).
webcmd --profile <name> session close <id> Close the session and clean up resources.

Limitations & Current Status

  • Beta / not stable – The project is under active development; APIs may change.
  • Local memory only – Persistent sharing across machines requires the optional Webcmd Cloud (still in development).
  • Requires a real browser – Uses Playwright under the hood, so it needs a headless or headed browser environment.
  • Agent‑specific prompting – The tool is designed to be invoked from LLM prompts; raw CLI usage is possible but less ergonomic.

License

Apache 2.0 (see LICENSE).


Where to Learn More


TL;DR

Webcmd gives AI agents a live browser + memory combo: agents can perform real‑time web actions while the system silently records a reusable sitemap, dramatically reducing repeated navigation and token cost for subsequent tasks. It’s a Node‑based CLI built on Playwright, targeting research, social, shopping, and AI‑tool automation scenarios.

Related

  • Project
  • Project
  • Project
  • Project
  • Project