HomeAgents - AIAI Agent: Two-Tool Weather Agent

AI Agent: Two-Tool Weather Agent

This example builds a ReAct-style agent equipped with two weather tools — a current-conditions tool and a forecast tool — to demonstrate something a single-tool agent can’t: real tool selection.

With only one tool available, an agent never actually has to choose anything — it just calls the tool it has. Here, the agent is given two tools with different purposes (“what’s the weather right now” vs. “what will it be like tomorrow”), and has to figure out from the wording of a question which one actually applies. Ask it about going outside right now, and it checks current conditions. Ask whether you’ll need an umbrella tomorrow, and it switches to the forecast tool instead — all without any hardcoded routing logic telling it which to use.

The key idea worth taking away: this routing decision comes entirely from well-written tool docstrings, not from custom logic in the code. That’s the reasoning step that separates a true agent from a simple API wrapper — and it’s a good example of the kind of decision-making agents are trusted to make on their own.

ReAct_agent_with_two_weather_tools_and_memory

Share: 

No comments yet! You be the first to comment.

Leave a Comment

Your email address will not be published. Required fields are marked *