The runtime underneath every HorizonStack agent has one unglamorous, essential job: keep a long-running unit of work coherent across weeks of real-world latency, dozens of channels, and every interruption in between.
The loop
Everything in the runtime moves through four stages. A trigger arrives — an inbound call, a portal state change, a deadline coming into range, or the result of the agent’s own last move. The policy engine reads that trigger against everything already known about the job and deterministically decides what to do. That decision becomes queued work with a time attached. And when the time comes, a contact happens: a call, a text, an email, a write to a system of record.
Every contact is transcribed, evaluated, and fed back in as the next trigger. The loop closes on itself.
Why determinism matters
In regulated work, "the model felt like it" is not an acceptable explanation. The runtime separates judgment from action: the policy engine decides, and the same facts always produce the same decision. That is what lets us hand a compliance team a full, replayable account of why an agent did what it did.
- Triggers are typed and logged with their source.
- Policy decisions are pure functions of accumulated job state.
- Queued work is durable — it survives restarts, deploys, and week-long gaps.
- Contact is the only stage that touches the outside world, and it is fully recorded.
The result is an agent you can supervise the way you would supervise a person: by reviewing the record, not by guessing at a black box.