“I want ChatGPT with infinite local memory” - Here’s how

David OndrejAbout 5 min readSep 16, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • MEM agent: A 4 billion parameter LLM fine-tuned for memory management, context retrieval, and markdown organization.
  • MCP (Memory Connector Protocol): A server that wraps MEM agent and exposes its capabilities to other applications.
  • Local Memory: Storing data locally for privacy and security.
  • Context Engineering: Structuring and organizing information for efficient AI retrieval.
  • Entities: Representing different areas or people in your life as separate markdown files.
  • Filters: Preventing specific information from being revealed to AI models.
  • Wiki Links: Connecting different markdown files to create a knowledge base.
  • LM Studio: An application that allows you to run AI models locally.
  • Hugging Face: A platform for sharing and discovering AI models and datasets.
  • UV: A package manager that's a lot faster than pip.

1. Introduction to MEM Agent

  • MEM agent allows CH GPT and CLO to have infinite memory that is 100% local and private.
  • It takes context engineering to the next level.
  • The project is relatively unknown.
  • MEM agent provides infinite local memory for AI agents and connects memory between CHGBT, cloud, Google Docs, LM Studio, and other apps.
  • This allows for reusing the same context across different tools.

2. How MEM Agent Works

  • Model: MEM agent is a 4 billion parameter LLM fine-tuned for memory management, retrieval, storing of context, and organizing markdown files.
  • MCP (Server): The MCP wraps the MEM agent and exposes its capabilities to other applications like cloud code, CHBD, Google Docs, or GitHub.
  • Data is stored locally, ensuring privacy and preventing issues like Claude reporting inappropriate prompts.
  • The 4B model can be run on most computers, unlike larger models requiring significant RAM.
  • MEM agent performs well on knowledge benchmarks, rivaling models much larger in size.

3. Setting Up MEM Agent

  • Cloning the GitHub Repository:
    • Copy the GitHub link.
    • Use a code editor (Cursor, VS Code, etc.) and open the terminal.
    • Type git clone [link].
    • Navigate to the new folder using cd mem-agent-mcp.
    • Choose a directory without spaces in the folder names to avoid issues.
  • Using the Makefile:
    • The Makefile simplifies installation with bundled commands.
    • Run make check-uv to check if UV is installed.
    • Run make install to install LM Studio CLI.
  • Running the Agent:
    • Run make run-agent.
    • Choose a model size (4-bit, 8-bit, or 16-bit) based on computer power. 4-bit is the fastest.
    • The setup will install the model from Hugging Face if it's not already installed.
    • The server will run on port 8000. Keep the terminal open.
    • If you encounter an "LMS command not found" error, run the command to add the LM Studio CLI to your path.
  • Choosing a Local Memory Folder:
    • Create a new folder (e.g., "local memory") to store markdown files.
    • Open a new terminal, navigate to the MEM agent MCP folder, and run make setup.
    • Select the local memory folder as the main memory directory.
  • Matching the Model Name:
    • Check the model identifier in the terminal where the agent is running (e.g., me-agent-mlx2).
    • Rename the MLX_MODEL_NAME in the configuration to match the identifier.
  • Checking for Multiple Instances:
    • Run lmssp to check for multiple instances of the model.
    • Unload unnecessary instances using lms unload [model_name].
  • Generating the MCP JSON:
    • Run make generate-mc-json to create the MCP.json file.
    • This file is needed to integrate MEM agent with other tools.

4. Integrating with CLO Desktop

  • Download and install CLO Desktop from clo.ai/download.
  • Log in with your Anthropic account.
  • Open the settings in CLO Desktop and find the "Developer" section.
  • Click "Edit Config" to open the cloth-desktop-config.json file.
  • Update the cloth-desktop-config.json file by adding the new MCP at the bottom.
  • Use cursor or any AI coding editor to help adjust this file to properly add this in the correct format.
  • Use UV as the command and structure the arguments in a different way.
  • Restart CLO Desktop.
  • Start the MCP server by navigating to the MEM agent MCP folder in the terminal and running uv run python mcp_server/server.py.

5. Using MEM Agent with CLO Desktop

  • Ask CLO Desktop to use MEM agent to save information.
  • MEM agent will store the information in markdown files in the local memory folder.
  • The information is stored in a context engineering way.
  • Create new entities to store information about different areas or people.
  • MEM agent will create new markdown files for each entity and update the main user file with wiki links.
  • You can edit the markdown files directly to add or modify information.

6. Protecting Information with Filters

  • Use filters to prevent specific information from being revealed to AI models.
  • Run make add-filters to add filters.
  • Type in the information you never want to be revealed and then type quit() to end the process.
  • The filters are stored in the filters file.
  • MEM agent will not reveal any information that is protected by the filters.

7. Connecting to Other Software

  • MEM agent can be used with other software such as CH GPD, GitHub, and Google Docs.
  • The memory_connectors subfolder in the GitHub repository contains setups for different tools.
  • Use cursor or cloth code to help set up the connectors.

8. Conclusion

  • MEM agent is a taste of the future of context engineering.
  • It allows you to securely store your files locally and use them with cutting-edge AI models.
  • It protects your private information from ever accessing the internet.
  • The project is new and may have unexpected errors, but it has the potential to be very useful.

AI summaries can miss context or contain errors. Check important details against the original video.

MAKE IT YOURS

Read. Remember. Reuse.

Free tools

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.