What is a subtask in an agent workflow?
A subtask in an agent workflow is a smaller, clearly defined piece of work that contributes to completing a larger goal.
It gives the agent a manageable unit of work that can be executed, tracked, and completed independently before moving on.
How a subtask fits into the larger goal
Suppose the overall goal is:
> Prepare a recommendation for the best project-management tool for a 20-person engineering team.
Possible subtasks might be:
- identify candidate tools
- collect pricing
- compare collaboration features
- compare integrations
- evaluate suitability
- prepare the final recommendation
Each subtask handles one part of the overall problem.
What makes a good subtask?
A useful subtask should usually be:
- specific
- limited in scope
- relevant to the main goal
- clear about what result is expected
- small enough to execute and evaluate
For example:
Too vague: Research pricing
Better: Collect the current monthly team-plan pricing for the three selected tools
The second version gives the agent a clearer piece of work.
A subtask should have an expected output
A subtask is easier to manage when the agent knows what it should produce.
For example:
Subtask: Check whether each candidate integrates with GitHub.
Expected output: A list showing which candidates support GitHub integration.
That output can then be used by a later subtask, such as comparing the candidates.
Subtasks can depend on one another
Some subtasks cannot begin until another subtask is complete.
For example:
- Identify three candidate tools.
- Collect pricing for those tools.
- Compare their features.
- Recommend one.
The second task depends on the first because the agent must know which tools to investigate.
These relationships are called task dependencies.
Some subtasks can run independently
Not every subtask needs to wait for another.
After selecting candidate tools, an agent might independently:
- collect pricing
- check integrations
- review collaboration features
If the system supports parallel execution, these independent subtasks may be handled at the same time.
Subtask vs. agent step
A subtask and an agent step are not necessarily the same thing.
A subtask represents a piece of the problem that needs to be completed.
An agent step is one unit of execution.
A single subtask may require several steps.
For example:
Subtask: Find the cheapest direct flight.
The agent might need several steps to:
- search one flight source
- search another source
- compare prices
- validate that the flight is direct
All of those execution steps may belong to the same subtask.
Subtask vs. goal
The goal is the overall desired outcome.
A subtask is one smaller unit of work that helps reach that goal.
For example:
Goal: Plan a business trip.
Possible subtasks:
- find flights
- find a hotel
- estimate transportation costs
- prepare the itinerary
Completing one subtask does not necessarily mean the overall goal is complete.
Subtasks can be tracked in agent state
An agent may store the status of each subtask.
For example:
- Find flights — completed
- Find hotel — completed
- Estimate local travel — in progress
- Prepare itinerary — pending
This makes it easier to know what has already been done and what still needs attention.
Why subtasks are useful
Subtasks help agents:
- organize complex work
- track progress
- manage dependencies
- recover from failures
- assign work to different tools or agents
- avoid repeating completed work
- determine what should happen next
They turn a large goal into smaller units that are easier to control.
In short
A subtask is a smaller, executable piece of work inside a larger agent workflow.
Each subtask contributes to the overall goal and can have its own expected output, status, dependencies, and execution steps.
Learning Sequence
AI Agents Curriculum
Explore Related Questions
Deepen your understanding across related AI Agents topics.