Skip to content

Code Lab

Nod Explained: Drafts, Approvals and Uncertain Outcomes in a Personal AI Agent

By Miles Park·
GitHub preview of n8n-io/nod, n8n’s personal agent, with visible drafts and explicit action approvals.

CODE LAB · PROJECT SPOTLIGHT

Nod Source walkthrough

n8n’s personal agent, with visible drafts and explicit action approvals.

Preview: GitHub · n8n-io/nod

A personal agent becomes useful when it can turn scattered context into something ready to review. It also needs to represent what happened after the user approves an action. Nod, from n8n, combines a desktop agent with its own computer environment and approval workflow. We followed the creator’s reply example and inspected how the source reports completed and interrupted actions.

Look at the creator’s draft-and-approve example

Nod creator screen showing a drafted Slack reply, a confirmation question, and the user’s approval.
n8n’s public Nod demonstration. The example reply and confirmation belong to the creator’s supplied screen. Original creator page or image.

The draft is visible before the reply is sent. That gives a user a concrete item to check, including the wording and the facts pulled from another source. The conversation then records the approval and the reported action. When reviewing an agent, follow this sequence. A good draft, a clear approval, and a confirmed external result are three separate observations.

Nod creator demonstration showing a prepared call brief assembled from relevant information.
A second creator-supplied example shows the briefing workflow. It illustrates the product’s intended use. Original creator page or image.

A call brief is useful earlier in the same workflow. Ask the agent to prepare the context and cite where each important detail came from, then use that material to draft a response. Nod’s README describes macOS support and preview builds for Windows and Linux. Model access and connected-service setup depend on the chosen configuration. Check the current release instructions before installing.

Inspect the actual outcome-reporting code

n8n-io/nodTypeScript · source excerpt
Ty  src/server/approvals.ts
158    error ??159    (result && typeof result === 'object' && 'error' in result && typeof result.error === 'string'160      ? result.error161      : undefined);162  const failure =163    reason === undefined164      ? ''165      : `\n${untrustedBlock(`${action} error`, reason instanceof Error ? reason.message : String(reason))}`;166  return status === 'uncertain' || status === 'executing'167    ? `The action the user confirmed failed or was interrupted and will not be retried. Its outcome is uncertain, so check the app before trying it again. Do not report it as done.${failure}`168    : `The action the user confirmed did not run, so nothing was done. Do not report it as done.${failure}`;169}
Lines 158–169 · commit b9aec1cView original on GitHub ↗

Source credit: n8n-io/nod. Apache-2.0 license and copyright notices.

This excerpt is the end of confirmedOutcome. It chooses the message the agent receives after a trusted worker runs an approved action. An executing or uncertain state produces a warning to check the application before trying again. Other failures produce a different result. The distinction is important for messages and other actions that could be duplicated if the first attempt succeeded but its acknowledgement was interrupted.

Worked example: a simulated worker loses confirmation

We extracted the unchanged confirmedOutcome function and used its actual untrustedBlock helper. Node executed the two calls below locally. These calls test response construction from simulated worker states. They do not open a mailbox, send a message, or run a complete Nod session.

console.log(confirmedOutcome("MAIL_send", {
  status: "completed", result: {id: "demo-1"}
}).split("\n")[0]);

console.log(confirmedOutcome("MAIL_send", {status: "executing"}));
// Observed first sentence for completed
// The exact action confirmed by the user was executed once by the trusted worker. Do not repeat it.
// Observed first sentence for executing
// The action the user confirmed failed or was interrupted and will not be retried.

The completed branch reports a single execution. The interrupted branch leaves the external result uncertain and directs the agent to check the application. Imagine a reply that appeared in the service while the connection dropped. Repeating the send immediately could create a second reply. An explicit uncertainty state gives the next step enough information to inspect the service first.

Try one reviewable task before connecting a whole workflow

Start with a public-information brief or a draft addressed to a test contact. Specify the source, the desired output, and the action that needs approval. Read the result in Nod, compare it with the source, and check the external application after any action. A natural next request is “prepare a brief, cite the sources, draft a reply, and wait for me to review it.” Treat this as a reader exercise based on the documented interface. We tested the source function above and used the creator’s actual product screens for the visual walkthrough.

For another personal-agent interface, see OpenMausBot. For approval handling in another tool protocol, read Claude MCP task approvals. For a command-driven application workflow, continue with CLI-Anything.

Join the discussion

Your email address will not be published. Required fields are marked *