n8n Version: 1.123.5
using online n8n on third party cloud.
hi everybody,
I am a newbie in n8n.
I am learning AI agent. I put some tools to ai agent and use one of ai model (deepseek), when I ask "what is the latest model from openai", I found it iterate a several times.
My question is , 1) why it will have such behavior? Actually, the deepseek or other online api model have an ability to search such infomation from itself.
2) even though it needs to find such information, it needs my system prompt instruction to ask AI agent to use SerpAPI. However, I didn't set any system prompt in the workflow. why it will know to use such tool?
Hey @Alan_Cheung1 !
If you connect SerpAPI or any othrras a tool to the AI Agent, the agent knows that “web search” is available and may choose to call it even if you don’t define a custom system prompt. The default system message (“You are a helpful assistant”) is still there in the background, and the agent logic is: “I have tools i can use them if they help answer the question.”…
Soo it chooses to, because the tool is available and the question (“latest model from OpennAI”) clearly sounds like a “live web” question… it’s part of their “abilities” .
And about how many times run s is…: once to decide to use a tool, and once after the tool returns data so it Pprepares the final answer.
Cheers!
1 Like
thanks for your prompt reply!
but why the agent doesn’t use calculator or others? it knows to apply SerpAPI, does it mean the AI agent know SerpAPI is used for searching information from web?
regards,
alan
To test this behavior, remove and add the tool.
Set Temperature to lowest value so us exteeme deterministic etc…
I woukd gladly so somethingthat can test the “capabilitie” of the n8n ai agent itself on how decides to call or not a tool(other tools are maybe more complex structure, how thus tools are defined at low level)… 
Good point on this, but in the future all models will get better and better, so maybe we won’t necessarily describe tools or define parameters etc…
Soo… I don’t have a direct answer to you , on why and why not. 
Cheers!