Agent toolbox: stock data tool
This exercise is part of the course
Multi-Agent Systems with LangGraph
Exercise instructions
Make sure to first run the cell to install the libraries
- Create a tool called
stock_data_tool()
that takes a stock ticker symbol (company_ticker
) and number of days to look back over (num_days
), and returns a markdown-formatted table containing the stock performance data of that company over that period. - Invoke the tool on
"META"
over4
days to test that it works—note that the table only contains business days, so the number of rows can be less thannum_days
.
Note: If you’re running DataLab in Restricted Mode, this exercise isn’t supported yet. We’re actively working on making it available in the future.
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
