Skip to main content

createGraphBuilder()

createGraphBuilder(config?): GraphBuilder

Defined in: graph-builder.ts:83

Create a new execution graph builder.

Parameters

ParameterTypeDescription
config?AgentFlowConfigOptional configuration (agentId, trigger, custom ID generator, etc.).

Returns

GraphBuilder

A GraphBuilder with methods to construct the graph incrementally.

Example

const builder = createGraphBuilder({ agentId: 'portfolio-recon', trigger: 'cron' });
const rootId = builder.startNode({ type: 'agent', name: 'recon' });
builder.endNode(rootId);
const graph = builder.build();