# How we turn NDAs around in minutes instead of days

Every 15 minutes our Machine agent picks up new NDAs, marks up anything that strays from our standard positions, and drafts a note for counsel. It never signs and never sends. Counsel does both.

Canonical page: https://themachine.myapps.ai/use-cases/nda-turnaround

Of all the paperwork in a deal, the NDA is the most predictable. It's also
the thing most likely to sit unopened for two days until a lawyer gets to it.
Nothing else moves until it's signed, and yet reviewing it is mostly routine:
the same eight or nine clauses, held up against the same house positions,
again and again.

Our answer is an agent on Machine that keeps an eye out for incoming NDAs and
gives each one a first read within fifteen minutes of it landing. It marks up
whatever departs from our standard positions and writes a draft note for
counsel. It cannot sign, and it cannot send anything to the other side. Both
of those stay with counsel. That's how NDAs stopped being the hold-up on our
deals.

- **Team:** Machine
- **Runs on:** A check every 15 minutes
- **Connected systems:** Gmail · Google Drive · Google Docs
- **Mode:** Marks up and flags only · counsel signs

## The problem

NDAs arrive constantly and barely change from one to the next. Nearly every
deal needs one, and they come from a small set of templates with a small set
of familiar wrinkles: one-way where it should be mutual, confidentiality that
never expires, a non-solicit that reaches too far. Spotting those doesn't need
a lawyer's first read. It just needs somebody to look.

In practice, though, that somebody is counsel, and counsel's desk is stacked
with work that really does need judgment. A mostly standard NDA queues behind
a contract renegotiation, and the deal waits with it. By the time it's read,
the delay has nothing to do with how hard the document is. It's all about
where it sat in the pile.

## What we built

A **cron** on Machine goes off every 15 minutes and looks in a watched Gmail
label for a fresh NDA. Each run gets its own clean cloud computer, or sandbox.
The agent saves the attachment into a Drive folder, opens it in Docs, and works
through it clause by clause against our standard NDA playbook. Every departure
becomes a suggested edit right in the document. Then it writes a summary of
the flags as a draft reply to counsel on the original email thread, and leaves
it unsent. Counsel opens the thread and finds a markup and a summary, not a
blank page.

## How it works

### Check the inbox every 15 minutes

A **cron trigger** is a timer that looks at the watched Gmail label four times
an hour. When it fires, Machine starts a new **session**: a clean sandbox for
that run alone, loaded with whichever NDA is waiting. One NDA, one run, one
throwaway computer. Nothing is remembered between runs apart from what already
lives in Gmail and Drive.

### Teach it our house positions

Our standard NDA positions are written up as a **skill**, the playbook loaded
at the start of every session. It covers mutual or one-way, how long
confidentiality lasts, governing law, how far a non-solicit may reach,
remedies, the residuals clause, return-or-destroy duties, assignment and
indemnification. The agent measures each NDA against that, not against some
general idea of what an NDA ought to say.

### Connect only what the review needs

The agent gets to each tool through a **connector**, a narrow link whose keys
stay on our servers, so the model never handles a raw token. With those, it:

- **Watches a Gmail label.** That's how it spots a new NDA nobody has
processed yet.
- **Files a copy in Google Drive.** The document goes into a dedicated NDA
folder, so there's a lasting copy to review and mark up.
- **Marks up in Google Docs.** Each non-standard clause gets a suggested edit.
It never edits the text directly.

### Set the limits

There are exactly two things the agent can produce: a **Docs suggestion** and a
**Gmail draft**. It cannot send a reply, accept its own edit, or sign. Counsel
reads both and chooses what goes back to the other party. Credentials are
stored encrypted in the **Secrets Manager** and only handed to the agents you
grant them to.

### Counsel starts with the markup done

The result: an NDA that arrives at 9:03am has a markup and a flag summary
ready by 9:15. Standard terms are noted. Unusual ones are marked with the
section and the reason, and replacement wording is already drafted. Counsel
checks it, tweaks if needed, and sends it. Nothing goes to the other party
until counsel has looked.

> **The pattern**
> Every 15 minutes a **cron** starts a clean session with limited
> **connectors** into Gmail, Drive and Docs. Our standard positions are kept as
> a **skill**. The agent marks up and flags, and it never signs, executes or
> sends.

## Guardrails

When an agent handles an unsigned legal document, preparing it and executing
it have to be kept firmly apart:

- **Isolation.** Each run has a sandbox to itself, with access to Gmail, Drive
  and Docs and nothing else. The markup and the draft are the only things that
  come out.
- **Scoped secrets.** The Gmail, Drive and Docs keys are stored encrypted in
  the **Secrets Manager** and only handed to the agents you grant them to, when
  the sandbox starts.
- **Suggestions only.** Every change shows up as a suggested edit in Docs, not
  a direct change to the text. The original attachment is never overwritten,
  deleted or moved.
- **Never sign, execute, or send.** The flag summary sits as an unsent Gmail
  draft on the original thread. The agent has no way to countersign or to
  contact the other party. Both belong to counsel.
- **Everything is code.** The playbook, skills and the permissions for each
  system are versioned files in the repo, changed only through a reviewed
  **change request**, never a dashboard toggle.

## The outcome

- **15 minutes:** The most an incoming NDA waits for its first read
- **Redline only:** Every change is proposed as a suggestion, never applied
- **3 systems:** Gmail, Drive and Docs, handled by one agent

NDAs are no longer the paperwork holding up a deal. Instead of a cold document,
counsel opens a thread with the markup already done against our positions and
a short summary of what's unusual and why. The agent takes the first read.
Counsel still approves every word that goes back to the other party.
