Skip to main content

AgentFlowConfig

Defined in: types.ts:139

Configuration for AgentFlow.

Example

const builder = createGraphBuilder({
agentId: 'portfolio-recon',
trigger: 'user-request',
});

Properties

adapters?

readonly optional adapters?: readonly Adapter[]

Defined in: types.ts:149

Framework adapters to install.


agentId?

readonly optional agentId?: string

Defined in: types.ts:141

Identifier for the agent whose execution is being traced.


idGenerator?

readonly optional idGenerator?: () => string

Defined in: types.ts:151

Override the default counter-based ID generator.

Returns

string


logger?

readonly optional logger?: (message) => void

Defined in: types.ts:159

Custom logger (defaults to console.warn).

Parameters

ParameterType
messagestring

Returns

void


name?

readonly optional name?: string

Defined in: types.ts:145

Display name for the execution graph.


onError?

readonly optional onError?: (error) => void

Defined in: types.ts:161

Error callback for internal failures.

Parameters

ParameterType
errorunknown

Returns

void


parentSpanId?

readonly optional parentSpanId?: string

Defined in: types.ts:165

Parent span ID for linking to an upstream graph.


timeout?

readonly optional timeout?: { agent?: number; default?: number; tool?: number; }

Defined in: types.ts:153

Timeout configuration in milliseconds.

agent?

readonly optional agent?: number

default?

readonly optional default?: number

tool?

readonly optional tool?: number


traceId?

readonly optional traceId?: string

Defined in: types.ts:163

Distributed trace ID to join an existing trace.


trigger?

readonly optional trigger?: string

Defined in: types.ts:143

What initiated this execution (e.g. "user-request", "cron-job").


writer?

readonly optional writer?: Writer

Defined in: types.ts:147

Output writer for completed graphs.