Skip to main content

harvest

harvest-ai on PyPI (the command is harvest; harvest-ai is an alias; the Python package is harvest_ai).

Give it a target and regions, for example "used cars" in KZ and GE, or "rental apartments" in PT and ES. harvest then does the rest:

  1. Census. Agents find every website in those regions that carries the target. They search each discovery angle in every local language. A completeness critic and an adversarial audit check the result. Every source needs evidence.
  2. Lanes. harvest decides how each source may be collected: an API through a configured MCP server, OpenAPI, a feed or sitemap, embedded JSON, plain HTML, or a headless browser. If robots.txt or the terms forbid collection, or the site needs a login, a captcha or a paywall, the lane is none.
  3. Scrapers. An agent writes one fetch(page, *, http, ctx) module per source from a template. A scripted review gate checks it: compile and AST policy lint, a sandboxed page-1 fetch and schema validation. The verdict is bound to the module's sha256.
  4. Collection. harvest fetches politely: one request at a time per host, rate limits, backoff that escalates on 429, a per-URL budget and robots.txt. It tracks pagination and completeness.
  5. Normalisation. Numbers are parsed per locale (万 / 만 / lakh / crore included). Currencies are detected and converted with FX. Units and rent or salary periods are converted. Duplicates are removed within and across sources, sanity bounds are applied, and failing rows go to a quarantine table.
  6. Storage. SQLite by default; Postgres via a DSN. A partial fetch never wipes a source's data.
  7. Autonomy. A cron or systemd schedule, or harvest daemon, runs harvest run --due. A watchdog raises alerts. Repair agents can be dispatched; this is off by default and uses an explicit tool allowlist.

The same core is exposed four ways:

Form Entry
MCP server harvest-mcp (stdio) or harvest mcp --http
CLI + scheduler harvest …, harvest daemon
Web app + API harvest web (FastAPI + a small frontend)
Claude Code plugin .claude-plugin/, skill harvest, agents, /harvest command

Quick start

pipx install "harvest-ai[web,parquet]"     # or: uv tool install "harvest-ai[web,parquet]"
# from source instead: git clone https://github.com/tonyyang0504/harvest && cd harvest
#   && uv venv && uv pip install -e ".[web,parquet]" && source .venv/bin/activate
harvest new used-cars --target "used cars" --regions KZ,GE --record-type vehicles
harvest census-plan used-cars              # angles and queries per region and language
harvest agent used-cars census             # headless census agent (claude -p, explicit tool allowlist)
harvest detect-lane used-cars              # lanes for every candidate
harvest agent used-cars build kolesa_kz    # agent writes sources/kolesa_kz.py
harvest review used-cars kolesa_kz         # the gate: lint + sandboxed fetch + schema
harvest enable used-cars kolesa_kz
harvest run used-cars
harvest query used-cars --filters '{"price_report": {"lte": 15000}}'
harvest export used-cars --format parquet
harvest schedule used-cars                 # cron + systemd snippets (not installed)
harvest web                                # http://127.0.0.1:8080, admin token printed at start

Read docs/harvest.md for the full guide: architecture, record templates, the scraper contract, the policies, configuration, the web API and two end-to-end examples.

Agent steps (harvest agent ...) run a coding-agent CLI headless (Claude Code by default, HARVEST_AGENT_CLI for another) with an explicit tool allowlist; everything else works without one.

Limits (honest list)

  • Collection is only as allowed as the site says. harvest reads robots.txt and looks for terms that forbid automated collection with a keyword heuristic; it does not give legal advice. Review the verdicts for sources that matter, and respect each site's terms and local law (personal data in particular).
  • No circumvention. A bot challenge, a login, a captcha or a paywall makes the lane none; harvest never works around them. Many large portals block datacenter IPs; an operator may opt in to a residential-proxy route for plain IP blocks only, per source, with a recorded reason.
  • Agent-written scrapers. Modules pass a review gate and run in a sandbox (bubblewrap on Linux; a policy layer elsewhere), but they are still code written by a model: review what you enable.
  • Coverage. The census finds what search and the agents find; completeness checks reduce, not remove, gaps. The browser lane is page 1 only. One project has one record type.
  • Normalisation covers the locales, currencies, units and date formats in the test suite; unknown formats are kept as cleaned text or quarantined, not guessed.

Development

uv venv -p 3.12 && uv pip install -e ".[dev]"
.venv/bin/ruff check . && .venv/bin/pytest -q

See CONTRIBUTING.md (DCO sign-off), CODE_OF_CONDUCT.md, SECURITY.md and CHANGELOG.md.

Licence

Apache-2.0. See LICENSE and NOTICE.

Metadata

Release files for harvest-ai 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for harvest-ai 0.1.1
File Size Uploaded
harvest_ai-0.1.1.tar.gz 180.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for harvest-ai 0.1.1
File Interpreter ABI Platform
harvest_ai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 381.3 kB

Release files / harvest_ai-0.1.1.tar.gz

Download URL harvest_ai-0.1.1.tar.gz
Size 180.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5f25a53f90a79850765ccb5f723708062a3d3447036581d499efa6d3787a0caf
BLAKE2b-256 checksum
How to use checksums
010cd74a97ce7994fd592bde53d951dc87346f040b050d45e6d320f405d9cfca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / harvest_ai-0.1.1-py3-none-any.whl

Download URL harvest_ai-0.1.1-py3-none-any.whl
Size 200.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de0427cc6d098750d2a574a651ef88c858acb62813d3d46005c01b73f7214556
BLAKE2b-256 checksum
How to use checksums
a11866a27fdbfcb2b8d0e156ff5c761e9646f784dd1d285e6aab503a83525b36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page