spec
spec: {
description?: string;
graph: {
continuation?: "message" | "none" | "reinvoke";
durable?: boolean;
failureSemantics?: "block" | "edges";
reasoning?: string;
tasks: {
configuration:
| {
agentName: string;
message?: string;
templateParameters?: Record<string, string>;
}
| { actionName: string; inputMapping?: string; outputMapping?: string }
| { assignToUserID?: string; instructions?: string }
| { promptName: string; templateParameters?: Record<string, string> }
| {
collectionPath: string;
executionMode?: "sequential" | "parallel";
itemVariable?: string;
maxIterations?: number;
}
| { condition: string; itemVariable?: string; maxIterations?: number }
| { domain: string; ref?: string };
dependsOn: (
| string
| {
condition?: string;
dependencyType?: "Corequisite"
| "Optional"
| "Prerequisite";
exclusiveGroup?: string;
pathPoints?: string;
priority?: number;
sequence?: number;
tempId: string;
}
)[];
description: string;
inputPayload?: Record<string, unknown>;
kind:
| "Agent"
| "Action"
| "Prompt"
| "ForEach"
| "While"
| "Human"
| "External";
layout?: { height?: number; width?: number; x?: number; y?: number };
name: string;
policy?: {
onError?: "continue" | "fail";
retryCount?: number;
timeoutSeconds?: number;
};
tempId: string;
}[];
workflowName: string;
};
name: string;
notifications?: {
condition: "Always"
| "OnChange"
| "OnFailure";
recipients: string[];
};
status: "Active"
| "Paused"
| "Draft";
triggers: (
| {
entityName: string;
filter?: string;
invocationType: string;
scopeEntityName?: string;
scopeRecordID?: string;
type: "EntityEvent";
}
| { cron: string; timezone?: string; type: "Schedule" }
| { type: "OnDemand" }
)[];
}
Input for
Workflow.Save.