Dear callin.io Community,
I'm trying to build an AI agent following a YouTube tutorial. However, I'm encountering an error after adding the "simple memory node".
My workflow starts with a Telegram trigger.
This is followed by a switch node that differentiates between voice and text messages, using {{ $json.message.text }}
or {{ $json.message.voice.file_id }}
.
The text message is then transformed from message.text
to text
.
After that, it proceeds to the AI agent. Without the memory node, the output via Telegram functions correctly.
When I include the memory node and run the workflow, the memory node briefly shows a green indicator, but then turns red, as seen in the attached image.
What is the error message (if any)?
Cannot create property ‘additional_kwargs’ on number ‘6407142739’
json
{
“nodes”: [
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $(‘Switch’).item.json.message.chat.id }}”,
“options”: {
“systemMessage”: “=# ROLLEnDu bist ein freundlicher und hilfreicher Agent.nn# EXTRA INFORMATIONnDu sprichts gerade mit {{ $(‘Switch’).item.json.message.from.first_name }}”
}
},
“type”: “@callin.io/n8n-nodes-langchain.agent”,
“typeVersion”: 1.8,
“position”: [
1320,
0
],
“id”: “55a1acc1-f13b-4d5a-a6d0-2f64fc8b1d76”,
“name”: “AI Agent”
}
],
“connections”: {
“AI Agent”: {
“main”: [
<span class="chcklst-box fa fa-square-o fa-fw"></span>
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “31ca1c67a3c7e76535e44397c465cad5d69925544f50cfe7ba32b9a7bf7a61fc”
}
}
Please share your workflow
AI Agent
json
{
“nodes”: [
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $(‘Switch’).item.json.message.chat.id }}”,
“options”: {
“systemMessage”: “=# ROLLEnDu bist ein freundlicher und hilfreicher Agent.nn# EXTRA INFORMATIONnDu sprichts gerade mit {{ $(‘Switch’).item.json.message.from.first_name }}”
}
},
“type”: “@callin.io/n8n-nodes-langchain.agent”,
“typeVersion”: 1.8,
“position”: [
1320,
0
],
“id”: “55a1acc1-f13b-4d5a-a6d0-2f64fc8b1d76”,
“name”: “AI Agent”
}
],
“connections”: {
“AI Agent”: {
“main”: [
<span class="chcklst-box fa fa-square-o fa-fw"></span>
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “31ca1c67a3c7e76535e44397c465cad5d69925544f50cfe7ba32b9a7bf7a61fc”
}
}
Memory Node:
json
{
“nodes”: [
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $(‘Telegram Trigger’).item.json.message.chat.id }}”,
“contextWindowLength”: 30
},
“type”: “@callin.io/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
1440,
200
],
“id”: “1968ecb5-e489-43dc-b555-bb95779c0f73”,
“name”: “Simple Memory”
}
],
“connections”: {
“Simple Memory”: {
“ai_memory”: [
<span class="chcklst-box checked fa fa-square-check-o fa-fw"></span>
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “31ca1c67a3c7e76535e44397c465cad5d69925544f50cfe7ba32b9a7bf7a61fc”
}
}
Share the output returned by the last node
Cannot create property ‘additional_kwargs’ on number ‘6407142739’
Information on your callin.io setup
- callin.io version: 1.84.1
- Database (default: SQLite):
- callin.io EXECUTIONS_PROCESS setting (default: own, main):
- Running callin.io via (Docker, npm, callin.io cloud, desktop app): callin.io.cloud
- Operating system: Win 11
What am I doing wrong? What steps can I take to resolve this?
Thank you for your assistance.
Best regards,
Andreas
To utilize the Simple Memory functionality, you must provide a sessionId
when not using the Chat trigger.
It's recommended to place an Edit node just before the Agent node:
- Enable the Include Other Input Fields option.
- Add the
sessionId
field. - Optionally, configure or update the
chatInput
field.
Thanks for the response.
I'll give that a shot.
This must be sessionId
The Error persists:
json
{
"nodes": [
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "95e85dda-c46d-4605-82f4-dd7c9da19fb1",
"name": "sessionId",
"value": "={{ $execution.id }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
},
"type": "callin.io-nodes-base.set",
"typeVersion": 3.4,
"position": [
1320,
0
],
"id": "81b14efe-cd0b-4adb-9031-716e8e5262a2",
"name": "Edit Fields1"
}
],
"connections": {
"Edit Fields1": {
"main": [
<span class="chcklst-box fa fa-square-o fa-fw"></span>
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "31ca1c67a3c7e76535e44397c465cad5d69925544f50cfe7ba32b9a7bf7a61fc"
}
}
Apologies.
It was functioning correctly.
I appreciate your assistance greatly.
Hello, it seems we're encountering the same issue.
You can resolve this by configuring the Telegram Trigger ID to use Simple Memory.
Simple Memory Configuration:
Define the following:
Key:
message_id
---- X
Id:
ok
And that should do it.
Hello,
I'm quite new to the callin.io community, so this question might sound a bit basic, but what exactly are you inputting into your simple memory settings?
I tried dragging the message ID schema into my simple memory key, but I'm still encountering the same error as before.
Could you please share what you're putting into the simple memory settings?