MemOS Scenario Examples

Introduction

Cookbook Philosophy: Problem-Oriented Approach

Welcome to the MemOS Cookbook! This is not a traditional technical documentation, but a hands-on guide focused on solving real problems.

Why do we need this Cookbook?

In AI application development, we often encounter these challenges:

  • πŸ€” "How can I make my AI application remember user preferences?"
  • πŸ” "How can I quickly retrieve relevant information from a large number of documents?"
  • πŸ’‘ "How can I build an intelligent assistant with long-term memory?"

Traditional documentation tells you what it is, API references tell you how to call it, while this Cookbook focuses on telling you how to solve specific problems.

Core Philosophy of this Cookbook:

  1. Problem-Driven: Each recipe starts from a real use case scenario
  2. Practice-Oriented: Provides complete code examples that can be run directly
  3. Progressive Learning: From simple to complex, step by step
  4. Best Practices: Incorporates experience and recommendations from production environments

πŸ“š Complete Chapter Navigation

Chapter 1: Getting Started: Your First MemCube

Core Skills: Environment configuration, MemCube basic operations, data import and management

  • API Version
    • Recipe 1.1: Configure MemOS Development Environment (API Version)
    • Recipe 1.2: Build a Simple MemCube from Documents (API Version)
    • Recipe 1.3: MemCube Basic Operations (API Version)
  • Ollama Version
    • Recipe 1.1: Configure MemOS Development Environment (Ollama Version)
    • Recipe 1.2: Build a Simple MemCube from Documents (Ollama Version)
    • Recipe 1.3: MemCube Basic Operations (Ollama Version)

Chapter 2: Structured Memory: TreeNodeTextualMemoryMetadata

Core Skills: Structured memory, metadata management, multi-source tracking

  • API Version
    • Recipe 2.1: Understanding Core Concepts of TreeNodeTextualMemoryMetadata
    • Recipe 2.2: Creating Basic Structured Memory (API Version)
    • Recipe 2.3: Common Field Descriptions and Configuration
  • Ollama Version
    • Recipe 2.1: Understanding Core Concepts of TreeNodeTextualMemoryMetadata
    • Recipe 2.2: Creating Basic Structured Memory (Ollama Version)
    • Recipe 2.3: Common Field Descriptions and Configuration

Chapter 3: Building an Intelligent Novel Analysis System with MemOS

Core Skills: Text preprocessing, AI-driven memory extraction, intelligent reasoning systems, creative application development

  • Recipe 3.0: Text Preprocessing and API Environment Configuration
  • Recipe 3.1: AI-Driven Character Recognition and Alias Unification
  • Recipe 3.2: Structured Memory Content Extraction
  • Recipe 3.3: Memory-Based Intelligent Reasoning System
  • Recipe 3.4: Embedding Model Optimization Configuration
  • Recipe 3.5: Memory Graph Structure Transformer
  • Recipe 3.6: MemOS Integration and Query Validation
  • Creative Showcase:
    • Intelligent World Timeline System
    • Dynamic Working Memory World Background
    • MemOS-Driven Text MUD Game

πŸš€ Coming Soon

  • Chapter 4: Building Production-Grade Knowledge Q&A System with MemOS

🟒 Beginner Path (Total 4-6 hours)

Chapter 1 (API or Ollama version) β†’ Chapter 2 (corresponding version)

For: Developers new to MemOS Goal: Master basic operations and structured memory

🟑 Intermediate Path (Total 8-12 hours)

Chapter 1 β†’ Chapter 2 β†’ Chapter 3 (Intelligent Novel Analysis System)

For: Developers with some AI development experience Goal: Master complex text processing, AI-driven memory extraction and intelligent reasoning systems

πŸ”΄ Advanced Path (Total 12-20 hours)

Complete learning of all chapters + creative extension practice

For: Developers who want to build production-grade applications Goal: Master advanced features and innovative application patterns of MemOS


How to Use This Cookbook Effectively

πŸ“– Reading Suggestions:

  • Beginners: Recommended to read in chapter order, practice each recipe hands-on
  • Experienced developers: Can jump directly to recipes of interest
  • Problem solvers: Use the directory above to quickly locate relevant recipes
  • Path learners: Follow the learning paths above for systematic learning

πŸ› οΈ Practice Suggestions:

  1. Prepare environment: Ensure Python 3.10+ and related dependencies are installed
  2. Hands-on practice: Each recipe contains complete runnable code
  3. Experiment with variations: Try modifying parameters to observe different effects
  4. Problem solving: Check FAQ sections or seek community help when encountering issues

πŸ”§ Code Conventions:

# πŸ’‘ Tip: Important concepts or best practices
# ⚠️ Note: Items requiring special attention
# 🎯 Goal: Purpose of current step

πŸ”§ Environment Preparation

System Requirements

  • Python 3.10+
  • 8GB+ RAM (16GB recommended)
  • 50GB+ available disk space

Dependency Installation

pip install MemoryOS
# Optional: Neo4j, Ollama, OpenAI API

Installation Verification

import memos
print(f"MemOS Version: {memos.__version__}")

Relationship with Other Documentation (Tutorials, API References, etc.)

Documentation Ecosystem:

  • 🏁 Quick Start Tutorial: Helps you get started with MemOS basic features in 5 minutes
  • πŸ“š This Cookbook: In-depth practical recipes to solve specific problems
  • πŸ“– API Reference: Detailed technical specifications of functions and classes
  • πŸ—οΈ Architecture Documentation: System design and extension guides

When to use which documentation:

ScenarioRecommended DocumentationDescription
New to MemOSQuick Start TutorialLearn basic concepts and core features
Solving specific problemsThis CookbookFind corresponding recipes and solutions
Looking up function usageAPI ReferenceView parameter and return value details
System designArchitecture DocumentationUnderstand internal mechanisms and extension methods

πŸ“ž Getting Help


Let's start this exciting MemOS learning journey!