{"id":6444,"library":"reme-ai","title":"ReMe (Remember Me, Refine Me)","description":"ReMe (Remember Me, Refine Me) is a Python library designed for managing and refining an AI agent's long-term memory. It provides functionalities for summarization, retrieval, and contextual awareness, enabling agents to learn and adapt over time. The library is actively maintained with frequent minor releases (multiple per month) to introduce new features, fix bugs, and refine existing memory mechanisms.","status":"active","version":"0.3.1.8","language":"en","source_language":"en","source_url":"https://github.com/agentscope-ai/ReMe","tags":["AI","memory","agents","LLM","vector-store","context-management"],"install":[{"cmd":"pip install reme-ai","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required Python version as per pyproject.toml","package":"python>=3.10"},{"reason":"Optional: Required for using ChromaDB-backed memory systems.","package":"chromadb","optional":true},{"reason":"Optional: Required for certain local embedding models and vector store functionalities.","package":"sentence-transformers","optional":true}],"imports":[{"symbol":"ReMe","correct":"from reme import ReMe"}],"quickstart":{"code":"import os\nfrom reme import ReMe\n\n# Ensure your OpenAI API key is set as an environment variable\n# e.g., export OPENAI_API_KEY='sk-...'\nopenai_api_key = os.environ.get('OPENAI_API_KEY', '')\nif not openai_api_key:\n    print(\"WARNING: OPENAI_API_KEY is not set. ReMe operations requiring an LLM will fail.\")\n\n# Initialize ReMe with a unique agent ID. This creates a local memory store.\nre_me = ReMe(agent_id=\"my_first_agent\")\n\n# Add experiences to the agent's memory\nre_me.add_experience(\"I met a new colleague today named Sarah. She works on the frontend team.\")\nre_me.add_experience(\"Sarah is quite good at React and uses TypeScript.\")\nre_me.add_experience(\"She mentioned she loves to hike and explore national parks.\")\n\n# Retrieve relevant memories based on a query\nquery = \"Tell me about Sarah.\"\nretrieved_memories = re_me.retrieve(query)\nprint(f\"\\nRetrieved memories for '{query}':\")\nfor mem in retrieved_memories:\n    print(f\"- {mem}\")\n\n# Summarize memories (requires LLM interaction)\ntry:\n    summarized_memory = re_me.summarize_memories(\n        query=\"What do I know about Sarah's work and hobbies?\", \n        count=3\n    )\n    print(f\"\\nSummarized memory: {summarized_memory}\")\nexcept Exception as e:\n    print(f\"\\nFailed to summarize memories (API key likely missing/invalid): {e}\")\n\n# To clear the agent's memory store (optional)\n# re_me.clear_memory()\n","lang":"python","description":"This quickstart demonstrates how to initialize ReMe, add experiences, and then retrieve and summarize them. Ensure you have an LLM API key (e.g., OPENAI_API_KEY) set as an environment variable, as summarization and retrieval functionalities depend on it. If the key is missing, LLM-dependent operations will fail."},"warnings":[{"fix":"Install `chromadb` explicitly if using ChromaDB features: `pip install reme-ai[chroma]` or `pip install chromadb`.","message":"Before v0.3.1.8, attempting to use `chromadb`-backed memory without `chromadb` installed could lead to import errors. While the library now handles this gracefully, users leveraging ChromaDB features must explicitly install `chromadb` (`pip install chromadb`).","severity":"gotcha","affected_versions":"<0.3.1.8"},{"fix":"Set necessary API keys as environment variables (e.g., `export OPENAI_API_KEY='your_key'`) or ensure they are loaded via `python-dotenv`.","message":"ReMe relies on external LLM services (e.g., OpenAI, LiteLLM) for key functionalities like summarization and retrieval. Ensure required API keys (e.g., `OPENAI_API_KEY`) are set in environment variables or `*.env` files for `ReMe` to function correctly. Without these, LLM-dependent operations will fail.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review any custom logic that interacts with ReMe's internal text truncation. Prefer using public APIs for truncation or context management.","message":"In v0.3.1.4, core text truncation utilities were refactored and replaced with a new marker system. Custom integrations or logic that directly interacted with or relied on previous internal truncation methods might require review and adaptation.","severity":"breaking","affected_versions":">=0.3.1.4"},{"fix":"Implement proper error handling (try-except blocks) around `summarize_memories` and `retrieve` calls to gracefully manage potential failures.","message":"From v0.3.1.5 onwards, `summarize` and `retrieve` operations are designed to surface failures more explicitly instead of masking them. If your application previously relied on silent failures for these operations, it might now encounter exceptions for operations that fail.","severity":"gotcha","affected_versions":">=0.3.1.5"},{"fix":"Always install `reme-ai` via `pip install reme-ai` to ensure all required dependencies, including `litellm`, are correctly managed.","message":"The changelog for v0.3.1.3 states `litellm` was moved to dev dependencies. However, `litellm` is still listed in the `requirements.txt` for v0.3.1.8, implying it remains a core dependency. Users should rely on `pip install reme-ai` to ensure all necessary dependencies are installed.","severity":"gotcha","affected_versions":">=0.3.1.3"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}