Skip to main content

harvest

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

Not published yet. Until harvest-ai is on PyPI, install from source (below); do not install the name from a registry.

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

Once published: pipx install "harvest-ai[web,parquet]" (or uv tool install "harvest-ai[web,parquet]"). Today, from source:

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.
  • Unpublished. Installation is from source until the first release.

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.0

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.0
File Size Uploaded
harvest_ai-0.1.0.tar.gz 180.6 kB Details

Built distribution (wheel)

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

Total release size: 381.5 kB

Release files / harvest_ai-0.1.0.tar.gz

Download URL harvest_ai-0.1.0.tar.gz
Size 180.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b914179a379b318e95d38597e505c8f8338f7ca547a1a48d392c9c5dce1f9c00
BLAKE2b-256 checksum
How to use checksums
b5fafbdb833ae5d6db69168fdbf364f7882ec52f95a5a7795a7b12097b53e3a1
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.0-py3-none-any.whl

Download URL harvest_ai-0.1.0-py3-none-any.whl
Size 200.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1725c1834d201c6567926d487eaab509b1c3c404d6f1047410f6b1dfec8aee9f
BLAKE2b-256 checksum
How to use checksums
d98b7635916d557b50cabb9e2911cac0bd81d67d43114e2d092d1f4238b2ad29
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

0.1.1

2 release files

This release

0.1.0 This release

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