Kingo 1.5 is a new version of the class stack. It differs from Kingo 1.4.1 only in Langflow:
- Kingo 1.4.1 comes with Langflow 1.8.
- Kingo 1.5 comes with Langflow 1.12.
Everything else, n8n included, is the same in both. Kingo 1.4.0 still has an
older n8n: ./kingo update brings you from 1.4.0 to 1.4.1.
The upgrade to Kingo 1.5 is optional. ./kingo update does not do it for
you.
Decide as a team: the whole team upgrades, or nobody does.
Which version do you have? Run this line. The first line it prints is your
version, for example kingo-pod 1.4.1:
cd ~/kingo-pod && ./kingo version
Motivation: Langflow has two bugs
Kingo only installs Langflow. Langflow 1.12, which comes with Kingo 1.5, fixes the first bug. The second bug is still in Langflow 1.12.
(A chat is a conversation in the Playground. Langflow calls it a “session”, and its name the “session ID”.)
Bug 1: mixed-up memory (fixed in Langflow 1.12)
An Agent with memory, and the Message History component, should remember only the current chat. Langflow 1.8 mixes chats up in three cases:
- Two chats with the same name share one memory, even in different flows.
This happens all the time, because Langflow names new chats
New Session 0,New Session 1, … and counts in each flow separately. So most of your flows have aNew Session 0. For example: in flow A, inNew Session 0, you say “My name is Alice.” In flow B, also inNew Session 0, you ask “What is my name?” Flow B answers “Alice.” - A flow runs another flow, and the Session ID is empty. Run Flow is the component that runs another of your flows inside a flow, or gives it to an agent as a tool. If its Session ID is empty, the agent in the called flow reads the latest messages of all your chats, in all your flows.
- You call flows through the API with the same session ID. Then they
share one memory. Langflow’s cURL example sends the session ID
YOUR_SESSION_ID_HERE. If you keep it, every flow you call that way shares one memory.
Langflow 1.12 (in Kingo 1.5) keeps the memory per flow, also in flows you built before. One thing stays: if Run Flow has an empty Session ID, the called flow still mixes up its own chats.
How to avoid bug 1:
- Kingo 1.4: to test anything with memory, use each flow’s first chat,
the Default Session. Its name is the flow’s ID, so no other flow shares
it. Don’t start a new chat for a test: its name,
New Session 0, is probably used in your other flows too. And don’t rename a chat to fix a clash (bug 2). - Both versions, flows run by Run Flow: the agent in the called flow
usually doesn’t need to remember earlier calls. Then set its Number of
Chat History Messages (in the Agent’s advanced settings) to
0: that switches its memory off. If it does need a memory, fill in Session ID in Run Flow (advanced settings) with a name that no other chat uses, for example the name of the flow it runs. - Both versions: when you call a flow through the API, leave out the
session ID, or give each flow its own. Don’t keep
YOUR_SESSION_ID_HERE.
Bug 2: renaming and deleting chats (in Langflow 1.8 and 1.12)
Langflow renames and deletes chats by their name:
- If you delete a chat, Langflow deletes every chat with that name, in all your flows, with all its messages. There is no undo.
- If you rename a chat, Langflow renames every chat with that name, in all your flows. If a flow already has a chat with the new name, the two become one chat.
In both versions, Langflow names new chats New Session 0,
New Session 1, … in every flow, so most of your flows have chats with the
same names. So don’t rename chats, and don’t delete them, with one
exception: each flow’s Default Session. Its name is the flow’s ID, so
deleting it only affects that flow.
Best practice in Kingo 1.5
Langflow 1.12 fixes bug 1, but not bug 2. So in Kingo 1.5:
- Start a new chat for each test. Every chat in every flow now has its
own memory. A new chat starts with an empty memory, even though it is called
New Session 0like chats in your other flows. - Never rename or delete chats, not even a new, empty one. Let them pile up.
- To repeat a test in the same chat with an empty memory, use the Default Session. It is the only chat you can delete safely: delete it, then run the test again.
- Agents in flows run by Run Flow: set Number of Chat History
Messages to
0, as above. If memory stays on and Session ID stays empty, the called flow reads the messages of all its own chats. - API calls: use one session ID per conversation. Calls to the same flow with the same session ID continue one conversation. For a new conversation, use a new ID.
Are these security problems? Not on your laptop. Only you use your Langflow, so the mixed-up messages are your own. The problem is that answers can be wrong, and that chats can disappear.
Should your team upgrade?
Upgrade if:
- your flows use an Agent with memory or the Message History component,
- you want bug 1 fixed instead of following the rules above, and
- everyone on your team can upgrade before you share flows again.
Stay on Kingo 1.4 if:
- a teammate cannot upgrade right now (for example an old ZIP install, see the errors below)
- a deadline is close: don’t change your tools the night before
- you also use this stack for another course, and its instructor has not said yes: your laptop has one version for both courses
Why the whole team? When the new Langflow starts for the first time, it converts your data. Kingo 1.4 cannot read it anymore. Flows from Kingo 1.5 may not open in Kingo 1.4, so a half-upgraded team can’t share its flows. The other way round works: flows from Kingo 1.4 open in Kingo 1.5.
How to upgrade
Before you start:
- Agree with your team (see above).
- Take your time. It downloads a few GB and can take half an hour or more. Keep the laptop plugged in, and don’t start right before class or a deadline.
- Export the flows you care most about (in Langflow: the flow’s menu → Export). The upgrade also makes a backup by itself.
Then run this one line. On a Mac, use the Terminal app. On Windows, use the Ubuntu app.
cd ~/kingo-pod && ./kingo update && git branch -u origin/release-1.5 && ./kingo update
It updates twice: first Kingo 1.4, then it switches to Kingo 1.5. The very last line should end with a 1.5 version, for example:
Stack updated — kingo-pod 1.4.1 → 1.5.1.
That’s it. From now on, ./kingo update keeps you on Kingo 1.5. Everything
else works as before. If you ever set up the stack again (new laptop,
reinstall), you get Kingo 1.4 again: run the line once more.
If the line stops with an error
| You see | What to do |
|---|---|
fatal: not a git repository |
Your folder came from the old ZIP download (Macs set up before 29 August). Ask your instructor. |
fatal: the requested upstream branch 'origin/release-1.5' does not exist |
Nothing changed. Check your internet connection and run the line again. |
an ERROR: line |
Nothing changed. Fix that error first (Mac, Windows), then run the line again. |
WARN: the newest class files could not be applied: this folder has local changes |
You probably added a package to langflow/requirements.txt, such as nemoguardrails. Kingo has it built in now. Run git checkout -- langflow/requirements.txt, then the line again. |
any other WARN: the newest class files could not be applied |
Send that message to your instructor. |
After the upgrade
- Langflow cannot reach
postgresorqdrant, or cannot open a file in/app/shared? You see an error that mentionsLANGFLOW_SSRF_ALLOWED_HOSTSorLANGFLOW_RESTRICT_LOCAL_FILE_ACCESS. Langflow 1.12 blocks these unless Kingo allows them, and Kingo 1.5.0 did not. Run./kingo updateonce: Kingo 1.5.1 fixes it. - Component updates: when you open an older flow, Langflow offers updates for some components (Chat Input, Chat Output, Agent, …). You can accept them.
- Components Langflow does not recognize (Chroma, File Reader Batch, OpenRouter Embeddings, your own custom components): they still work. Leave them as they are. In new flows, Chroma is now called Chroma DB.
- Your own Python components, one exception: a component does not load
if an input has the same
nameas one of the component’s methods: one of yours, or one that Langflow has, such asindex,run,start,stop,log,validateorvariables. The error says the input is “named after a method of the component”. Rename the input: change itsname, not itsdisplay_name. Then connect that input again in your flows. - Two components left the menu: Text Input and Text Output. In new flows, use Chat Input and Chat Output instead. The ones already in your flows still work.
- Packages you installed yourself with
./kingo langflow pip installare gone, as after every update. Install them again.nemoguardrailsis now built in. - Follow the best practice for Kingo 1.5: a new chat for each test, and never rename or delete chats except the Default Session.
If something goes wrong, don’t try to go back to Kingo 1.4 by yourself.
Kingo 1.4 cannot read the converted data. Your instructor restores the backup
with you. Until then, keep working on Kingo 1.5. Send your instructor the
output of ./kingo version and a screenshot of the error.