Skip to content
Leveraging Postgres...
 
Notifications
Clear all

Leveraging Postgres for Chat Memory

5 Posts
4 Users
0 Reactions
6 Views
Banacho
(@banacho)
Posts: 3
Active Member
Topic starter
 

Describe the problem

When utilizing the Postgres Chat Memory with AI Agent Nodes, I'm unable to incorporate any additional_kwargs, tool_calls, or response_metadata. This occurs even though these fields are added to the database with each record, albeit empty. It would be highly beneficial to have this information, particularly timestamps, for subsequent chat evaluations. My current workaround involves omitting the Chat Memory from the AI Agent Node and manually reading/writing to/from the Chat Memory before and after the call. However, this creates significant overhead to maintain across all sub-workflows that utilize other agents. Simply integrating the Postgres Chat Memory directly into the Agent Node would greatly simplify this process.

Please share your workflow

Information on your n8n setup

  • n8n version: 1.62.5
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): regular
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (GCP)
  • Operating system:
 
Posted : 14/10/2024 10:30 am
vidz1979
(@vidz1979)
Posts: 2
New Member
 

Great idea!

That aligns with my requirements as well. I'm looking to incorporate custom data from a tool into a customer profile, and additional_kwargs is a fantastic feature for this purpose.

 
Posted : 09/12/2024 9:46 pm
vidz1979
(@vidz1979)
Posts: 2
New Member
 

Regarding timestamps, a practical solution is to manually set up a chathistory table (the createdat column will be populated automatically):

image

 
Posted : 09/12/2024 11:25 pm
Vasislav
(@vasislav)
Posts: 1
New Member
 

Is there a method to incorporate timestamps so that the AI agent can interpret them? My understanding is that the AI agent currently only processes JSON data.

Could you please advise on how to achieve this?

 
Posted : 23/02/2025 12:24 pm
Walter_Paiva
(@walter_paiva)
Posts: 1
New Member
 

Are there any new developments regarding this feature?

 
Posted : 14/03/2025 1:12 pm
Share: