Using OmniScout with AI agents
Drop-in prompts and skill files for Claude Code, Cursor, Codex, and Kimi to drive OmniScout.
OmniScout is built for AI agents to drive: every command speaks JSON and element refs are stable. Here's how to set it up.
1. Install
pip install omniscout
omniscout install --skillThe --skill flag copies instructions into your agent's skill directory:
| Agent | Location |
|---|---|
| Claude Code | ~/.claude/skills/scout/SKILL.md |
| Cursor | ~/.cursor/skills-cursor/scout/SKILL.md |
| Codex CLI | ~/.codex/skills/scout/SKILL.md |
| Gemini CLI / Antigravity | ~/.gemini/config/skills/scout/SKILL.md |
The agent picks it up automatically on next session. Other agents (Pi, OpenCode, Windsurf, Cline, Copilot Agent Mode, any shell-capable assistant) can paste the bundled SKILL.md into the system prompt.
2. Get ready
omniscout daemon start3. Use JSON everywhere
Set OMNISCOUT_JSON=1 at the start of the loop (or pass --json per call). stdout becomes a structured payload; logs go to stderr:
export OMNISCOUT_JSON=1
omniscout search "robotics simulators"
omniscout browser snapshot | jq '.refs[] | select(.role == "button")'Every response carries enough context (refs, urls, ids) for the next call.
4. Drop a prompt
Research a question
Use OmniScout to research "state of open-source browser agents in 2026" and summarize the top 5 passages with their source URLs.Navigate and click
Open https://news.ycombinator.com using OmniScout, snapshot interactive elements, click the top story, and screenshot the result to /tmp/hn-top.png.Log in once and reuse
Run `omniscout browser login https://github.com --profile work`, pause for me to authenticate, then screenshot my notifications page with that profile.Build a knowledge graph
Build a knowledge graph for "Cursor" with OmniScout. Run `omniscout graph "Cursor" --json --data`, show the tree, and cite sources.Fill a form
Use OmniScout to open https://example.com, fill the search box with "local-first AI agents", press Enter, wait for results, and list the top 5 results.Capture network traffic
Open the Vercel pricing page with OmniScout, capture network traffic while scrolling, then list requests matching stripe|payment|checkout.The agent loop
A reliable loop looks like this:
daemon start(idempotent — safe to run every session).export OMNISCOUT_JSON=1.- Act:
navigate→snapshot --refs-only→click/fill→ re-snapshot. - Observe:
screenshot,get text,network tail,console tail. - Clean up:
browser close --all.
Isolate parallel tasks with --session <name> so their tabs and refs don't collide.
Debugging agent runs
omniscout daemon trace— review what the agent did.omniscout daemon replay/omniscout replay …— re-run a recorded flow to reproduce a failure.omniscout daemon watch— follow along live while the agent works.omniscout context— show the current workflow continuity state;omniscout resetto start fresh.
Error kinds
Expect and handle these:
| Failure | Signal | Fix |
|---|---|---|
Stale @eN ref | "ref not found" | Re-snapshot, use the new ref |
| Page not loaded | Blank screenshot / missing text | browser wait text/networkidle first |
| Login expired | Redirect to login page | Re-run browser login --profile … |
| CAPTCHA | Challenge detected | Solve in the open browser window or use a solver |
| Not ready | Connection refused | Run daemon start |
| No results | Empty hits | Narrower query, different --source |
Full list: Troubleshooting.
Tips for agents
- Set
OMNISCOUT_JSON=1at the start for structured output. - Use
omniscout browser snapshot --refs-onlyto find elements, then click by@eNref. - Re-snapshot after every
navigate— refs go stale. - Prefer
wait text/networkidleover fixed sleeps. - Record repeatable flows with
record/macro runinstead of re-improvising them. - Close sessions with
omniscout browser close --allwhen done.