ControlFlow is a Python framework for building agentic AI workflows.
An agentic workflow is a process that delegates at least some of its work to an LLM agent. An agent is an autonomous entity that is invoked repeatedly to make decisions and perform complex tasks. To learn more, see the AI glossary.
ControlFlow provides a structured, developer-focused framework for defining workflows and delegating work to LLMs, without sacrificing control or transparency:
This task-centric approach allows you to harness the power of AI for complex workflows while maintaining fine-grained control. By defining clear objectives and constraints for each task, you can balance AI autonomy with precise oversight, letting you build sophisticated AI-powered applications with confidence.
Here’s a simple but complete ControlFlow script that writes a poem:
The run()
function is the main entry point for ControlFlow. This single line of code creates a task, assigns it to an agent, and immediately executes it, returning the result. You can completely customize those behaviors by learning more about tasks, agents, and flows.
Let’s explore some of ControlFlow’s key features:
ControlFlow tasks can return more than just text, including any structured data type supported by Pydantic:
You can also output a list of strings or choose from a list of predefined options:
Provide any Python function as a tool for agents to use:
Assign multiple agents to a task to enable collaboration:
Quickly give agents the ability to chat with users:
Use flows to create complex workflows by running all tasks with a shared context and message history:
By providing a structured yet flexible approach to AI development, ControlFlow empowers you to create robust, intelligent applications with confidence.
ControlFlow is a Python framework for building agentic AI workflows.
An agentic workflow is a process that delegates at least some of its work to an LLM agent. An agent is an autonomous entity that is invoked repeatedly to make decisions and perform complex tasks. To learn more, see the AI glossary.
ControlFlow provides a structured, developer-focused framework for defining workflows and delegating work to LLMs, without sacrificing control or transparency:
This task-centric approach allows you to harness the power of AI for complex workflows while maintaining fine-grained control. By defining clear objectives and constraints for each task, you can balance AI autonomy with precise oversight, letting you build sophisticated AI-powered applications with confidence.
Here’s a simple but complete ControlFlow script that writes a poem:
The run()
function is the main entry point for ControlFlow. This single line of code creates a task, assigns it to an agent, and immediately executes it, returning the result. You can completely customize those behaviors by learning more about tasks, agents, and flows.
Let’s explore some of ControlFlow’s key features:
ControlFlow tasks can return more than just text, including any structured data type supported by Pydantic:
You can also output a list of strings or choose from a list of predefined options:
Provide any Python function as a tool for agents to use:
Assign multiple agents to a task to enable collaboration:
Quickly give agents the ability to chat with users:
Use flows to create complex workflows by running all tasks with a shared context and message history:
By providing a structured yet flexible approach to AI development, ControlFlow empowers you to create robust, intelligent applications with confidence.