Skip to content

For LangChain Users

LangChain and Flow-Like can meet in two different places:

  1. Keep orchestration in LangChain and use Flow-Like’s official chat-model and embedding adapters.
  2. Rebuild the orchestration as a typed visual Flow and expose it through App Events, chat, pages, or an API.

The current Studio importer does not translate a LangChain graph. Choose the path based on who should own orchestration, state, deployment, and debugging.

Keep LangChain codeMove orchestration into a Flow
Existing application already owns routing and lifecycleTeammates should edit and inspect the logic visually
LangChain-specific components remain importantTyped node contracts should define the pipeline
Only model or embedding access should moveThe workflow needs Flow-Like Events, Pages, Widgets, storage, or automation nodes
Existing tests and deployment stay in codeRun history and App-level configuration should live together

You can use both approaches: a LangChain service can call a Flow-Like Event, and a Flow can call an external API that is implemented with LangChain.

The Python and Node.js SDKs include LangChain-compatible chat-model and embedding wrappers. With the Python SDK, a chain can use a model configured in Flow-Like:

from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
chat_model = client.as_langchain_chat("your-model-bit-id")
chain = (
ChatPromptTemplate.from_messages([
("system", "You are a helpful assistant."),
("human", "{input}"),
])
| chat_model
| StrOutputParser()
)
response = chain.invoke({"input": "What is Flow-Like?"})

The equivalent factory methods are documented for Python and Node.js/TypeScript. Authentication, model access, and data handling still follow the Flow-Like backend and credential configuration used by that SDK client.

LangChain conceptCurrent Flow-Like concept
Runnable or chainConnected nodes in a Flow
LCEL pipeTyped data and execution wires
Chat modelConfigured model plus Invoke Model
Prompt templateHistory/message nodes and, when needed, Render Template
AgentAgent from Model plus registered tools and Invoke Agent
ToolTyped Flow function registered with the agent
Conversation historyHistory output from Chat Event
Session stateChat local/global session values
Durable agent memoryRegister Memory or an explicit data store
RetrieverVector, full-text, or hybrid database search
Vector storeFlow-Like database opened and populated by database nodes
Output parserAI Extractor with a JSON schema
Callback or traceFlow run history and node logs

The mapping is conceptual. A wire is not a serialized Runnable, and a board variable is not automatically equivalent to a LangChain memory implementation.

An LCEL pipeline such as:

chain = prompt | model | parser
result = chain.invoke({"topic": "AI"})

usually becomes these graph stages:

StageFlow-Like implementation
Receive inputEvent-node output pin
Build instructions and messagesMake or update chat history
InvokeConfigured model into Invoke Model
Validate outputAI Extractor, JSON parsing, or ordinary typed nodes
ReturnEvent-specific response or result node

Connect execution wires only where ordering or side effects require them. Connect data wires for the values each stage consumes.

For ordered fan-out use Sequence. For intentional concurrency use Parallel Execution or Parallel For Each, followed by Gather when all branches must finish.

Flow-Like model invocation is history-oriented. A typical chat Flow:

  1. starts with Chat Event;
  2. reads the event’s current History output;
  3. applies a system instruction with Set System Message;
  4. invokes the configured model;
  5. returns a complete response or streams response chunks to chat.

Use Push Message to add messages. Configure the Chat UI Event’s history window deliberately, or construct a smaller history before invocation when the Flow should use only a subset. See Chat and conversations for the complete event, session, attachment, and streaming contract.

Do not copy prompt variables into a single opaque template when the values need validation. Keep important inputs as typed pins and assemble the message only after those inputs pass their checks.

A visual agent is assembled explicitly:

ResponsibilityNode
Create the agent from a configured modelAgent from Model
Set operating instructionsSet Agent System Prompt
Add Flow functions as toolsRegister Function Tools
Add MCP toolsRegister MCP Tools
Invoke once and return a complete resultInvoke Agent
Stream the resultStream Invoke Agent

Flow functions should expose small typed operations, validate their arguments, and enforce authorization outside the prompt. Keep side effects, retries, and confirmation visible in the surrounding Flow.

LangChain’s “memory” label can refer to several different lifecycles. Map the requirement, not the class name:

Required lifecycleFlow-Like choice
Current conversation messagesChat Event History
State for one chatLocal Session
User-level chat stateGlobal Session
Agent-managed persistent recallRegister Memory
Durable application recordsDatabase or App Storage
Temporary graph stateFlow variable

Limit history before model invocation, define retention for session and memory data, and never use restored conversational state as proof of authorization.

Keep indexing and query execution separate.

StepCurrent nodes or guide
Extract text and preserve provenanceDocument processing
Split textChunk Text
Load the embedding modelLoad Embedding Model
Embed each chunkEmbed Document
Open and populate the indexOpen Database and database write nodes
StepCurrent node
Embed the questionEmbed Query
Semantic retrievalVector Search
Exact-term retrievalFull-Text Search
Combined retrievalHybrid Search
Generate from selected evidenceHistory nodes plus Invoke Model

Retain source IDs and locations through retrieval so the final response can cite its evidence. Apply access filters before retrieved content enters model context. The full operating guidance is in RAG and knowledge bases.

Use AI Extractor when the model must return a known shape. Its schema is JSON Schema, for example:

{
"type": "object",
"properties": {
"name": { "type": "string" },
"priority": {
"type": "string",
"enum": ["low", "medium", "high"]
}
},
"required": ["name", "priority"]
}

Treat schema validation as one boundary, not proof that the extracted facts are correct. Validate identifiers, permissions, ranges, and business rules before using the result in a side effect.

Run history records executions and node logs. It is the nearest Flow-Like inspection surface to callbacks or traces, but it is not a drop-in replacement for every LangChain observability product.

During migration, test the layers independently:

  • prompt and structured-output behavior;
  • tool selection and tool arguments;
  • retrieval rank and source propagation;
  • history and session boundaries;
  • timeout, cancellation, and partial failure;
  • final response and externally visible side effects.
  1. Decide whether LangChain or Flow-Like will own orchestration.
  2. Inventory models, prompts, tools, retrievers, memory, and callbacks.
  3. Define typed inputs and outputs for each target Flow function and Event.
  4. Split RAG indexing from query execution.
  5. Choose explicit storage for every memory lifecycle.
  6. Move secrets into Runtime Variables.
  7. Rebuild one representative path and compare its outputs with the source.
  8. Add App Events or chat only after the underlying Flow passes its tests.