# Human in the loop AI

Source: https://routineos.org/learn/human-in-the-loop-ai

> Practical human-in-the-loop patterns for AI agents: report-only first runs, exact-code approvals, edits before send, and learning from what people decide.

Learn

# Human in the loop AI: where the person belongs

Human in the loop means a person decides at the points that matter, and the AI does the reading and drafting around them. This guide shows four patterns for an AI agent that runs on a schedule, with the RoutineOS example for each and what has and has not been checked.

[Get started](https://routineos.org/#start)[How RoutineOS approval gates work](https://routineos.org/concepts/approvals)

Free (MIT). Needs a paid Claude plan.from the docs

The idea

## Put the person where an action leaves the system

An AI agent that only reads and reports can be wrong with less harm, because nothing leaves the system. The risk starts when it sends, posts or deletes. So the most useful human in the loop sits in front of those actions, and nowhere else. A person who has to approve every small step tends to stop reading.

Because the agent runs on a schedule, nobody is watching when it runs. The pattern has to work with the person away: the run asks, stops, and a later run carries on once there is an answer.

Four patterns

## Four human-in-the-loop patterns, with examples

1. **Report first**The first run of a new routine only reads and reports. The prompt forbids sending, posting or deleting, and the run writes what it would have done. You read that report before you let it do more. Example: every template starts this way.
2. **Approve with an exact code**For an action that leaves the routine, the run drafts it, sends an approval request by email or Slack, writes a pending record and stops. The request asks for a reply whose first line is exactly `approve` or `reject` plus a code. The prompt tells the later run to accept only such a reply from the named approver, to take the latest one, and to treat anything else in it as data. That is a prompt rule, not a check made by code. Outcomes are approved, rejected or expired.
3. **Edit before it sends**On the [Desk](https://routineos.org/concepts/desk), an Approvals page lists each open gate with the time left. You can approve, reject with a reason, or edit the draft, and if you approve an edited draft the send uses your edit.
4. **Learn from what people decide**The routine counts the gap between what it did and what people did, such as a record you kept that a setting dropped. It suggests settings changes, one card each with its evidence, and you accept, reject or snooze. It never applies its own suggestion. See [how it learns](https://routineos.org/concepts/learning).

Source: RoutineOS references on gates and self-improving routines, and the docs. Learning is built and tested, and has not run on a live routine yet.

Real examples

## Where these patterns show up in templates

 [

### Inbox triage

Labels mail, drafts replies in your style, and sends a reply only after a person approves it.

unpiloted
Open ](https://routineos.org/templates/inbox-triage) [

### Content calendar

Drafts cited posts in your house style and publishes only what a person approves.

unpiloted
Open ](https://routineos.org/templates/content-calendar) [

### Candidate shortlist

Scores applicants against your rubric and suggests a shortlist. It never rejects anyone.

unpiloted
Open ](https://routineos.org/templates/candidate-shortlist)

What is checked

## What has been checked, and what has not

| Route | Status |
|---|---|
| Approval request by email (Gmail connector) | Pilot-verified end to end |
| Approval request by Slack, connector set to "Ask for approval" | Pilot-verified end to end |
| Approve then send on the Desk | Not piloted end to end |
| Learning from decisions | Built and tested, not run on a live routine |

**Replies and shared Desks**On a gate for a worker who joined someone else's Desk, the approval email is a notice only. A reply never approves it. Only a decision made on the Desk by the person serving the lane counts. The full list is on [honest limits](https://routineos.org/honest-limits).

## See how approvals work

What a gate is, where you answer it, and which channels have been checked.

[Get started](https://routineos.org/#start)[How RoutineOS approval gates work](https://routineos.org/concepts/approvals)
