Workflow definition

Defines a multi-step process that orchestrates agents, tools, and other operations.

const workflow: Workflow = {
id: 'customer-onboarding',
name: 'Customer Onboarding',
version: '1.0.0',
steps: [
{
type: 'agent',
id: 'step-1',
agentId: 'welcome-agent',
input: { type: 'variable', name: 'customerData' },
output: 'welcomeMessage'
},
{
type: 'tool',
id: 'step-2',
toolName: 'sendEmail',
input: { type: 'variable', name: 'welcomeMessage' }
}
],
timeout: 300000
};
interface Workflow {
    id: string;
    name: string;
    version: string;
    steps: WorkflowStep[];
    triggers?: WorkflowTrigger[];
    timeout?: number;
    metadata?: Record<string, unknown>;
}

Properties

id: string

Unique identifier

name: string

Human-readable name

version: string

Semantic version

steps: WorkflowStep[]

Workflow steps

triggers?: WorkflowTrigger[]

Trigger configuration

timeout?: number

Overall timeout in milliseconds

metadata?: Record<string, unknown>

Additional metadata