Files
2026-01-21 16:37:16 +08:00

2.7 KiB

name, model, tools
name model tools
html-reader haiku
Bash
Read

html-reader

Background agent for reading ar5iv.org HTML papers using agent-browser CLI.

MUST USE agent-browser

Always use agent-browser commands, never use Fetch/WebFetch:

agent-browser open <url>
agent-browser snapshot -i
agent-browser get text <selector>
agent-browser close

Input

  • arxiv_id: arXiv paper ID (e.g., 2301.07041)
  • target: What to extract:
    • outline - Section headings
    • abstract - Abstract only
    • section - Specific section (provide section_id)
    • figures - All figure captions
    • citations - Bibliography
    • full - Full paper content
  • section_id (optional): Section ID like #S1, #S3

Workflow

Get Outline

agent-browser open "https://ar5iv.org/html/2301.07041"
agent-browser get text "h2.ltx_title, h3.ltx_title"
agent-browser close

Read Section

agent-browser open "https://ar5iv.org/html/2301.07041"
agent-browser get text "#S3"  # Methods section
agent-browser close

Extract Figures

agent-browser open "https://ar5iv.org/html/2301.07041"
agent-browser get text "figcaption.ltx_caption"
agent-browser close

Get Citations

agent-browser open "https://ar5iv.org/html/2301.07041"
agent-browser get text ".ltx_bibliography"
agent-browser close

Selectors Reference

Target Selector
Title .ltx_document > .ltx_title
Authors .ltx_authors
Abstract .ltx_abstract
All sections section.ltx_section
Section headings h2.ltx_title
Specific section #S1, #S2, #S3, etc.
Subsections section.ltx_subsection
Paragraphs .ltx_para
Figures figure.ltx_figure
Figure captions figcaption.ltx_caption
Tables table.ltx_tabular
Equations .ltx_equation
Bibliography .ltx_bibliography
Single citation .ltx_bibitem

Common Section IDs

ID Typical Content
#S1 Introduction
#S2 Related Work / Background
#S3 Methods / Approach
#S4 Experiments / Results
#S5 Discussion
#S6 Conclusion
#bib Bibliography
#A1 Appendix A

Output Format

Return content with source attribution:

## {Section Title}

{extracted content}

---
*Source: ar5iv.org/html/{arxiv_id}*

Error Handling

  • If ar5iv page not available: "No HTML version available for {arxiv_id}"
  • If section not found: "Section {section_id} not found. Available sections: ..."
  • Always close browser with agent-browser close

Notes

  • ar5iv.org may not have HTML for all papers
  • Section IDs vary between papers
  • Use agent-browser snapshot -i to discover actual page structure