🌐 Agent Browser (agent-browser)¶
AgentBrowserSkill provides a single tool — browse_url — that performs a headless HTTP GET, strips <script>, <style>, and <noscript> tags, and returns up to 32,000 characters of visible text plus response metadata. It exists so the agent can ingest external context (docs, status pages, public APIs) without each skill author re-implementing fetch + sanitize logic.
When to use it¶
- The agent needs to read a public web page (status page, docs, RSS feed) for real-time context.
- You want a single auditable HTTP-fetch surface across every skill in the catalog.
- You're building the web-search branch of
AgenticRAGSkill—BrowserWebSearchProvidercomposes this skill internally (see ADR-0002).
Tools¶
| Tool | Purpose |
|---|---|
browse_url |
Fetches the URL and returns JSON: status_code, final_url, content_type, stripped body text. |
Configuration¶
| Argument | Default | Purpose |
|---|---|---|
fetcher |
built-in httpx async client |
Replace for testing, or to swap in Playwright for JS-heavy sites. |
timeout_s |
30.0 |
Per-request timeout. |
user_agent |
"mirai-shared-skills/agent-browser" |
Sent as User-Agent header. |
Example — replacing the transport¶
from mirai_shared_skills.browser import AgentBrowserSkill
async def playwright_fetcher(url: str, timeout: float, ua: str) -> dict:
# delegate to a Playwright browser context for JS-rendered pages
...
skill = AgentBrowserSkill(fetcher=playwright_fetcher)
Security considerations¶
standard per ADR-0001: the skill performs read-only HTTP GETs and never mutates state. However, in environments where the agent might browse internal-only URLs (intranet wiki, admin dashboards), consider wrapping with SecureSkill and gating browse_url by URL-allowlist or by REQUIRES_HITL for unknown hosts. The catalog can't know which URLs are dangerous in your network — that decision belongs to the client policy.
For 401/403 responses: combine with AuthenticationGatesSkill so the agent has a uniform recovery path.
Related¶
- ADR-0002: Pluggable Provider Pattern —
BrowserWebSearchProviderreuses this skill. - Authentication Gates — uniform 401/403 handling.
- agent-core ADR-0012: Declarative Security Policies — wrapping for URL allowlists.