OpenAI Agents Tools

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2025 Oct 10 13:13
Editor
Edited
Edited
2025 Oct 12 23:51
Refs
Refs

Tools

import asyncio from agents import Agent, Runner, function_tool @function_tool def get_weather(city: str) -> str: return f"The weather in {city} is sunny." agent = Agent( name="Hello world", instructions="You are a helpful agent.", tools=[get_weather], ) async def main(): result = await Runner.run(agent, input="What's the weather in Tokyo?") print(result.final_output) # The weather in Tokyo is sunny. if __name__ == "__main__": asyncio.run(main())
 
 

Tools

Tools - OpenAI Agents SDK
Tools let agents take actions: things like fetching data, running code, calling external APIs, and even using a computer. There are three classes of tools in the Agent SDK:
 
 

Recommendations