New Tool Radar

AI Agents & Automation

How to Write an n8n AI Agent System Message That States the Tool Rules

Write a short system message for an n8n AI Agent node that names each tool, says when to call it, and sets the reply style.

Schematic diagram with three steps: List the tools, Write one rule each, then Test a wrong-tool case.

The system message is the standing instruction for an n8n AI agent, and it is where tool discipline lives. The model reads the tool names and descriptions when it decides, but the system message is what tells it which tool to prefer, what never to do, and how to shape the reply.

Before you start

You need a working n8n AI Agent node with its tools attached. Write down the tool list first: one line per tool with its name and the single job it does.

Write four short parts: role, tools, rules, reply style

Open the AI Agent node options and write the system message in four short parts. First the role in one line, for example support agent for a bike shop. Then one line per tool saying when to call it. Then the rules: never invent a live status, always call the Calculator for totals, and never send an email without approval. Then the reply style: short, one answer, and name the source of each fact.

Test the message with a question that tempts the wrong tool

Ask a question where two tools could apply, for example a question that needs both a lookup and a sum. Check the execution log: the agent should call the lookup first, then the Calculator, in that order. If it calls the wrong tool first, the system message line for that tool needs to be more specific about when it applies.

Worked example: System message for a fictional bike shop agent

Maple Cycles is a fictional bike shop. Its agent has a Wikipedia tool and a Calculator tool. The table shows the four parts of its system message.

Part Text in the system message
Role You are the support agent for Maple Cycles bike shop.
Tools Use Wikipedia for background facts. Use Calculator for every total.
Rules Never invent a price or a stock level. Never send email.
Reply style Answer in two short sentences and name the source of each fact.

Expected result (UNTESTED): the test question produces a lookup call followed by a Calculator call, and the reply is two sentences that name the source. We checked the n8n tutorial, which places the agent instructions in the System Message field under Options, but we did not run the test on a live n8n instance.

Limits

A system message guides the model, it does not enforce anything. A determined or confused model can still skip a tool, so the execution log is the real check. Keep the message short: long instructions get ignored more often than short ones.

Sources

See all