Skip to content

ExtractionCapability

Agent-level extraction: collects structured data across turns using a single submit_extracted_data tool. Distinct from flow-node extraction in per-node extraction — this is for standalone agents, not flow nodes.

new ExtractionCapability(config): ExtractionCapability;
Parameter Type

config

ExtractionCapabilityConfig

ExtractionCapability

readonly name: "extraction-capability" = 'extraction-capability';

Human-readable name used in telemetry and diagnostics.

ExtractionStrategy.name
get data(): Record<string, unknown>;

Read the data collected so far.

Record<string, unknown>

getPromptSections(): CapabilityPromptSection[];

What does this capability contribute to the system prompt?

CapabilityPromptSection[]

Capability.getPromptSections


getTools(): ToolDeclaration<unknown, unknown>[];

What tools does this capability expose for the current state?

ToolDeclaration<unknown, unknown>[]

Capability.getTools


processToolResult(
toolName,
args,
result): CapabilityAction | null;

A tool was called and executed. Does this capability handle the result?

Parameter Type Description

toolName

string

The name of the tool that was called

args

unknown

The arguments passed to the tool

result

unknown

The result returned by the tool’s execute()

CapabilityAction | null

An action telling the host what to do, or null if this capability doesn’t handle this tool.

Capability.processToolResult


runExtractionPass(params): Promise<ExtractionPassResult>;

ExtractionStrategy impl — merges params.currentData into capability state and returns the resulting snapshot. Does not run an LLM call; LLM-driven extraction for this capability happens through the submit_extracted_data tool and processToolResult.

Parameter Type

params

ExtractionPassParams

Promise<ExtractionPassResult>

ExtractionStrategy.runExtractionPass