Coder Social home page Coder Social logo

thingthatis / memgpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cpacker/memgpt

0.0 0.0 0.0 10.06 MB

Teaching LLMs memory management for unbounded context ๐Ÿ“š๐Ÿฆ™

Home Page: https://memgpt.readthedocs.io

License: Apache License 2.0

Python 98.97% Jupyter Notebook 0.56% Shell 0.27% HTML 0.09% Dockerfile 0.11%

memgpt's Introduction

MemGPT logo

MemGPT allows you to build LLM agents with long term memory & custom tools

Discord Twitter Follow arxiv 2310.08560 Documentation

MemGPT makes it easy to build and deploy stateful LLM agents with support for:

You can also use MemGPT to deploy agents as a service. You can use a MemGPT server to run a multi-user, multi-agent application on top of supported LLM providers.

image

Installation & Setup

Install MemGPT:

pip install -U pymemgpt

To use MemGPT with OpenAI, set the environment variable OPENAI_API_KEY to your OpenAI key then run:

memgpt quickstart --backend openai

To use MemGPT with a free hosted endpoint, you run run:

memgpt quickstart --backend memgpt

For more advanced configuration options or to use a different LLM backend or local LLMs, run memgpt configure.

Quickstart (CLI)

You can create and chat with a MemGPT agent by running memgpt run in your CLI. The run command supports the following optional flags (see the CLI documentation for the full list of flags):

  • --agent: (str) Name of agent to create or to resume chatting with.
  • --first: (str) Allow user to sent the first message.
  • --debug: (bool) Show debug logs (default=False)
  • --no-verify: (bool) Bypass message verification (default=False)
  • --yes/-y: (bool) Skip confirmation prompt and use defaults (default=False)

You can view the list of available in-chat commands (e.g. /memory, /exit) in the CLI documentation.

Dev portal (alpha build)

MemGPT provides a developer portal that enables you to easily create, edit, monitor, and chat with your MemGPT agents. The easiest way to use the dev portal is to install MemGPT via docker (see instructions below).

image

Quickstart (Server)

Option 1 (Recommended): Run with docker compose

  1. Install docker on your system
  2. Clone the repo: git clone https://github.com/cpacker/MemGPT.git
  3. Copy-paste .env.example to .env and optionally modify
  4. Run docker compose up
  5. Go to memgpt.localhost in the browser to view the developer portal

Option 2: Run with the CLI:

  1. Run memgpt server
  2. Go to localhost:8283 in the browser to view the developer portal

Once the server is running, you can use the Python client or REST API to connect to memgpt.localhost (if you're running with docker compose) or localhost:8283 (if you're running with the CLI) to create users, agents, and more. The service requires authentication with a MemGPT admin password; it is the value of MEMGPT_SERVER_PASS in .env.

Supported Endpoints & Backends

MemGPT is designed to be model and provider agnostic. The following LLM and embedding endpoints are supported:

Provider LLM Endpoint Embedding Endpoint
OpenAI โœ… โœ…
Azure OpenAI โœ… โœ…
Google AI (Gemini) โœ… โŒ
Anthropic (Claude) โœ… โŒ
Groq โœ… (alpha release) โŒ
Cohere API โœ… โŒ
vLLM โœ… โŒ
Ollama โœ… โŒ
LM Studio โœ… โŒ
koboldcpp โœ… โŒ
oobabooga web UI โœ… โŒ
llama.cpp โœ… โŒ
HuggingFace TEI โŒ โœ…

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 on this spreadsheet.

How to Get Involved

  • Contribute to the Project: Interested in contributing? Start by reading our Contribution Guidelines.
  • Ask a Question: Join our community on Discord and direct your questions to the #support channel.
  • Report Issues or Suggest Features: Have an issue or a feature request? Please submit them through our GitHub Issues page.
  • Explore the Roadmap: Curious about future developments? View and comment on our project roadmap.
  • Benchmark the Performance: Want to benchmark the performance of a model on MemGPT? Follow our Benchmarking Guidance.
  • Join Community Events: Stay updated with the MemGPT event calendar or follow our Twitter account.

Benchmarking Guidance

To evaluate the performance of a model on MemGPT, simply configure the appropriate model settings using memgpt configure, and then initiate the benchmark via memgpt 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 via this form, which will be used to update the spreadsheet.

Legal notices

By using MemGPT and related MemGPT services (such as the MemGPT endpoint or hosted service), you agree to our privacy policy and terms of service.

memgpt's People

Contributors

cpacker avatar sarahwooders avatar vivi avatar goetzrobin avatar tombedor avatar agiletechnologist avatar shishirpatil avatar maximilian-winter avatar robbyt avatar qzgao avatar oderwat avatar arduenify avatar jimlloyd avatar ifsheldon avatar rabbabansh avatar sanegaming avatar jammaster1999 avatar madgrizzle avatar tractorjuice avatar oceaster avatar starsnatched avatar wrmedford avatar rudra-ji avatar eltociear avatar untilhamza avatar scenaristeur avatar claucambra avatar nikhil-pandey avatar kfsone avatar paulasquin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.