Concepts
Outline of high-level concepts of MemGPT.
Agents
MemGPT agents are stateful LLM agents which can automatically manage long term memory, load data from external sources, and call custom tools. Unlike in other libraries, MemGPT agents are stateful, so keep track of historical interactions and reserve part of their context to read and write memories which evolve over time.
An agent is defined by the following initial state:
- Preset: The preset consists of a system prompt and a list of tools that the agent has access to.
- Human: Text containing information about the human that the agent interacts with.
- Persona: Text containing information about the agent's persona.
You can create an agent from the CLI, or from the Python Client:
memgpt run --agent <AGENT_NAME>
You can view available agents with:
memgpt list agents
Sources
MemGPT sources are external data that is loaded and cached in a vector database. Sources can be attached to an agent for the agent to access, by copying the source data (consisting of text, embeddings, and additional optional metadata) into the agent's archival memory.
You can create a source with:
memgpt load directory --name short_stories --input-dir short_stories/
You can view available sources with:
memgpt list sources
Tools
You can add custom tools to MemGPT by defining and annotating functions in Python. To connect agents to tools, you must define a preset which can be used to create agents.
Humans & Personas
Humans and personas define the
You can define humans and personas with:
memgpt add [human/persona] -f [FILENAME] --name [NAME]
You can view available humans and personas with:
memgpt list [humans/personas]
You can delete humans and personas with:
memgpt delete [human/persona] --name [NAME]
Updated 23 days ago