letta-ai / letta

Letta (formerly MemGPT) is a framework for creating LLM services with memory.
https://letta.com
Apache License 2.0
13.11k stars 1.44k forks source link

Create a multi user agent? #668

Open Daniel199438 opened 11 months ago

Daniel199438 commented 11 months ago

Is your feature request related to a problem? Please describe. I created a fork of this project and modified the new server functions to add MemGPT as a slack bot. At the moment, I create one agent per user and it works fine, but sometimes users send messages and ask about other users or about previous messages in public channels that he is not aware of, because that are different agents.

Describe the solution you'd like I would work on the basis of the new multi-agent/multi-user server concept and modify it so that a user_id is passed so that the agent knows who it is talking to, and new user-specific memories are stored under this user_id or a new memory file is dynamically created for new users, and only has an archive memory for all users in which it can evolve. The aim is to access all memories of all users like a human in a conversation.

My question would be: Is something like this already being planned? I would very much like to work on it, but if you already have plans for it, I would hold back. On the other hand, I would develop it in my fork and could offer a PR later. How would that be?

sarahwooders commented 11 months ago

This isn't currently on our roadmap, so feel free to work on it! However I'm not sure how you'd deal with long term memory accross multiple user for a single agent -- e.g. if an agent is talking to multiple users, what messages should go into its context? Or if a user loads data into an agent, is that data accessible to other users through the agent?

Daniel199438 commented 11 months ago

That's right, good questions! One idea might be to add a metadata column in the long term memory, in which, for example, the user ID is stored for each message or other filterable information with which the messages can be assigned to the required context. I would have to look in detail at how the current logic works to derive meaningful changes for a MultiUserAgent. And with the help of filtering by user id, added data can be assigned to the respective user or defined to be visible to all users or also by a private attribute in the metadata column.