AIYINGFrom AI Awareness to Accomplishment
Showing posts with label n8n. Show all posts
Showing posts with label n8n. Show all posts

Saturday, November 28, 2026

Build an n8n Calculator Agent: Three Tests for Your First Tool Call

AGENTING · Builder Lab

By Ravindra Dastikop

Ask an AI agent for 18% of 2,450 and it may give you the right answer. How do you tell whether it used the calculator you connected? In this n8n lab, faculty and engineering students check both the answer and the action that produced it.

What you need

Availability checked on 28 November 2026. n8n published stable release 2.49.6 on 25 November. This lab uses the free, self-hosted Community edition and the built-in Calculator tool. You need access to a running n8n installation and a chat model that supports tool calling. If you use a hosted model API, your provider may charge for usage.

n8n releases · Community edition documentation

Build the workflow

  1. Create a workflow and connect Chat Trigger → AI Agent.
  2. Attach a compatible chat model to the AI Agent’s Chat Model connector and configure your model credentials.
  3. Attach Calculator to the AI Agent’s Tool connector. Put the instructions below in the agent’s System Message.
  4. Open the workflow’s test chat. Run each question on its own so earlier messages cannot supply a missing number.

Help students with basic percentages. If a question asks for a numerical result and supplies all required values, call Calculator and use its result. If the student asks for a definition, explain it directly. If a required value is missing, ask for that value before calculating. Use only the values the student supplies.

Run three tests

Ask Expected behaviour
What is 18% of 2,450? Calls Calculator and returns 441.
What does percent mean? Explains “per hundred” without a tool call.
What is 18% of the total? Asks for the total before calling Calculator.

Inspect the tool call

Open the AI Agent’s execution details for each test and look for Calculator activity. For the first question, check whether the tool received the intended calculation and returned 441. For the other two, check that the agent answered or asked a follow-up without calling Calculator.

Give students two marks per test. Award one for the response and one for the action. An answer of 441 with no Calculator call earns one mark. This makes it easy to discuss what you would miss if you graded only the final answer.

n8n documentation — AI Agent · n8n documentation — Calculator

AGENTING · Accomplish with Agent

Accomplish with AI

Powered by Blogger.

Featured post

Use ChatGPT Work to Compare Weekend Classes Before You Enrol

AGENT ING · Personal Agenting By Ravindra Dastikop You want to take a weekend photography class. One provid...

Search This Blog

List of blogs

Search This Blog

About

Translate

Instant Stories

Read in Your Language

Test

share this

ShareThis

Popular Posts