Manual Browsing Module

Manual browsing utilities for arXiv.

Provides a simple ArxivBrowser class that accepts search queries and returns results in a convenient, strongly-typed form using the shared arXiv parser.

class agent.browsing.manual.manual.ArxivBrowser(downloads_dir='downloads')[source]

Bases: object

High-level wrapper for performing arXiv searches.

The browser exposes simple methods to: - Fetch a page of results for a query - Iterate over all results for a query in chunks - Retrieve a single paper by arXiv ID

Example:

from agent.browsing.manual import ArxivBrowser

browser = ArxivBrowser()
page = browser.search("transformers AND speech", max_results=5)
print([p.title for p in page])
Parameters:

downloads_dir (str)

get(arxiv_id)[source]

Retrieve a single paper by arXiv ID.

Parameters:

arxiv_id (str) – The arXiv identifier (with or without version suffix).

Return type:

Optional[ArxivPaper]

Returns:

The corresponding instance if found; otherwise None.

iter_all(query, categories=None, date_from_days=None, chunk_size=100, limit=None)[source]

Iterate over all results for a query by fetching in chunks.

Parameters:
  • query (str) – Free-text search query.

  • categories (Optional[List[str]]) – Optional list of arXiv category filters.

  • date_from_days (Optional[int]) – If provided, limit results to within the last N days.

  • chunk_size (int) – Number of results fetched per request.

  • limit (Optional[int]) – If provided, stop after yielding at most limit results.

Yields:

ArxivPaper instances one by one, until exhausted or limit reached.

Return type:

Iterator[ArxivPaper]

search(query, max_results=25, start=0, categories=None, date_from_days=None)[source]

Search arXiv and return a single page of results.

Parameters:
  • query (str) – Free-text search query.

  • max_results (int) – Maximum number of results to return in this page.

  • start (int) – Pagination start index (0-based) across the full result set.

  • categories (Optional[List[str]]) – Optional list of arXiv category filters (e.g., ["cs.AI"]).

  • date_from_days (Optional[int]) – If provided, limit results to within the last N days.

Return type:

List[ArxivPaper]

Returns:

A page of results.

search_all(query, categories=None, date_from_days=None, chunk_size=100, limit=None)[source]

Collect results for a query into a list by consuming the iterator.

Parameters:
  • query (str) – Free-text search query.

  • categories (Optional[List[str]]) – Optional list of arXiv category filters.

  • date_from_days (Optional[int]) – If provided, limit results to within the last N days.

  • chunk_size (int) – Number of results fetched per request.

  • limit (Optional[int]) – If provided, stop after collecting at most limit results.

Return type:

List[ArxivPaper]

Returns:

Collected results list.