stather (v.)

How the pieces work

The architecture shows what connects to what. This page is one level up on three of the boxes: how a model call is routed, how Temporal runs a workflow, and what an agent actually is.

1. Model access: one gateway, local first, cloud as fallback

tier 1

tier 1

tier 2, only if tier 1 fails

a worker needs a model, asks for a profile, e.g. local-coder

gateway, profile → backend, per-pool key with a budget

local: vLLM on the serving card

local: Ollama on the small card

cloud: a provider whose terms allow distillation

response, with the model that actually answered

The profile names the job, never the model, so changing what serves it is configuration plus a benchmark. Every worker pool holds its own key with a spending cap. The fallback is deliberate resilience with a bill attached, which is why the caller reads which model answered rather than trusting the alias. The history, from the Bifrost fork that Dream Team used to the LiteLLM gateway here, and the rules behind the tiers, are on Local or cloud.1

2. Durable execution: how Temporal runs one work item

humanworker (polls a task queue)Temporal (history)ingestdhumanworker (polls a task queue)Temporal (history)ingestdtimer running — no signal by the deadline = escalationif a worker dies, its replacement replays the history and resumesstart ItemLifecycle(item id) — duplicate ids rejectedactivity: classifyresult recorded in historyactivity: build (heartbeats while it runs)PR openedactivity: reviewverdictgate: waiting for a signalsignal: approveactivity: merge → deploy → verifyverified

A workflow is deterministic orchestration; everything with a side effect is an activity with a heartbeat, a timeout and a retry policy. The workflow id is the item id with a reject-duplicate policy, which is the exactly-once guard. Human gates are signals and escalation is a timer, so a stalled item is impossible by construction: it is either waiting on a named signal, or it has escalated. The same engine runs every long job in the lab, which is the lesson Temporal or it’s a POC.2

3. An agent is a language model inside a harness

one build activity, run by the harness

tool loop, bounded by the tier's turn budget

yes

text turn

model call through the gateway

tool calls?

dispatch: read · edit · grep · find, git · sandboxed shell, every path checked, home guarded

stop

orient: read the spec, find the anchors in the repo

assemble context: spec, anchors, repo state

summarise when the context passes a threshold, stale tool output pruned, checkpoint kept

verify: build · lint · test, in a build pod

open the PR on an item branch, worker identity never in the output

telemetry record: turns, tokens, tools, outcome

Temporal task queue, work.build.light | medium | heavy

Temporal: result, or a failure the engine retries

The model does the cognitive fill and nothing else. The harness owns checkout, the item branch, the tools, the turn budget, the context window (summarising and pruning as it fills), the verification step, the push, the PR and the telemetry. Tools are a small stdlib registry with path safety and a guard that refuses anything that could reach a real home directory, which is the 2026-07-18 incident written into code. The tier (light, medium, heavy) sets the model profile and the budget; the loop is the same. That is why the May A/B soak found that retry loops, not model choice, were the cost: the loop is where the money goes.3

Sources

Numbers on this page are quoted from the lab's own records. The records are private; each note gives the record's date.

  1. lab record
  2. lab record
  3. lab record