Tools
Tools are what give AI agents their power. Without tools, an AI agent is just a text generator. With tools, it can search the web, execute code, read files, call APIs, and take actions in the real world.
10 min•By Priygop Team•Updated 2026
Common AI Agent Tools
- Web search: search the internet for current information (Google, Bing, DuckDuckGo)
- Code execution: write and run Python, JavaScript, or other code
- File operations: read, write, and organize files on your computer
- API calls: interact with external services (weather, news, databases, CRMs)
- Calculator: perform arithmetic accurately (LLMs are bad at math, tools are not)
- Email: read and send emails on your behalf
- Calendar: create, read, and update calendar events
- Browser control: open web pages, click buttons, fill in forms
- Database: query and update a database
How an Agent Uses a Tool
How an Agent Uses a Tool
# How an AI agent uses a tool - concept illustration
def simulate_agent_tool_use(goal, available_tools):
"""
Simulate how an agent decides which tool to use at each step.
This is a simplified illustration of the ReAct pattern
(Reason, Act, Observe, Repeat)
"""
print(f"Goal: {goal}")
print(f"Available tools: {list(available_tools.keys())}")
print()
# The agent reasons about what to do first
steps = [
{
"thought": "I need to find recent information about AI trends. I should use web search.",
"action": "web_search",
"action_input": "top AI trends 2024",
"observation": "Found 10 results about AI trends including multimodal AI, AI agents, and fine-tuning."
},
{
"thought": "I have search results. Now I need to extract the key points from the most relevant article.",
"action": "read_webpage",
"action_input": "https://example.com/ai-trends-2024",
"observation": "Article covers 5 key trends: AI agents, multimodal AI, RAG systems, fine-tuning, and edge AI."
},
{
"thought": "I have the information I need. Now I should write the summary.",
"action": "write_file",
"action_input": {"filename": "ai_trends_summary.txt", "content": "Top AI Trends 2024: 1. AI Agents..."},
"observation": "File written successfully."
},
]
for i, step in enumerate(steps, 1):
print(f"Step {i}:")
print(f" Thought: {step['thought']}")
print(f" Action: {step['action']}('{str(step['action_input'])[:50]}...')")
print(f" Observation: {step['observation']}")
print()
print("Goal complete: Summary written to ai_trends_summary.txt")
available_tools = {
"web_search": "Search the internet",
"read_webpage": "Read the content of a URL",
"write_file": "Write content to a file",
}
simulate_agent_tool_use(
"Research the top AI trends in 2024 and write a summary to a file.",
available_tools
)Diagram
Loading diagram…
Deep Learning ⊂ Machine Learning ⊂ Artificial Intelligence
Key Takeaways
- Tools are what give AI agents their power.
- Web search: search the internet for current information (Google, Bing, DuckDuckGo)
- Code execution: write and run Python, JavaScript, or other code
- File operations: read, write, and organize files on your computer