Skip to content

Plugins Overview

Flowneer ships with a focused set of plugin methods plus a smaller set of helper modules. Plugin methods follow the same pattern: create a subclass with FlowBuilder.extend([...plugins]), then call the added methods on any instance of that subclass. Helper utilities such as createAgent, crew patterns, and output parsers are imported directly and do not participate in plugin registration.

typescript
import { FlowBuilder } from "flowneer";
import { withTiming } from "flowneer/plugins/observability";

const AppFlow = FlowBuilder.extend([withTiming]);

const flow = new AppFlow<MyState>().withTiming().startWith(myStep);

Plugin Categories

CategorySurface
LLMwithCostTracker, withRateLimit, withStructuredOutput, withTokenBudget
MemorywithMemory, BufferWindowMemory, KVMemory, SummaryMemory
ObservabilitywithCallbacks, withHistory, withInterrupts, withTiming, withVerbose
PersistencewithCheckpoint, withAuditLog, withReplay, withVersionedCheckpoint, withManualStepping
ResiliencewithCircuitBreaker, withTimeout, withFallback, withCycles
Dev / TestingwithDryRun, withMocks, withStepLimit, withAtomicUpdates, withFlowAnalyzer, withPerfAnalyzer
Agent pluginswithReActLoop, withHumanNode, resumeFlow
Agent helperstool, createAgent, supervisorCrew, sequentialCrew, hierarchicalCrew, roundRobinDebate
ToolswithTools, ToolRegistry, executeTool, executeTools
MessagingwithChannels, withStream, emit, sendTo, receiveFrom
Output helpersparseJsonOutput, parseListOutput, parseRegexOutput, parseMarkdownTable
TelemetrywithTelemetry, TelemetryDaemon, consoleExporter, otlpExporter
GraphwithGraph, withExportGraph, withExportFlow
EvalrunEvalSuite, exactMatch, containsMatch, f1Score, retrievalPrecision, retrievalRecall
CompliancewithAuditFlow, withRuntimeCompliance, scanShared
ConfigJsonFlowBuilder, validate

Import Paths

Plugins are bundled under flowneer/plugins/*:

typescript
// LLM
import { withCostTracker } from "flowneer/plugins/llm";
import { withRateLimit } from "flowneer/plugins/llm";

// Memory
import {
  withMemory,
  BufferWindowMemory,
  KVMemory,
  SummaryMemory,
} from "flowneer/plugins/memory";

// Observability
import {
  withCallbacks,
  withHistory,
  withTiming,
  withVerbose,
} from "flowneer/plugins/observability";
import { withInterrupts } from "flowneer/plugins/observability";

// Persistence
import {
  withCheckpoint,
  withAuditLog,
  withReplay,
  withVersionedCheckpoint,
  withManualStepping,
} from "flowneer/plugins/persistence";

// Resilience
import {
  withCircuitBreaker,
  withTimeout,
  withFallback,
  withCycles,
} from "flowneer/plugins/resilience";

// Dev
import { withDryRun, withMocks, withStepLimit } from "flowneer/plugins/dev";
import { withAtomicUpdates } from "flowneer/plugins/dev";

// Agent plugins
import { withReActLoop } from "flowneer/plugins/agent";
import { withHumanNode, resumeFlow } from "flowneer/plugins/agent";

// Agent helpers
import { tool, createAgent } from "flowneer/plugins/agent";
import {
  supervisorCrew,
  sequentialCrew,
  hierarchicalCrew,
  roundRobinDebate,
} from "flowneer/plugins/agent";

// Tools
import {
  withTools,
  ToolRegistry,
  executeTool,
  executeTools,
} from "flowneer/plugins/tools";

// Messaging
import { withChannels, sendTo, receiveFrom } from "flowneer/plugins/messaging";
import { withStream, emit } from "flowneer/plugins/messaging";

// Output helpers
import { parseJsonOutput } from "flowneer/plugins/output";
import { parseListOutput } from "flowneer/plugins/output";
import { parseRegexOutput } from "flowneer/plugins/output";
import { parseMarkdownTable } from "flowneer/plugins/output";

// Telemetry
import { TelemetryDaemon, consoleExporter } from "flowneer/plugins/telemetry";

// Graph
import { withGraph } from "flowneer/plugins/graph";
import { withExportGraph, withExportFlow } from "flowneer/plugins/graph";

// Eval
import { runEvalSuite, exactMatch, f1Score } from "flowneer/plugins/eval";

// Compliance
import {
  withAuditFlow,
  withRuntimeCompliance,
  scanShared,
} from "flowneer/plugins/compliance";

// Dev — analysis
import { withFlowAnalyzer } from "flowneer/plugins/dev";
import { withPerfAnalyzer } from "flowneer/plugins/dev";
import type {
  StepPerfStats,
  PerfReport,
  PerfAnalyzerOptions,
} from "flowneer/plugins/dev";

// Config
import { JsonFlowBuilder } from "flowneer/plugins/config";

Shared State Conventions

Many plugins use reserved keys on the shared state object. By convention, built-in plugin keys are prefixed with __ to avoid collisions with application data.

AugmentedState — automatic typing

All plugin-provided __* keys are declared on the exported AugmentedState interface via TypeScript declaration merging. Extend your state with it to get every key typed and documented automatically:

typescript
import type { AugmentedState } from "flowneer";

interface MyState extends AugmentedState {
  topic: string; // your domain fields
  results: string[];
  // __cost, __history, __tools … all typed automatically
}

No additional imports or setup are needed. Augmentations are applied per-plugin when the plugin module is imported.

Key reference

KeySet by
__costwithCostTracker
__stepCostYour step (consumed by withCostTracker)
__llmOutputYour step (consumed by withStructuredOutput)
__structuredOutputwithStructuredOutput
__validationErrorwithStructuredOutput (on failure)
__memorywithMemory
__historywithHistory
__timingswithTiming
__fallbackErrorwithFallback
__tryErrorwithTryCatch
__toolswithTools
__channelswithChannels
__streamwithStream / .stream()
__humanPromptwithHumanNode
__humanFeedbackWritten by caller before resumeFlow()
__toolResultswithReActLoop
__reactExhaustedwithReActLoop
__batchItem.batch() (configurable via key)
__perfStatswithPerfAnalyzer (per-step stats array)
__perfReportwithPerfAnalyzer (flow-level summary)