ControlFlow is under active development. You should pin to a specific version if you want to avoid breaking changes. However, we recommend frequent updates to get new features and bug fixes.

Install ControlFlow

You can install ControlFlow with pip:

pip install controlflow 

Provide an API key

OpenAI

ControlFlow’s default LLM is OpenAI’s GPT-4o model, which provides excellent performance out of the box. To use it, you’ll need to provide an API key as an environment variable:

export OPENAI_API_KEY="your-api-key"

Anthropic

To use an Anthropic model, provide an API key as an environment variable and change the default LLM, like this:

export ANTHROPIC_API_KEY="your-api-key"
export CONTROLFLOW_LLM_MODEL="anthropic/claude-3-5-sonnet-20240620"

Other providers

ControlFlow supports many other LLM providers as well, though you’ll need to install their respective packages and configure the default LLM appropriately. See the LLM documentation for more information.

Next steps

Dive right into the quickstart, or read the tutorial for a step-by-step guide to creating your first ControlFlow workflow.