We're now in the world of agents. Agents do the work for you by acting on an instruction you give them. So if you're building agents, understanding how to add tools to your agents helps you build agents that don't just chat, but can also do stuff for you.
Tools are how you extend the capabilities of an agent. Using tools, agents can access and search external information such as the internet, databases, and APIs. With tools, agents also perform calculations and specialized processing such as mathematical operations, data analysis, and more. They can create, modify, and manage content by generating documents, execute code or system commands, and connect to any external service such as weather APIs, payment systems, and enterprise software.
Simply put, I like to think of tools as a makeup artist's toolkit; just like a makeup artist chooses specific brushes and products based on the look they're creating, the agent selects the right tools for the job. Ok, maybe a different analogy for you, think of tools as a chef's equipment, the chef doesn't use every pot and pan for every dish, but selects the right tools based on the tasty dish they're preparing. Your agent orchestrates its tools to complete your request and what I find really great here is that you don't tell the agent which tools to use, it figures it out on its own through autonomous reasoning.
In this post which is Part 1 of a series, I'll introduce you to tools in agentic AI, show you how Strands Agents SDK implements them, and walk you through a real example, a Seasonal Wardrobe Curator Agent I built using Strands. By the end, you'll understand what tools are, why you should care about them if you're building agents, and how to use tools with your own agents.
I want the Seasonal Wardrobe Curator Agent to do the tasks outlined below, so keep all this in mind as we start to look at the code in the subsequent sections:
You [agent] help users curate their wardrobe for the current season by:
1. First determining what season it is.
2. You understand their gender and style preferences.
3. You research recent fashion shows and trending styles for the current season.
4. Then, you create a curated wardrobe shopping list with checkboxes.
5. Finally, calculate budget estimates in South African Rand (ZAR) when asked.
Let's get started.
Tools in Strands Agents SDK
Now, looking at how Strands Agents SDK implements tools, there are two types of tools in Strands; built-in tools and custom tools. Let's dive in to each one of them.
1. Built-in tools
Strands Agents Tools is a community-driven project that provides a powerful, ready-to-use set of (built-in) tools for your agents.
Here's the import to load them to our agent:
from strands_tools import calculator # For point 5 in the task outline above, budget calc.
agent = Agent(
model=model,
tools=[calculator] # One lineβthat's it!
)
With one import line you've loaded tools (in this case, the Calculator tool, ready to use by your agent. Because this is a built-in tool, there's no decorator required and due to it being from a community-driven project, you're assured that it's being tested and maintained by the community. Common built-in tools include the Calculator for mathematical operations, HTTP request for API interactions, and more.
2. Custom tools
When you need domain-specific functionality that doesn't exist in the community package, you can create custom tools using the @tool decorator. Here's an implementation for the season detector functionality (point 1 in the task outline above):
from strands.tools import tool
from datetime import datetime
SEASON_MAP = {
"southern": {(12, 1, 2): "Summer", (3, 4, 5): "Autumn", (6, 7, 8): "Winter", (9, 10, 11): "Spring"},
"northern": {(12, 1, 2): "Winter", (3, 4, 5): "Spring", (6, 7, 8): "Summer", (9, 10, 11): "Autumn"},
}
SOUTHERN_LOCATIONS = {"South Africa", "Southern Hemisphere", "Australia", "New Zealand"}
def _get_season(month: int, hemisphere: str) -> str:
for months, season in SEASON_MAP[hemisphere].items():
if month in months:
return season
return "Unknown"
@tool
def get_current_season(location: str = "South Africa") -> str:
"""
Determines the current season based on the date and location.
Args:
location: Geographic location (default: South Africa for Southern Hemisphere)
Returns:
The current season name and additional context
"""
now = datetime.now()
hemisphere = "southern" if location in SOUTHERN_LOCATIONS else "northern"
season = _get_season(now.month, hemisphere)
label = "Southern Hemisphere" if hemisphere == "southern" else "Northern Hemisphere"
return f"Current season: {season} ({label}) - {now.strftime('%B %Y')}"
Custom tools give you full control over functionality as they can be tailored to your specific needs and are reusable across multiple agents (for example, I created the custom tool in it's own separate Python file season_detector.py). In addition to the calculator custom tool, I also created web search (to find current fashion trends) and file operations (to save the wardrobe checklist) custom tools (points 3 and 4 of the task outline above). Here's how I load them to the agent.
from tools.season_detector import get_current_season
from tools.web_search import web_search
from tools.file_ops import write_file
The agent now has access to four tools; three custom (season detection, web search, file operations) and one built-in (calculator).
tools=[get_current_season, web_search, calculator, write_file]
3. System prompts
Finally, I want to guide the agent with system prompts. The system prompt should describe the agent's role and capabilities, when to use each tool, and the expected behavior and tone.
system_prompt="""You are a Seasonal Wardrobe Curator Agent specializing in fashion recommendations for South African users.
YOUR ROLE:
You help users curate their wardrobe for the current season by:
1. First, use the get_current_season tool to determine what season it is
2. Understanding their gender and style preferences
3. Researching recent fashion shows and trending styles for the current season
4. Creating a curated wardrobe shopping list with checkboxes
5. Calculating budget estimates in South African Rand (ZAR) when asked
IMPORTANT:
- All budget calculations must be in South African Rand (ZAR)
- Use realistic South African pricing for clothing items
- Consider local fashion retailers and brands when relevant
Be enthusiastic, knowledgeable, and helpful!"""
4. Bringing it all together
When I run the agentic AI application to ask for wardrobe curation, the agent autonomously orchestrates the tools. Here's the result I get when running it in the terminal.
I've created a comprehensive autumn wardrobe checklist perfectly tailored for you! Here's your budget breakdown for R5,000:
**BUDGET ALLOCATION:**
- **Outerwear & Layers**: R1,750 (35%)
- **Tops & Blouses**: R1,250 (25%)
- **Bottoms**: R1,000 (20%)
- **Footwear**: R750 (15%)
- **Accessories**: R250 (5%)
**KEY HIGHLIGHTS:**
**Perfect for SA Autumn**: Your checklist considers our unique climate - cool mornings that warm up during the day
**Smart Layering**: Focus on versatile pieces that work together for maximum outfit combinations
**Local Shopping Guide**: Included South African retailers across all price points
**Color Palette**: Trending autumn colors including warm earth tones, jewel tones, and classic neutrals
** Your Shopping Strategy:**
1. Start with outerwear (your biggest investment pieces)
2. Build a foundation with versatile tops
3. Add coordinating bottoms
4. Complete with footwear and accessories
The checklist includes realistic South African pricing and considers local brands like Superbalist and retailers like Woolworths. Each item has a checkbox so you can track your shopping progress!
Would you like me to adjust any budget categories or add specific items you have in mind? I can also help you plan outfits once you start shopping!
I can mark items I own with [X] and leave [ ] for items to shop for.
Find full code in my GitHub repository.
What's Next
In Part 2 of this series I'll be extending my Wardrobe Curator with Model Context Protocol (MCP) to go from recommendations to real shopping. In the meantime, I can't wait to hear what you build with agents using tools, let me know in the comments below.
Top comments (0)