TaskFlow
Orchestrate multi-step agent workflows with retry, input resolution, and parallel execution.
Overview
TaskFlow
is a flexible, agent-based orchestration utility designed for chaining and executing multiple AI agents in a structured, sequential, or parallel fashion.
It supports:
- Step-based and parallel execution of agents
- Dynamic input mapping with references to prior outputs
- Retry policies per step or globally
- Output tracking and structured result return
- Optional callbacks on step completion
TaskFlow
is a powerful orchestration engine designed to coordinate multiple AI agents and tools in a structured sequence or parallel execution pattern. It enables complex LLM pipelines with dynamic input resolution, retries, and step-by-step control.
β¨ Features
- Step-by-step agent orchestration
- Input templating using
{{agent_name.key}}
- Parallel execution support
- Retry policy for each step
- Optional callbacks after steps
- Full flow trace access
π§ Example Use Case
Letβs define a flow to extract information and summarize it.
1. Define Agents
2. Compose the TaskFlow
3. Run It
π§© Dynamic Input Mapping
You can reference any previous stepβs output using:
{{input}}
: Original input{{agent_name.key}}
: Output from a specific agent
Example:
π Retry on Failure
Set retry policy for resilience:
Or globally:
β‘ Parallel Execution
Run steps concurrently if independent:
π Callbacks
Hook into each step:
π§ͺ Output Structure
β Best Practices
- Keep agents focused (1 purpose per agent)
- Reuse tools through agents
- Use retries on weak/volatile steps
- Combine TaskFlow with UI or APIs
π Tool-Based Agent Example
π Interface Summary (TS)
π― Use Case Ideas
Use Case | Description |
---|---|
Research Bot | Search β summarize β report |
Support Assistant | Classify β fetch KB β reply |
Market Analysis | Scrape β analyze β visualize |
Workflow Engine | Multi-agent automation with retries |
TaskFlow
brings composability and robustness to AI-based systems. Use it to turn isolated agents into scalable intelligent workflows.