30acce9d38bfd056f71ac1da480da3e4a9bd4b45
MemGPT
Setup
Set up dependencies:
pip install -r requirements.txt
Add your OpenAI API key to your environment:
export OPENAI_API_KEY=YOUR_API_KEY
By default MemGPT will use gpt-4, so your API key will require gpt-4 API access.
Running MemGPT via the CLI
To run MemGPT in CLI mode, simply run main.py:
python3 main.py
To create a new starter user or starter persona (that MemGPT gets initialized with), create a new .txt file in /memgpt/humans/examples or /memgpt/personas, then use the --persona or --human flag when running main.py. For example:
# assuming you created a new file /memgpt/humans/examples/me.txt
# note: no .txt extension, just 'me'
python main.py --human me
main.py flags
--persona
load a specific persona file
--human
load a specific human file
--first
allows you to send the first message in the chat (by default, MemGPT will send the first message)
Interactive CLI commands
While using MemGPT via the CLI you can run various commands
Basic commands:
/save
save a checkpoint of the current agent/conversation state
/load
load a saved checkpoint
/dump
view the current message log (see the contents of main context)
/memory
print the current contents of agent memory
Debugging commands:
/pop
undo the last message in the conversation
/heartbeat
send a heartbeat system message to the agent
/memorywarning
send a memory warning system message to the agent
Description
Languages
Python
99.5%