@conversation-flow-sdk/core
v0.1.0
Published
Conversation framework core — types, runtime, errors. Vercel AI SDK port of Pipecat Flows.
Readme
@conversation-flow-sdk/core
Core runtime, types, and errors for conversation-flow-sdk.
pnpm add @conversation-flow-sdk/core ai zodAPI surface
Authoring primitives
createFlow<TState>(config)— factory; returns an unstartedFlowManager.defineNode<TState>(config)— node config with structural validation.defineFunction(config)— Zod-typed tool definition.say(text),endConversation(text?),runFunction(handler)— built-in actions.
Runtime
FlowManager<TState>—.initialize(),.setNode(node),.abort(),.getCurrentMessages(),.state,.currentNode,.isRunning.createInMemoryStore()— defaultFlowStore(suspend/resume in v0.2).applyContextStrategy(args)— exposed for tooling and benchmarks.recordLatency,getLatencyStats,resetLatencyStats— in-process latency telemetry.
Errors
FlowError
├── FlowConfigError // bad config at construct time
├── FlowStateError // wrong lifecycle order
├── FlowValidationError // Zod parse failure
├── FlowTransportError // transport send failure
└── FlowToolError // tool handler threwTypes
FlowConfig<TState>, NodeConfig<TState>, FunctionConfig, FlowFunction, HandlerContext, HandlerReturn, ActionConfig, ContextStrategyConfig, FlowTransport, UserMessage, LLMMessage, FlowSnapshot.
See also
@conversation-flow-sdk/transport-console— readline transport@conversation-flow-sdk/transport-web-chat— SSE transport- Top-level README
- MIGRATION-FROM-PIPECAT.md
