01 · The count
102 parts. A model brings ten.
We counted every part of a system we run in production today.
One model, 24 jobs given to a model, 51 services, 19 outside systems and 7 kinds of people it asks. A capable model with a browser has ten of them and half does another 22. The other 70 are what this page is about.
- Model client
- 0.5% of the code
- Code
- 130,305 lines
- Tests
- 20,674 lines
Counted in production · One system, every part
02 · Where it runs
It runs in your cloud.
Everything runs in your own cloud account.
Intake, queue, workers, checks, the record and the dashboard. What the model is shown does leave it: the page being worked and its instructions go to the model provider, with secrets removed first. Which provider, and in which region, is set by your data requirements. None of them trains on your data.
- Processes
- 5 kinds
- They share
- Only the database
- Provider and region
- Set by your rules
Example · What runs where, and what leaves
03 · The path
One job, start to finish.
The model does the work in the middle.
Every job takes the same path. The other stations are ordinary software: intake, a queue, checks, limits, a write-back, an audit and a note for next time.
- Steps and branches
- 23
- A model alone does
- 3
Example · One job
04 · Queue and locks
Dozens at once. Never two in one account.
A worker claims a job in a single database step that also takes the lock.
Work comes in over an API from your own systems and waits in one queue, most urgent first. A second job for the same account or record waits. If a worker dies holding a lock, the lock is released with its job.
- Claim and lock
- One database function
- Order
- Priority, then arrival
- A worker holds
- One job
Example · The queue, and one lock
05 · Systems of record
By API, or by screen.
Every write is reconciled against the other side.
Where a system has an API, the write goes through it in plain code. Where it has none, a supplier, insurer or government portal, the agent works the screen as your staff do. Results come back to your system signed and in order; re-sending one is safe.
- Results
- Signed, in order
- Re-sent
- Up to 5 times
- Endpoints
- 105
Example · A day of writes, reconciled
06 · Idempotent writes
Nothing is done twice.
Only “not done” may be retried.
A job that stops after it may have written is never simply run again. The system records the moment of the write, then reads the other side's record and its own evidence, and rules: done, not done, or unclear. With no record to read it is unclear, and locked until a named person decides.
- A repeated request
- Returns the existing job
- Waits for a confirmation
- Up to 3 minutes
Example · A job stops after its write