Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MemGPT logo

MemGPT

Try out our MemGPT chatbot on Discord!

⭐ NEW: You can now run MemGPT with open/local LLMs and AutoGen! ⭐

Discord arxiv 2310.08560 Documentation

🤖 Create perpetual chatbots with self-editing memory!


MemGPT demo video

🗃️ Chat with your data - talk to your local files or SQL database!

MemGPT demo video for sql search

Quick setup

Join Discord and message the MemGPT bot (in the #memgpt channel). 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 ON

set DMs settings on MemGPT server to be open in MemGPT so that MemGPT Bot can message you

You can see the full list of available commands when you enter / into the message box.

MemGPT Bot slash commands

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 our paper.

Running MemGPT locally

Install MemGPT:

pip install -U pymemgpt

Now, you can run MemGPT and start chatting with a MemGPT agent with:

memgpt run

If you're running MemGPT for the first time, you'll see two quickstart options:

  1. OpenAI: select this if you'd like to run MemGPT with OpenAI models like GPT-4 (requires an OpenAI API key)
  2. 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), select Other to proceed to the advanced setup.

Advanced setup

You can reconfigure MemGPT's default settings by running:

memgpt configure

In-chat commands

You can run the following commands in the MemGPT CLI prompt which 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
  • /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 agent

Once you exit the CLI with /exit, you can resume chatting with the same agent by specifying the agent name in memgpt run --agent <NAME>.

Documentation

See full documentation at: https://memgpt.readme.io

Installing from source

To install MemGPT from source, start by cloning the repo:

git clone git@github.com:cpacker/MemGPT.git

Then navigate to the main MemGPT directory, and do:

pip install -e .

Now, you should be able to run memgpt from the command-line using the downloaded source code.

If you are having dependency issues using pip 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 using the official instructions here.

Then, you can install MemGPT from source with:

git clone git@github.com:cpacker/MemGPT.git
poetry shell
poetry install

Support

For issues and feature requests, please open a GitHub issue or message us on our #support channel on Discord.

Datasets

Datasets used in our paper can be downloaded at Hugging Face.

🚀 Project Roadmap

  • Release MemGPT Discord bot demo (perpetual chatbot)
  • Add additional workflows (load SQL/text into MemGPT external context)
  • Integration tests
  • Integrate with AutoGen (discussion)
  • Add official gpt-3.5-turbo support (discussion)
  • CLI UI improvements (issue)
  • Add support for other LLM backends (issue, discussion)
  • Release MemGPT family of open models (eg finetuned Mistral) (discussion)

Metadata

Release files for pymemgpt-nightly 0.2.10.dev20231230103909

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymemgpt-nightly 0.2.10.dev20231230103909
File Size Uploaded
pymemgpt_nightly-0.2.10.dev20231230103909.tar.gz 122.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymemgpt-nightly 0.2.10.dev20231230103909
File Interpreter ABI Platform
pymemgpt_nightly-0.2.10.dev20231230103909-py3-none-any.whl Python 3 none any Details

Total release size: 295.7 kB

Release files / pymemgpt_nightly-0.2.10.dev20231230103909.tar.gz

Download URL pymemgpt_nightly-0.2.10.dev20231230103909.tar.gz
Size 122.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e4814da4b37fba2bd9ac7c2f8c1fa1fc3c2937ffa1ce1b55756ff43cb6c7435d
BLAKE2b-256 checksum
How to use checksums
ca123d5cd0278dbcb4f383447d2e77b8697a3d68b96b2cac3ae25e85c34d0fe7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure

Release files / pymemgpt_nightly-0.2.10.dev20231230103909-py3-none-any.whl

Download URL pymemgpt_nightly-0.2.10.dev20231230103909-py3-none-any.whl
Size 172.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97ce9d0ecbbd84aa037d1047d8a25e13ad521dc1cec00d27ac9f1c3603ffa177
BLAKE2b-256 checksum
How to use checksums
7fcd4ef8b06ad84f0438bb62a78ec14a3b4488ea3860d225bcb2b68ed1b7f359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page