Most of what I build are engines: small, independent cores that each own one hard problem and run without the others. The first is durable execution. A workflow is a graph, and a deterministic interpreter walks it, so replaying the same history always produces the same decisions. State changes and outgoing messages are committed in one transaction through an inbox and an outbox, and every write is idempotent. The consequence is the property that matters: effects happen exactly once, even when the process dies halfway through a step and starts again.
Agent runtimes are built on the same idea. One conversation can be driven from many surfaces at once, so instead of keeping state per client I keep the conversation as an event log and derive every view from it as a projection. Anything an agent wants to do that needs a person goes through an approval state machine, spending is bounded by budgets, and every step lands in an audit ledger that can be verified offline, without trusting the service that wrote it.
An agent is only as safe as the tools it can reach, so tool access goes through a gateway: one MCP endpoint in front of MCP, REST and gRPC tool servers. Permissions are granted per agent and per function, risky calls wait for human approval, and credentials are envelope-encrypted. Tool definitions are pinned by hash, which closes a quieter hole: a tool server cannot change what a tool does, or what its description tells the model, after the agent was allowed to use it.
Sometimes the tool is a whole computer. For that, agents get persistent Linux desktops with home volumes and backups, so work survives between sessions the way it would for a person. Access is given through signed grants rather than shared passwords. Inside the guest, a gateway streams the screen and hands out control leases, so perception and input belong to one holder at a time and an agent and a human never fight over the same mouse.
Some work has to run where the data is, on customer hardware. There it is a single static binary that only dials out, enrols with a device key and runs tasks it has leased, so nothing on that network has to accept an inbound connection. What keeps all of these engines from collapsing into one monolith is a single plugin protocol: adapters run out of process over gRPC and must pass a conformance suite, so a provider plugs into every engine the same way and can be replaced without touching a core.