A business factory runs on its own isolated machine, one per business. This chapter describes what is on that machine, how it wakes up and goes to sleep, what it keeps and what it loses, and why secrets never live on it.
One machine per business
The machine is a sandbox: a lightweight virtual computer (of the microVM kind, like the ones Firecracker builds), with an image defined by whoever operates the platform. Each business has its own, and every conversation of its business factory, from every copy of every one of its people, runs inside it.
Inside the machine, each conversation runs as its own operating system user, without administrator permissions and unable to see the processes of the others. When a conversation asks the rest of the system for something, it does so through a local channel that identifies, through the operating system itself, which user made the call. As a result, one conversation cannot pass itself off as another, even though they share the machine.
The limit of this choice is worth noting: the strong isolation is between businesses, not within one. If a conversation managed to escape its user, it could act as any other conversation of the same business (never of another). This is one of the open questions in the epilogue.
The program that hands out the work
Inside the machine runs a small program, the runtime, which always does the same thing:
- it asks the coordinator for the desired state of the business factory: which conversations exist and which files each one reads;
- it creates one user per conversation and prepares its folder with its role's work;
- it hands each conversation whatever is waiting for it (a message, a routine's notice);
- it runs one turn of that conversation's harness, and stops;
- it saves and pushes to git what the turn produced (chapter 14).
Anything awaiting a response is never stored on the machine: pending deliveries live in the coordinator, outside, so losing the machine does not lose a message.
Sleeping and waking
A running machine costs money even when it does nothing. That is why it goes to sleep when there is no work: the runtime reports periodically whether it is busy or idle, and after a while without work the coordinator stops it. It starts it again when a delivery arrives or something comes due (a scheduled time, a retry).
Running one turn per delivery, rather than keeping the agents listening all the time, is what makes sleeping possible. The alternative (each conversation as a permanent process) was tried and discarded: it uses so much memory that the machine never goes to sleep.
What is kept and what is lost
| On stopping and starting again | On replacing the machine |
|---|---|
| the users, the files, the installed harness and the conversations are kept | the conversations' files are lost |
| some system configuration is lost and is applied again at each start | users and folders are rebuilt from the coordinator and from git |
When a conversation is lost, there is no attempt to recover it: a new one is started with a summary built from its latest deliveries and from its role's note. This is possible because of the decision in chapter 6: everything that matters is already in git or in the coordinator.
Secrets do not live on the machine
No long-lived credential is stored on the machine:
- the credential the runtime uses to talk to the coordinator lives only in its memory, handed over at each start; never on disk;
- the key to the artificial intelligence engine is added to each request on its way out, by the machine's provider or by a local intermediary; inside, the harness holds an empty placeholder;
- calls to the business's systems go through the coordinator, which adds the credential outside.
The reason is the usual one, applied to another layer: a machine where agents that read outside text are running should not hold anything worth stealing.
Services with contracts, no exceptions
Behind the coordinator, the gateway and the git server are services that talk to one another. Two rules keep those services healthy:
- Each contract holds without exceptions and without old versions surviving. If a contract between services changes (a route, an event, a piece of data another service reads), the change ships in a single release together with whatever uses it. And when something is replaced, every caller is migrated first and the old one is deleted afterward; two ways of doing the same thing are never left side by side.
- Each section talks to a single service, and interfaces do not depend on one another. A screen, or a section of a screen, talks to one service, not several; and one interface does not need another in order to work. That way, a failing service shows up in its own section and does not bring everything down.
The harness and each session's permissions
The harness is the program that runs the agent on each turn: it reads the instructions, calls the model, uses the tools. Each business chooses its own, and the architecture does not depend on which one.
At startup, each conversation is given its instructions and its permissions, generated outside the folder tree: what it can read, which folders it can write to, which commands it can run and which ones are forbidden (chapter 10). No harness configuration file lives inside a role's work, where the conversations themselves could change it.
To recap, each business has an isolated machine that sleeps and wakes, a program that hands out deliveries and saves every turn to git, one user per conversation, no secrets inside, and permissions handed in from outside. The next chapter looks at where the work is kept.