# A3 — Concepts

> The mental model behind stage-based automation: workflows, stages, sites, libraries, and playbooks.

**URL:** https://athree.dev/concepts  
**Canonical markdown:** https://athree.dev/concepts.md

## Core idea

A3 splits automation into what models are good at (observation, decision, repair) and what code is good at (selectors, control flow, schemas). Each concept maps to packages in the A3 monorepo.

## Concepts

### Workflow

A **workflow** is the contract: high-level objective (e.g. scrape hotel rates), typed input schema, typed output schema, and a directory of stage modules. You author this file; A3 uses it for learning and execution.

Typical fields: `title`, `rootDir`, `sitesDir`, `inputsSchema`, `outputsSchema`, `agents`, `projectLocations`, optional `setup` / `teardown`.

### Stage

A **stage** is a typed Playwright (or similar) module that performs one unit of work — navigate, fill a form, extract rates, assert outputs. Stages are what the agent writes and what the runner replays.

### Site

A **site** folder holds stages and site-specific knowledge for one origin (e.g. booking.com). Learning is usually per-site; playbooks compose sites into a workflow.

### Library / skills

Reusable helpers, schemas, and skills the agent may read or write under declared project locations.

### Playbook

Composition of stages / sites that implements the workflow mission end-to-end.

## Related

- Product: https://athree.dev/product.md
- Overview: https://athree.dev/index.html.md
