Arthur Gao

I build AI systems where code decides and the model drafts.

Most of my work sits at the seam between a language model and a business that cannot afford to be wrong — an earthworks contractor's invoices, a grower's harvest targets, a factory's downtime, an immigration adviser's case file. I design the harness around the model: the contracts it must satisfy, the checks that run before anything is shown, and the record of what was never read.

§ 01 — Craft

What I am good at

i.

Agent harnesses

File-driven agents with roles, memory write-back and human-approved cleanup. Every model output is validated by code before it becomes a finding.

ii.

LLM application architecture

Role-based model routing, vendor fallback, rate limits, structured output and evidence-cited answers. Models evaluated per task, not by reputation.

iii.

Durable workflows

Long-running AI pipelines on Temporal: retries, timers and idempotent side effects, so a crashed render or a slow model never leaves half-written state.

iv.

Systems integration

Joining tools a business already runs — Xero, CostX, EROAD, packhouse exports, AXIS cameras — on a key that actually holds, with idempotent imports.

v.

Full-stack product

Python & FastAPI, PostgreSQL with row-level multi-tenancy, Next.js & TypeScript. Interfaces that read as real operations software, not templates.

vi.

Shipping & operations

Cloudflare, Vercel, Fly.io, AWS and Oracle Cloud VMs; MQTT ingestion from the edge; CI with tests that verify something real.

“What was not read or judged is reported as a gap — never as clean.”

A rule from Cairn, and from most of what I build

§ 02 — Selected work

Seven projects

01

Earthworks · Client demo

  • Next.js
  • TypeScript
  • CSS Modules
  • AI assist

SiteLedger Field to invoice.

A job-management and billing platform for earthworks contractors that follows one story end to end: work happens on site, is captured on a phone, becomes priced invoice lines, and syncs to Xero.

  • EROAD telematics and weighbridge-docket OCR shown as live integrations
  • AI-assist that turns a day's field notes into invoice lines a person approves
  • Plant-and-machinery visual identity built to feel like real operations software
Morning dashboard: jobs, plant deployed, billable ratio and a live field-to-invoice funnel, with alerts that need a look. Field capture on the operator's phone keeps working offline and syncs when signal returns. Invoice lines trace to their source (manual, weighbridge OCR, docket) and push to Xero without duplicates.
1.1Morning dashboard: jobs, plant deployed, billable ratio and a live field-to-invoice funnel, with alerts that need a look.
02

Construction finance · Client demo

  • Next.js
  • Reconciliation
  • Read-only AI

BuildLedger Five systems, one cost code.

An integrated finance and estimating platform for a New Zealand quantity-surveying firm, joining CostX, Xero, EzzyBills, ApprovalMax and Microsoft 365 into one interface.

  • Budget-vs-actual reconciliation line by line, on the cost code both systems share
  • Exception rules that surface what needs a person, with source attribution on every figure
  • A read-only AI assistant and the NZ statutory layer — payment-claim clocks included
Budget-to-forecast bridge by trade, with CostX, ApprovalMax and Xero figures joined on the cost code. Exceptions surfaced automatically: spend without a PO, overruns, duplicate bills and missed statutory deadlines. The read-only assistant explains an overrun in plain English and cites the systems it read from.
2.1Budget-to-forecast bridge by trade, with CostX, ApprovalMax and Xero figures joined on the cost code.
03

Agriculture · Platform design

  • FastAPI
  • PostgreSQL
  • Next.js 15
  • Docker

Orchard Designing out six weeks of spreadsheets.

A targets platform being designed for an apple grower: set next season's crop (T/ha) and fruit-size targets per block, then track target against actual from orchard and packhouse exports.

  • Designed so every derived number is traceable — the API returns inputs and a formula id with each output
  • All formulas in one module; weights and areas as decimals, never floats
  • Idempotent CSV import, multi-season and multi-orchard from day one, ready for AI forecasting
Design diagram: exports flow through an idempotent import into one formula module; every number shown carries its inputs and formula id.
3.1Design diagram: exports flow through an idempotent import into one formula module; every number shown carries its inputs and formula id.
04

Manufacturing · Edge vision

  • AXIS cameras
  • MQTT
  • FastAPI
  • Next.js

Aion The camera sees; the cloud counts.

A family of edge-camera analytics products. In OpsLens, cameras on the factory floor publish on-device analytics events; the cloud turns them into OEE, machine state, downtime and production counts.

  • No raw video leaves the site — only events, validated against a versioned JSON Schema contract
  • One shared, business-agnostic camera package; each product owns its own backend
  • Multi-tenant from the first customer, deployed across Fly.io, Koyeb and AWS
Factory overview from edge-camera events: OEE, availability, hourly throughput and live machine status (simulator data). Machine registry: camera-derived live state, names used on the floor, ideal rates and today's output per machine.
4.1Factory overview from edge-camera events: OEE, availability, hourly throughput and live machine status (simulator data).
05

Professional services · Agent harness

  • Python 3.12
  • Temporal
  • FastAPI
  • Next.js

Cairn An agent that knows what it did not read.

A file-driven agent harness for licensed immigration advisers in New Zealand and Australia: case consistency checks, pre-submission review and drafted replies to official letters.

  • Extracted facts, conflicts and checklist verdicts are validated by code before anything is shown
  • Agent runs write back to memory; a weekly cleanup consolidates it only with human approval
  • Every model call names a role, so vendor, model and rate limit change in config, not code
Consistency check on a synthetic case: each conflict cites the page and quote it came from, and the adviser signs off. Agent run: context budget, steps, a drafted answer and a validated memory write-back that can be undone. Weekly memory cleanup: stale and duplicate notes proposed as diffs, applied only after human approval.
5.1Consistency check on a synthetic case: each conflict cites the page and quote it came from, and the adviser signs off.
06

Infrastructure · Developer tool

  • Python
  • uv
  • OpenAI API
  • Messages API

llm-gateway One endpoint for every project.

A local gateway that gives all my projects a single OpenAI- and Messages-API-compatible endpoint, routed to named profiles — so applications use the official SDKs and never hard-code a vendor.

  • JSON mode, streaming, client tools and image input behind the same URL
  • Per-profile daily request and token limits, answered with a standard quota error
  • A doctor command that checks setup without spending quota; runs privately on a VM over an SSH tunnel
The llmgw CLI: serve a local OpenAI-compatible endpoint, check setup without spending quota, list profiles.
6.1The llmgw CLI: serve a local OpenAI-compatible endpoint, check setup without spending quota, list profiles.
07

Marketing · Generative media

  • TypeScript
  • Temporal
  • Agents
  • Video

AdForge One spec, three kinds of ad.

A spec-driven engine that turns a product image and a brief into 10–30 second video ads and static image ads for every platform — and a raw screen recording into a polished product demo.

  • A single typed spec is the only contract between planning, rendering and review stages
  • Planner and critic agents, chosen by measured evaluation rather than default model
  • Demos get auto-zoom, step callouts, captions and device frames; one output per platform size
Spec editor: every edit shows its consequence and cost (here free, re-render only) before it is applied. Agent chat: describe the ad in plain language; paid steps wait for confirmation on a quote card. One spec, many platforms: the 16:9 pre-roll rendered from the 9:16 master with blur-fill.
7.1Spec editor: every edit shows its consequence and cost (here free, re-render only) before it is applied.

§ 03 — Principles

How I work

  1. Code decides; the model drafts.

    A model can propose a fact, a verdict or an invoice line. Code checks it against the contract before anyone sees it.

  2. Coverage is a first-class output.

    A gap is reported as a gap. Silence is never allowed to look like a clean result.

  3. Find the assumption everything rests on.

    Before building, I name the one join or key that must hold — and test it on real exports first.

  4. Evidence before “done”.

    Tests that fail first, builds that exit clean, screenshots of the real screen. Reviewing evidence is faster than trusting it.

§ 04 — Contact

Have a process that a model could help with — but must not get wrong?

Based in Auckland, New Zealand