展示HN:帕杜斯浏览器 - 一款无需Chromium的AI代理浏览器
Show HN: Pardus Browser- a browser for AI agents without Chromium

原始链接: https://github.com/JasonHonKL/PardusBrowser/tree/main

## Pardus-Browser:为AI代理设计的语义浏览器 Pardus-browser是一款专为AI代理设计的无头浏览器,优先处理结构化数据而非视觉渲染。它能抓取网页、解析HTML,并在毫秒级时间内生成一个清晰、语义化的树形结构,代表页面元素——链接、标题、表单及其相关操作。与传统浏览器不同,它**无需**Chromium二进制文件、Docker或GPU,仅依赖于纯Rust实现的HTTP和HTML解析。 Pardus-browser以Markdown、树形结构或JSON格式输出这些语义信息,包括内部/外部链接的导航图谱和表单详情。它还提供“交互模式”,过滤掉静态内容,专注于可操作的元素。 主要特性包括快速解析(通常小于200毫秒)、零Chrome依赖以及模块化设计,包含核心解析、计划中的CDP WebSocket服务器用于JS渲染内容,以及方便使用的命令行界面。它非常适合需要以编程方式理解和交互网络内容的代理,而无需完整浏览器环境的开销。

对不起。
相关文章

原文

A headless browser built for AI agents. No pixels, no screenshots — just structured semantic state.

$ pardus-browser navigate https://example.com

00:00  pardus-browser navigate https://example.com
00:05  connected — parsing semantic state…
       document  [role: document]
       └── region  [role: region]
           ├── heading (h1)  "Example Domain"
           └── link  "Learn more"  → https://iana.org/domains/example
00:05  semantic tree ready — 0 landmarks, 1 links, 1 headings, 1 actions
00:05  agent-ready: structured state exposed · no pixel buffer · 0 screenshots

AI agents don't need screenshots. They need to know what's on a page, what they can interact with, and where they can go. pardus-browser fetches a URL, parses the HTML, and outputs a clean semantic tree — landmarks, headings, links, buttons, forms, and their actions — in milliseconds, not seconds.

No Chromium binary. No Docker. No GPU. Just HTTP + HTML parsing.

  • Semantic tree output — ARIA roles, headings, landmarks, interactive elements
  • 3 output formats — Markdown (default), tree, JSON
  • Navigation graph — Internal routes, external links, form descriptors with fields
  • Interactive-only mode — Strip static content, show only actionable elements
  • Action annotations — Every interactive element tagged with navigate, click, fill, toggle, or select
  • Fast — HTTP GET + HTML parse, typically under 200ms
  • Zero dependencies on Chrome — Pure Rust, no browser binary needed

From source (requires Rust 1.85+):

git clone https://github.com/user/pardus-browser.git
cd pardus-browser
cargo install --path crates/pardus-cli
# Default: Markdown tree
pardus-browser navigate https://example.com

# Raw tree format
pardus-browser navigate https://example.com --format tree

# JSON with navigation graph
pardus-browser navigate https://example.com --format json --with-nav

# Only interactive elements
pardus-browser navigate https://example.com --interactive-only

# Custom headers
pardus-browser navigate https://api.example.com --header "Authorization: Bearer token"

# Verbose logging
pardus-browser navigate https://example.com -v

Markdown (default) — clean semantic tree with role annotations:

document  [role: document]
├── banner  [role: banner]
│   ├── link "Home"  → /
│   ├── link "Products"  → /products
│   └── button "Sign In"
├── main  [role: main]
│   ├── heading (h1) "Welcome to Example"
│   ├── region "Hero"
│   │   ├── text "The fastest way to build"
│   │   └── link "Get Started"  → /signup
│   └── form "Search"  [role: form]
│       ├── textbox "Search..."  [action: fill]
│       └── button "Go"  [action: click]
└── contentinfo  [role: contentinfo]
    ├── link "Privacy"  → /privacy
    └── link "Terms"  → /terms

JSON — structured data with full navigation graph:

pardus-browser navigate https://example.com --format json --with-nav

Returns:

{
  "url": "https://example.com/",
  "title": "Example Domain",
  "semantic_tree": {
    "root": { "role": "document", "children": [...] },
    "stats": { "landmarks": 4, "links": 12, "headings": 3, "actions": 2 }
  },
  "navigation_graph": {
    "internal_links": [
      { "url": "/products", "label": "Products" },
      { "url": "/signup", "label": "Get Started" }
    ],
    "external_links": ["https://github.com/..."],
    "forms": [
      {
        "action": "/search",
        "method": "GET",
        "fields": [
          { "name": "q", "field_type": "text", "action": "fill" },
          { "name": "go", "field_type": "submit", "action": "click" }
        ]
      }
    ]
  }
}
# Wipe everything
pardus-browser clean

# Only cookies
pardus-browser clean --cookies-only

# Only cache
pardus-browser clean --cache-only
pardus-browser
├── crates/pardus-core    Core library — HTML parsing, semantic tree, navigation graph
├── crates/pardus-cdp     CDP WebSocket server (planned)
└── crates/pardus-cli     CLI binary

pardus-core — The engine. Fetches pages via reqwest, parses HTML with scraper, builds a semantic tree mapping ARIA roles and interactive states. Outputs Markdown, tree, or JSON.

pardus-cdp — Chrome DevTools Protocol server (planned). Will expose a WebSocket endpoint for Playwright/Puppeteer integration, enabling JS-rendered pages and real-time interaction.

pardus-cli — The pardus-browser command-line tool.

Element Role Action
<a href> link navigate
<button> button click
<input type=text> textbox fill
<input type=submit> button click
<input type=checkbox> checkbox toggle
<select> combobox select
<textarea> textbox fill
<img> img
<h1><h6> heading (hN)
<nav> navigation
<main> main
<header> banner
<footer> contentinfo
<form> form
<article> article
<ul>/<ol> list
<table> table
[role=...] custom varies
[tabindex] varies varies

MIT License

联系我们 contact @ memedata.com