The AI agent workflow -HTTP request doesn't get executed

The HTTP Request as tool doesn’t execute as I am using weather API, it works fine if I execute only HTTP request.

Describe the problem/error/question

The Agent workflow for Chat doesn’t execute HTTP request as a tool, the Model and memory gets executed.

What is the error message (if any)? No error message

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3.1,
“position”: [
208,
0
],
“id”: “8b52cf61-f636-44db-904d-50a59e4b1857”,
“name”: “AI Agent”
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “993c84c6091ee0fcad5311df4061f087139e29f8806117a22d85cb11a1915921”
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

welcome to the n8n community @chackosh

I think the main problem is that the JSON you shared only shows the AI Agent by itself, with no connected tool, so there’s nothing there for the agent to actually call. If the HTTP Request works on its own but not inside the agent, my first guess is that it isn’t attached to the agent as a tool, or it doesn’t have a clear enough tool description for the model to know when to use it. In your place, I’d first connect the HTTP Request directly as a tool to the AI Agent, make the tool description very explicit, and then test again with a prompt that clearly requires live weather data rather than something the model could try to answer on its own.

Thank you for the response, Http request tool is connected to the Agent and the api link of weather is been provided

Could you share a screenshot or workflow JSON that includes the HTTP Request node connected to the AI Agent as a tool? the next things I’d check are the tool description and whether your prompt clearly forces the agent to use live weather data instead of answering from the model alone.

Ah, got it, the screenshot hadn’t shown up yet when I replied.
I’d focus on making the tool description very explicit and testing with a prompt that clearly requires live weather data, because otherwise the model may try to answer on its own instead of calling the HTTP Request. If you can, please also share the tool description and the exact user prompt you tested with, because that will probably show why the agent is choosing not to use it.

Tool Description -The weather data should be updated

Input: Weather in Basildon

I’d make the tool description much more specific, because “The weather data should be updated” is too vague. I’d also test with a prompt that clearly asks for the current live weather in Basildon, since otherwise the model may try to answer without using the HTTP tool.

This is the tool description now : Fetches real-time, current weather data for a given location using a live weather API.
Use this tool whenever the user asks about current, live, or up-to-date weather conditions,
temperature, humidity, wind speed, or forecasts. Do NOT answer weather questions from memory
always call this tool to retrieve fresh data.

Prompt: What is the current live weather in Basildon, Essex right now?

This is the response I received:

I’m sorry, I cannot tell you the weather in Basildon. The available tools lack the desired functionality.

I’d check whether the HTTP Request node has its city or query parameters set up with $fromAI() or another clear input field the agent can populate. If the tool has no usable dynamic input, the agent may see it as connected but still unusable. The agent now clearly wants to use a weather tool, but it still says the available tools lack the needed functionality, which usually means the HTTP tool is not exposing the location in a way the agent can actually fill in.

This was the API in Http request-https://api.open-meteo.com/v1/forecast?latitude=51.5684&longitude=0.4578&hourly=temperature_2m&timezone=Europe%2FLondon

since there is no mention of Basildon, it was giving an error, when I asked for London temperature it worked. Can Http request take the whole region instead of every city it should be specified in API

Hi @chackosh Your approach is a bit wrong, i would recommend not passing the HTTP node as a tool for the AI agent instead use 2 AI agents , one would curate the link if that is dynamic and then place the HTTP node right after the AI agent and let the AI agent output the link only and process that link using HTTP and then use another agent to curate a reply if that is how it supposed to be, currently passing all those tools may sound easy but that is really not a good approach for solving that kind of problem. (For AI not executing that HTTP node, first use OpenAI Models, second give a good prompt and that should be it)

Yeah the issue is your weather API is hardcoded — the agent sees the tool but can’t figure out how to fill in the location parameter because there’s no input field for it. the HTTP node needs either $fromAI() as input or a separate step first that takes the location from the agent and calls geocoding, then passes coords to your weather request. that’s why Anshul suggested two agents, lets you stage it like agent outputs location → HTTP geocoding → agent processes result.

Tool Description -The weather data should be updated

Input: Weather in Basildon

Thank you everyone for your suggestion, will plan to implement,

I am not able to figure out to resolve with 2 Agents, need some technical help