AI Native Lang
showcase

Showcase: Hourly Price Monitor + DB Logger for E-Commerce and Personal Finance

Track product prices or financial symbols with a compiled AINL scraper that runs hourly, persists to Postgres, and alerts on threshold crossings — without an LLM deciding whether to check prices each time.

March 28, 2026·2 min read
#showcase#personal-use#ecommerce#price-monitoring#cron#postgres#compile-once-run-many
Share:TwitterLinkedIn

Audience: Prosumers, freelancers, e-commerce sellers, personal finance trackers

The problem

Checking prices on a schedule sounds simple until you try to maintain it: cron jobs fail silently, LLM-based "check this URL" agents burn tokens on every run, and nothing persists the history you need for trend analysis.

AINL price monitor

The examples/scraper/basic_scraper.ainl and examples/price_monitor.ainl patterns combine to give you:

# Hourly product price scraper + DB persistence
S core cron "0 * * * *"
Sc products "https://example.com/products" title=.product-title price=.product-price

L_scrape:
  R http.GET "https://example.com/products" ->resp
  R postgres.query "INSERT INTO prices (title, price, ts) VALUES (%s, %s, NOW())" [resp.title, resp.price] ->_
  J "stored"

For financial symbols with parallel fan-out and bounded retries, price_monitor.ainl shows the full pattern using ptc_parallel.ainl and recovery_loop.ainl — compile once, emit Prisma schema for the DB layer:

ainl-validate examples/price_monitor.ainl --strict --emit prisma > schema.prisma

What you get

  • Zero orchestration tokens — the decision to check prices is compiled into the graph, not re-reasoned by an LLM
  • Automatic DB persistence via the Postgres adapter
  • Retry logic via the recovery_loop module — no custom exception handling
  • JSONL trace for every run — know exactly what was checked and when
  • Alerting — add R queue Put "notify" alert_msg to any branch and route to Telegram/email via your queue adapter

Try it

pip install ainativelang
git clone https://github.com/sbhooley/ainativelang.git
ainl check examples/scraper/basic_scraper.ainl --strict
ainl run examples/scraper/basic_scraper.ainl

See also: Building Full-Stack Apps with AINL for emitting Prisma + FastAPI from the same graph.

A

AI Native Lang Team

The team behind AI Native Lang — building deterministic AI workflow infrastructure.

Related Articles