neKey

Playbook 4

Meet the Agent

No fixed steps this time. You give the agent one sentence and three tools, and it decides what to do, in what order, and when it is finished. It can read and draft. It cannot send.

  • About 15 minutes
  • Level: agent
  • Needs: n8n, AI key, ,
The clip from the talkComing soon. The steps below work without it.

The agent test

Who picks the next step? If a person decided the order when building it, it is a workflow. If the AI picks the next step while it runs, it is an agent. The diagram below has almost no arrows: just the agent and the tools hanging under it. The order is decided live.

The workflow
Main pathWhat an AI step usesStarts the run
Click any stepto see what it does in plain English.

File: . Change your setup and the diagram and file change with it.

The three tools: read_inbox reads the 10 newest emails, check_handbook searches the handbook, and write_draft posts a draft to a Teams channelto a Slack channelto your team inbox. There is no tool that sends to a customer, so the agent cannot, however it is asked.

Build it

0 steps done
  1. Load the handbook and fill the inbox

    Run Load the handbook in Playbook 2. If you did Playbook 3, unpublish it first, so it does not grab the new mail. Then email all five overnight messages to the test mailbox. You can copy them from Playbook 3; the one that matters most:

    N04Email subject: NO HEAT

    No heat. It's 52 inside and we have a newborn. Please call ASAP.

    Expect: Emergency. Pages on-call within about a minute. No draft, no approval request.

  2. Import and connect

    • AI model and Embeddings: as before.
    • read_inbox: your credential, signed in as the test mailbox.
    • write_draft: your Teams credential, team, and inbound-drafts.your Slack credential and #inbound-drafts.your credential. It always sends to , never to a customer.
  3. Give it one sentence

    Click Open chat at the bottom of the canvas and send:

    Check the Pinelands inbox and handle anything urgent.

    Watch the steps light up. Usually it reads the inbox, checks the handbook's emergency rules, writes one draft, for the newborn with no heat, and leaves the other four alone. Then it tells you, in two or three sentences, what it did.

  4. Read the log: what did it actually do?

    Open Pinelands agent in the run. The log shows each tool call in order: what it asked, what came back, and what it decided next. Compare that with its summary. When they disagree, believe the log.

  5. Change one thing: a different sentence

    Try one of these, and read which tools it picks each time:

    Draft replies to every sales question in the inbox, using handbook prices.
    Is anyone in the inbox asking about something we don't offer?
    Summarize the inbox for me in five bullets. Don't draft anything.

    Same agent, same tools, different plans. That is the power, and it is also why an agent needs a narrow job and a person reviewing its output.

Try this next

Ask it to send an email to a customer. It cannot, because no tool can. Read how it explains that. This is the safest way to limit an agent: not by asking it nicely, but by not handing it the dangerous tool.

Bring it home

Use the decision guide on your card. Is your first workflow really an agent job, or do you know the steps? If you know the steps, build a workflow. If you truly need an agent, list the tools it would need, and for each one, ask what the worst thing it could do with that tool is. Remove or restrict any tool whose worst case you would not accept.

If something goes wrong

It says the inbox is empty

Check that read_inbox is connected to the test mailbox and that Playbook 3 is not running and marking mail as read.

It drafted replies to everything

Smaller models follow instructions loosely. Read its reasoning in the log, then tighten the system message in Pinelands agent, for example: Only urgent means the handbook's Section 11 emergency rules apply. Or pick a stronger model in the AI model step.

A tool fails with a permissions error

Open the failing tool step, re-select the credential, and run again. For Teams and Slack, make sure the account can post in that channel.