Workflow Engine Kit
Define and execute multi-step agent workflows with conditions, parallel execution, and error handling.
0/6 steps
⚡
Fetch raw data from API
pendingaction1200ms expected
❓
Validate data schema
pendingcondition200ms expected
⚡
Transform & clean data
pendingaction800ms expected
⚡⚡
Run parallel aggregations
pendingparallel1500ms expected
⚡
Generate report
pendingaction2000ms expected
⚡
Send notification
pendingaction300ms expected
Integration Code
import { createWorkflow, Step } from 'agent-tools-kit/execution'
const workflow = createWorkflow('Data Processing Pipeline')
.step('fetch', Step.action(async () => fetchData()))
.step('validate', Step.condition(async (data) => schema.validate(data)))
.step('transform', Step.action(async (data) => cleanData(data)))
.step('aggregate', Step.parallel([
async (data) => aggregateByRegion(data),
async (data) => aggregateByProduct(data),
async (data) => aggregateByTime(data),
]))
.step('report', Step.action(async (results) => generateReport(results)))
.onError('rollback')
const result = await workflow.execute()
// result.steps, result.outputs, result.duration