Skip to main content
Loading navigation

Agent Setup and Tool Definition

Prompt source

implementation1 lines1 sectionsNo variables0 checklist items
Initialize your OpenAI agent using the **OpenAI Agents SDK**. Define at least two custom tools: one for fetching real-time stock data from Alpha Vantage (`get_stock_info(symbol: str)`) and another for fetching company news (`get_company_news(company_name: str)`). Provide the Python code for defining these tools and for initializing the agent with **GPT-4o**.