The phidata cookbook contains in-depth examples and code. From basic assistants, function calling, structured output to advanced fine-tuning and evaluations.

You can run each recipe individually or clone the phidata repo and run it from there.

Clone the cookbook


Fork & clone the phidata repo

We recommend forking the phidata repo first so you can customize the cookbooks.

Fork & clone the phidata repo

git clone

cd into the phidata directory

cd phidata

Create a virtual environment

Create a virtual environment with the required libraries and install the project in editable mode. You can use a helper script or run these steps manually.

source phienv/bin/activate

Run any recipe


export OPENAI_API_KEY=sk-***

Install openai and duckduckgo-search

pip install openai duckduckgo-search

Run the assistants/ recipe

python cookbook/assistants/