Open-Swarm-Net / OSNAP

Open Swarm Net Agent Protocol
Apache License 2.0
35 stars 3 forks source link

Enhancement for the memory. #12

Open maniklem opened 1 year ago

maniklem commented 1 year ago

Hi,

Considering the idea of sharing tools and memory, I would like to propose you consider implementing human like memory where:

"There are three types of LTM: (1) semantic memory holds factual knowledge, for example, the difference between afferent and efferent nerves; (2) episodic memory involves knowledge of specific events, for example, your first day of work; and (3) procedural memory includes knowledge of how to do things, for example, how to properly intubate a patient." https://www.sciencedirect.com/topics/psychology/procedural-memory#:~:text=There%20are%20three%20types%20of,do%20things%2C%20for%20example%2C%20how

Also tested here: https://arxiv.org/abs/2212.02098#:~:text=Inspired%20by%20the%20cognitive%20science,modeled%20with%20a%20knowledge%20graph

As applied here using Langchain and Babyagi (https://github.com/dory111111/Pengenuity), It encompasses the following:

"Procedural memory for the storage and retrieval of tool usage procedures. Semantic memory for the storage and retrieval of concepts and knowledge. Episodic memory for the storage and retrieval of specific events or episodes."

I think it can help in dealing with more complex problems such as distinguishing the type of goal vs tools, conceptual knowledge from local Docstore, and also expand the concept for episodic or event driven memories as opposed to sifting through the entire document store.

Just a thought...

FMurray commented 1 year ago

@maniklem we do need to think about how memory factors in to the protocol. For the protocol design to work, I think it needs to work both on co-located agents that share infrastructure as well as remote agents that don't share infrastructure. Therefore we need to think about agents exposing their memory as part of the OSNAP API

In no particular order here are the things I think this work requires:

  1. API: How do we expose the memory endpoint? Is it specific to an agent node? My suspicion is that it would be.
  2. Do both agents need to use the same types of memory? Can Episodic memory be used together with Semantic memory? Should those be different APIs?
  3. If memory references downstream data is there a way to cordon it off from the public memory since agents may not want to share downstream data.

I think this topic deserves it's own RFC

maniklem commented 1 year ago

Thanks for the feedback. I will think about it and add my views on the above.