Package: pymemgpt-nightly
MemGPT allows you to build LLM agents with self-editing memoryTry out our MemGPT chatbot onDiscord!You can now run MemGPT withopen/local LLMsandAutoGen!🤖 Create perpetual chatbots with self-editing memory!🗃️ Chat with your data - talk to your local files or SQL database!Quick setupJoinDiscordand message the MemGPT bot (in the#memgptchannel). Then run the following commands (messaged to "MemGPT Bot"):/profile(to create your profile)/key(to enter your OpenAI key)/create(to create a MemGPT chatbot)Make sure your privacy settings on this server are open so that MemGPT Bot can DM you:MemGPT → Privacy Settings → Direct Messages set to ONYou can see the full list of available commands when you enter/into the message box.What is MemGPT?Memory-GPT (or MemGPT in short) is a system that intelligently manages different memory tiers in LLMs in order to effectively provide extended context within the LLM's limited context window. For example, MemGPT knows when to push critical information to a vector database and when to retrieve it later in the chat, enabling perpetual conversations. Learn more about MemGPT in ourpaper.Running MemGPT locallyInstall MemGPT:pipinstall-UpymemgptNow, you can run MemGPT and start chatting with a MemGPT agent with:memgptrunIf you're running MemGPT for the first time, you'll see two quickstart options:OpenAI: select this if you'd like to run MemGPT with OpenAI models like GPT-4 (requires an OpenAI API key)MemGPT Free Endpoint: select this if you'd like to try MemGPT on a top open LLM for free (currently variants of Mixtral 8x7b!)Neither of these options require you to have an LLM running on your own machine. If you'd like to run MemGPT with your custom LLM setup (or on OpenAI Azure), selectOtherto proceed to the advanced setup.Advanced setupYou can reconfigure MemGPT's default settings by running:memgptconfigureIn-chat commandsYou can run the following commands in the MemGPT CLI prompt while chatting with an agent:/exit: Exit the CLI/attach: Attach a loaded data source to the agent/save: Save a checkpoint of the current agent/conversation state/dump: View the current message log (see the contents of main context)/dump <count>: View the last  messages (all if  is omitted)/memory: Print the current contents of agent memory/pop: Undo the last message in the conversation/pop <count>: Undo the last messages in the conversation. It defaults to 3, which usually is one turn around in the conversation/retry: Pops the last answer and tries to get another one/rethink <text>: Will replace the inner dialog of the last assistant message with the<text>to help shaping the conversation/rewrite: Will replace the last assistant answer with the given text to correct or force the answer/heartbeat: Send a heartbeat system message to the agent/memorywarning: Send a memory warning system message to the agentOnce you exit the CLI with/exit, you can resume chatting with the same agent by specifying the agent name inmemgpt run --agent <NAME>.DocumentationSee full documentation at:https://memgpt.readme.ioInstalling from sourceTo install MemGPT from source, start by cloning the repo:gitclonegit@github.com:cpacker/MemGPT.gitThen navigate to the mainMemGPTdirectory, and do:pipinstall-e.Now, you should be able to runmemgptfrom the command-line using the downloaded source code.If you are having dependency issues usingpip install -e ., we recommend you install the package using Poetry (see below). Installing MemGPT from source using Poetry will ensure that you are using exact package versions that have been tested for the production build.Installing from source (using Poetry)First, install Poetry usingthe official instructions here.Then, you can install MemGPT from source with:gitclonegit@github.com:cpacker/MemGPT.git
poetryshell
poetryinstallPython integration (for developers)The fastest way to integrate MemGPT with your own Python projects is through the MemGPT client:frommemgptimportcreate_client# Connect to the server as a userclient=create_client()# Create an agentagent_info=client.create_agent(name="my_agent",persona="You are a friendly agent.",human="Bob is a friendly human.")# Send a message to the agentmessages=client.user_message(agent_id=agent_info.id,message="Hello, agent!")What open LLMs work well with MemGPT?When using MemGPT with open LLMs (such as those downloaded from HuggingFace), the performance of MemGPT will be highly dependent on the LLM's function calling ability.You can find a list of LLMs/models that are known to work well with MemGPT on the#model-chat channel on Discord, as well as onthis spreadsheet.Benchmarking an LLM on MemGPT (memgpt benchmarkcommand)To evaluate the performance of a model on MemGPT, simply configure the appropriate model settings usingmemgpt configure, and then initiate the benchmark viamemgpt benchmark. The duration will vary depending on your hardware. This will run through a predefined set of prompts through multiple iterations to test the function calling capabilities of a model.You can help track what LLMs work well with MemGPT by contributing your benchmark results viathis form, which will be used to update the spreadsheet.SupportFor issues and feature requests, pleaseopen a GitHub issueor message us on our#supportchannel onDiscord.DatasetsDatasets used in ourpapercan be downloaded atHugging Face.RoadmapYou can view (and comment on!) the MemGPT developer roadmap on GitHub:https://github.com/cpacker/MemGPT/issues/1044.