Token usage discrepancy in n8n editor vs Anthropic console logs

Hi all. I’m facing a bit of an issue that I hope someone could shed some light on.
So I’ve been playing around with n8n as I’m sort of a newbie to it. I build an ai agent that can book, cancel or reschedule meetings/events in google calendar.

When I make a booking, the logic behind it is to check if there is availability at that time slot, and then book it if there is.

In the n8n editor Logs, it shows the initial call to check availability consumes around 460 tokens, and then the second run to book the meeting uses around 660 tokens, for a total of around 1200 tokens.

However, in my Anthropic consoles logs, it shows that the initial call to check availability consumes around 1700 tokens (of which only 100 is output) , and then the second run to book the meeting uses around 1895 tokens ( of which only 27 was output).

My system prompt is 400 tokens, and I jus tried this with Claude Haiku 3.

Am I doing something wrong/ misunderstanding something? If so, what’s the normal token usage I should be aiming for?

Hey @OG1Kanobe Welcome to the community!
Hard to say but one thing to note that there’s quite a bit of token usage parsing logic from when the values come back from the request to when it finally displays in the UI - it’s unlikely what you’re seeing are the actual raw numbers!

One tip could be to enable the option “Return Intermediate Steps” in the AI agent node. This gives you more visibility of the response object when a tool is used.