pip install transformers[agents]
To use openAI models, you instantiate an [OpenAiAgent] after installing the openai dependency:

pip install openai

from transformers import OpenAiAgent
agent = OpenAiAgent(model="text-davinci-003", api_key="")

To use BigCode or OpenAssistant, start by logging in to have access to the Inference API:

from huggingface_hub import login
login("")

Then, instantiate the agent