Skip to content

Sequential Task

The Sequential Task component lets you create a single step in a larger automation flow.
You give it a short description of what the step should do, tell the system what the finished result should look like, and pick an AI agent that will carry out the step. The component then turns that information into a SequentialTask object that can be added to a list of tasks for CrewAI to run.

How it Works

When you drop the component into your dashboard, it collects the values you enter for Description, Expected Output, Agent, Tools, Async Execution, and Task.
It builds a new SequentialTask object with:

  • description – the text you typed in Description
  • expected_output – the text you typed in Expected Output
  • tools – the tools that the chosen Agent can use (you can override this list with the Tools input)
  • async_execution – set to False (the input is present but not used in the current logic)
  • agent – the Agent you selected

If you already have a list of tasks connected to the Task input, the new task is added to the front of that list. The component then outputs the updated list of tasks, ready for the next step in your workflow.

Inputs

  • Agent: CrewAI Agent that will perform the task
  • Task: CrewAI Task that will perform the task
  • Tools: List of tools/resources limited for task execution. Uses the Agent tools by default.
  • Async Execution: Boolean flag indicating asynchronous task execution.
  • Expected Output: Clear definition of expected task outcome.
  • Description: Descriptive text detailing task’s purpose and execution.

Outputs

  • Task: A list of SequentialTask objects created by this component.
    This output can be fed into a later component that runs the tasks or into another part of your workflow that needs the task list.

Usage Example

  1. Add the component to your flow.
  2. Select an Agent from the dropdown (e.g., “Data Cleaner”).
  3. Enter a Description such as “Clean customer data by removing duplicates.”
  4. Define the Expected Output like “A CSV file with unique rows.”
  5. (Optional) Specify Tools if you want the agent to use only certain tools.
  6. Connect the output of this component to the next step that will execute the task list.

The component will produce a SequentialTask that the next component can run, ensuring the task is executed by the chosen agent with the defined expectations.

  • Agent – Defines the AI model and its capabilities.
  • Task – Represents a higher‑level CrewAI task that can contain multiple sequential tasks.
  • Tool – A reusable resource or function that agents can call during execution.

Tips and Best Practices

  • Write clear, concise descriptions so the agent knows exactly what to do.
  • Specify the expected output to give the agent a concrete goal.
  • Limit the tools list to only what’s necessary; this reduces confusion and speeds up execution.
  • Use the Task input to chain multiple SequentialTask components together for complex workflows.
  • Keep async_execution set to False unless you’re certain the component will support asynchronous behavior in the future.

Security Considerations

  • Data Privacy: If the task involves sensitive data, ensure the chosen agent has the appropriate permissions and that the data is handled securely.
  • Tool Restrictions: By limiting the tools list, you can prevent the agent from accessing unintended resources.
  • Audit Trail: Store the generated SequentialTask objects in a secure log so you can review what was executed and why.