AI Worker worker.md

AI Worker Examples

Examples are where the worker pattern becomes operational: a short problem statement, a worker spec, schemas, and how failures are handled.

All examples here are product-neutral. Treat them as starting points you can adapt to your own orchestrator, runtime, and model choices.

Examples#

  • Email Summarization Worker — Summarize a thread and extract next actions under tight time and token limits.
  • Code Review Worker — Review a diff and return actionable issues with a coarse risk rating.
  • Data Validation Worker — Validate records against rules and schemas, returning structured errors.
  • Web Scrape Worker — Fetch a page, extract fields, and return a normalized JSON payload.
  • AWS Lambda Worker — A worker packaged as a Lambda function with explicit resource limits and logs.
  • Queue-Based Worker — A worker that consumes messages with idempotency keys and backpressure.
  • Validator Worker — A dedicated worker that checks another worker’s output before side effects.
  • Aggregator Worker — Merge partial results into a single output contract, with conflict handling.

See also#

FAQ#

Are these examples tied to a specific vendor?

No. They describe contracts and operational behavior that you can implement anywhere.

Should I copy these schemas directly?

Use them as a baseline, then tailor fields to your runtime, tools, and observability conventions.

How many examples do I need in a real system?

Start with a handful of high-leverage workers (ingestion, validation, summarization) and expand as you identify stable capabilities.