Tool-calling

This example shows the basic tool-calling design pattern for agents.

While this leverages the OpenAI API, the lessons are the same whether you use different tool-calling APIs (E.G. Anthropic), or general structured outputs (E.G. with instructor).

Rather than explain the code here, we direct you to the blog post

Files

  • application.py -- contains code for calling tools + orchestrating them
  • notebook.ipynb -- walks you through the example with the same code
  • [requirements.txt] -- install this to get the right environment