Skip to content

Sequential Task Agent

The Sequential Task Agent lets you set up an AI agent that can perform a specific task and then pass that task on to the next one in a chain. Think of it as a “task builder” that creates a ready‑to‑run job for your automation workflow.

How it Works

When you drop this component into your dashboard, it does two things:

  1. Builds an Agent – It takes the role, goal, backstory, and any tools you give it, and creates a CrewAI Agent. The agent can remember past interactions (if you enable memory), talk loudly about what it’s doing (verbose), and even run code or hand off work to other agents if you allow it.

  2. Creates a Task – Using the task description and the expected output you provide, it creates a CrewAI Task that the agent will execute. If you already have a previous task, it will link the new one to that list, so you can build a sequence of tasks that run one after another.

The component returns a list of SequentialTask objects that you can feed into other parts of your workflow.

Inputs

The following fields let you configure the agent and the task it will perform. All names are shown exactly as they appear in the dashboard.

  • Model: The language model that will run the agent.
  • Previous Task: The previous task in the sequence (for chaining).
  • Tools: Tools at the agent’s disposal.
  • Agent kwargs: Additional keyword arguments for the agent.
  • Allow Code Execution: Whether the agent is allowed to execute code.
  • Allow Delegation: Whether the agent is allowed to delegate tasks to other agents.
  • Async Execution: Boolean flag indicating asynchronous task execution.
  • Backstory: The backstory of the agent.
  • Expected Task Output: Clear definition of expected task outcome.
  • Goal: The objective of the agent.
  • Memory: Whether the agent should have memory or not.
  • Role: The role of the agent.
  • Task Description: Descriptive text detailing task’s purpose and execution.
  • Verbose: Whether the agent should log detailed information.

Outputs

  • Sequential Task: A SequentialTask object that contains the configured agent and task. This can be passed to other components that run or chain tasks.

Usage Example

  1. Create a new Sequential Task Agent in your dashboard.
  2. Fill in the fields:
    • Role: “Data Cleaner”
    • Goal: “Remove duplicate rows from the sales dataset.”
    • Backstory: “You are a seasoned data engineer with 10 years of experience.”
    • Task Description: “Scan the CSV file, identify duplicates, and output a cleaned file.”
    • Expected Task Output: “A CSV file with no duplicate rows.”
  3. Connect a CSV Reader component to the Model input so the agent can read the file.
  4. Set Allow Code Execution to true if you want the agent to run a Python script for cleaning.
  5. Leave Previous Task empty if this is the first task.
  6. Click Run. The component will return a SequentialTask that you can feed into a Task Runner component to execute the cleaning job.
  • CrewAI Agent – Create an agent without a task.
  • CrewAI Task – Define a task that can be run by an existing agent.
  • Task Runner – Execute a list of SequentialTask objects.

Tips and Best Practices

  • Keep the Task Description concise but clear; the agent uses it to understand what to do.
  • Use Tools (e.g., file readers, database connectors) to give the agent everything it needs.
  • If you need the agent to remember context across multiple tasks, enable Memory.
  • For long‑running jobs, set Async Execution to true so the workflow can continue without waiting.
  • Enable Allow Code Execution only when you trust the code the agent will run.

Security Considerations

  • Allow Code Execution can run arbitrary code. Enable it only when you trust the source of the agent’s instructions.
  • Use Tools that are sandboxed or have strict permissions to avoid accidental data leaks.
  • Keep the Model and any API keys secure; do not expose them in public workflows.