Use AI to generate new tasks.
plan
function in ControlFlow extends the capabilities of AI workflows by allowing dynamic generation of tasks. This feature allows you to leverage AI for creating structured, goal-oriented task sequences programmatically.
plan
functionplan
function takes a high-level objective and generates a structured sequence of tasks to achieve that goal. Here’s a basic example:
plan
will generate a list of 3 tasks that, when completed, should result in an analysis of customer feedback data. These tasks might include steps like “Load data”, “Preprocess text”, “Perform sentiment analysis”, etc.
plan
can generate tasks that depend on each other or have parent/child relationships. You can influence this behavior by providing instructions
.
plan
function. It will take these into account when generating tasks and assign agents or tools to tasks as needed.