← Back to Insights

Insight

Rules That Run, Part 9: Off, Draft, Live

Ariel Agor
Updated
Outward actions can't be undone, so build every agent off, draft, live. A sent email stays sent.

Listen · Read by Ariel

0:00 / n/a

Rules That Run is a ten-part series on the rules that keep an AI agent setup honest. This is part 9.

Most of this series is about agents that change files. A bad file change can be reverted. This part is about agents that act on the outside world: replying to email, submitting web forms, posting to social accounts, placing calls. Those actions cannot be taken back. A sent email stays sent.

Every agent in my setup that acts outward is built the same way. The pattern has a few pieces, and each one closes a specific way these agents go wrong.

Three modes, and the owner holds the switch

Every outward agent is built in three modes:

  • OFF. The agent does nothing.
  • DRAFT. The agent does everything except the outward action. It reads the inbox, decides, writes the reply, and records the reply it would have sent. Nothing leaves.
  • LIVE. The agent sends.

The switch belongs to the owner, which in my case means me. The agent never moves itself from DRAFT to LIVE, and the build is not finished until it has spent time in DRAFT.

{
  "agent": "inbox-replies",
  "mode": "draft",
  "modeChangedBy": "owner",
  "neverAct": "./never-act.json"
}

DRAFT is the mode that does the real work during a build. It runs on real input under the real schedule, so the drafts it records are exactly what LIVE would have sent. A test suite runs on the inputs someone thought to write. DRAFT runs on the actual mess of a real inbox or a real queue of forms, which is the input LIVE will face.

The important design point is that DRAFT shares every line of code with LIVE except the final call. If DRAFT takes a different path through the code, it proves nothing about LIVE. One flag at the last step is what makes the drafts trustworthy.

async function act(action) {
  await record(action, "intended");
  if (mode() !== "live") return record(action, "drafted");
  const receipt = await send(action);
  return record(action, "sent", receipt);
}

Escalate, never silently block

When an outward agent is unsure, there are two easy failures. It can send anyway, or it can drop the item quietly. Both are bad. The first sends something wrong. The second loses something a person needed to see, and nobody finds out.

So the safety gate escalates. An uncertain case goes to a person with the draft attached: here is what came in, here is what I would have said, here is why I stopped. The person can send the draft as written, edit it, or handle it differently.

This changes how strict the gate can afford to be. A gate that blocks silently has to be loose, or it loses too much. A gate that escalates can be cautious, because caution costs a person a short read instead of a lost message.

Actions the model can never approve

Some actions should never happen no matter what the model concludes. For example, a recipient the agent must never contact. Other candidates are a type of request it should never answer, or any message that commits money.

That list lives in code, not in the prompt.

// checked after the model decides, before anything is sent
const NEVER_ACT = loadNeverAct(); // recipients and categories, from a file
function allowed(action) {
  if (NEVER_ACT.recipients.has(action.to)) return false;
  if (NEVER_ACT.categories.has(action.category)) return false;
  return true;
}

A prompt rule is a request to the model. The model usually follows it, and "usually" is the wrong standard for a message that must never go out. A check in code runs after the model has decided, and it does not care how persuasive the model's reasoning was. This is the thesis of the whole series in its sharpest form. The cost of a drifting rule here is not a messy commit history.

Exactly once under a scheduler

Outward agents run on schedules, and schedulers are untidy. A run can repeat because the trigger fired twice. Two runs can overlap because the first ran long. A run can die halfway and resume. Any of those can send the same email twice, and a duplicate reply looks careless at best.

So each outward action gets a key, derived from what it responds to: the message it replies to, the form it submits, the post it publishes. The action is recorded under that key before it happens and again after.

const key = `reply:${incoming.messageId}`;
const prior = ledger.get(key);
if (prior?.status === "sent") return;           // already done
if (prior?.status === "intended") return escalate(key, "unclear if sent");
ledger.set(key, { status: "intended" });
const receipt = await send(reply);
ledger.set(key, { status: "sent", receipt });

The "before" record is what makes a crash safe. If a run dies between the two writes, the next run finds an action that was intended but never confirmed. It cannot know whether the send went out. Instead of guessing, it escalates, which is the same rule as the section above.

The model call goes through the wrapper

The language model call inside each of these agents goes through the same lean wrapper described in part 1. For an outward agent this matters beyond cost. The wrapper runs with no tools unless they are allowlisted, from an empty folder, with its own short system prompt. The model can draft and decide. It cannot reach out and send anything itself. Sending is the job of the code around it, which is where the never-act check and the idempotency ledger live.

The wrapper also throws a usage-limit reply as an error instead of returning it as text. An outward agent that treated "you've hit your limit" as a reply would send it.

Prove the send path before LIVE

DRAFT proves the agent decides well. It does not prove that sending works. Credentials, sender settings, templates and rate limits only show up on a real send.

So before an agent goes LIVE, it does one real send to the owner through the exact production path: same code, same credentials, same sending account. A test harness that calls a different function proves nothing about the production one. I want the first real message this agent sends to be one I receive and read.

Speaking for the owner

Agents that write as me, or on my behalf, have one more rule, added on November 10, 2026. They never promise my actions. An agent cannot write "Ariel will call you tomorrow" or "I'll have Ariel send that over." It can say "I've passed that on," and only after a logged hand-off to me actually happened.

The reasoning is the same as part 6, turned outward. An agent that promises its own future work can at least be made to track it. An agent that promises someone else's work has created a commitment that person never made and may never hear about.

Links that tell you what happened

When an outward agent sends a link to a specific person, the link is per-person and click-tracked. That rule dates from October 24, 2026. Each recipient gets an opaque token behind a logged redirect, so I can see whether they clicked, how many times and when. The link is tested before it is sent.

Without this, "sent" is the last thing I know. With it, the outward action has a feedback signal, and a follow-up can be based on what the person did instead of on a guess.

The order I build them in

The pieces go in a fixed order. The agent starts OFF. The never-act list and the idempotency ledger go in before any sending code exists, so there is never a version that can send without them. Then DRAFT, on real input, until the drafts read right. Then one real send to the owner through the production path. Then the owner flips it LIVE.

Each step is cheap to skip and expensive to have skipped. The pattern exists so that skipping one is a visible decision instead of an accident.

Build it yourself

  1. Give every outward agent an OFF, DRAFT and LIVE mode, switched only by the owner, with DRAFT and LIVE sharing every line except the final send.
  2. Escalate uncertain cases to a person with the draft attached; never drop them silently.
  3. Put a never-act list of recipients and categories in code, checked after the model decides and before anything is sent.
  4. Key every outward action, record it before and after, and escalate any action found intended but unconfirmed.
  5. Route the model call through a wrapper with no send capability of its own.
  6. Do one real send to the owner through the exact production path before going LIVE.
  7. Ban the agent from promising the owner's actions, and make shared links per-person and tracked.

Part 8: A History Worth Reading

Want this kind of automation working for your business?

Agor AI designs and ships the systems these posts describe, scoped in weeks, not quarters.

Book a Free Strategy Call