Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- [**72% lower token usage**](https://x.com/MemOS_dev/status/2020854044583924111) — intelligent memory retrieval instead of loading full chat history
- [**Multi-agent memory sharing**](https://x.com/MemOS_dev/status/2020538135487062094) — multi-instance agents share memory via same user_id, automatic context handoff

Get your API key: [MemOS Dashboard](https://memos-dashboard.openmem.net/cn/login/)
Get your API key: [MemOS Dashboard](https://memos-dashboard.openmem.net/cn/login/)
Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/MemOS-Cloud-OpenClaw-Plugin)

### 🧠 Local Plugin — 100% On-Device Memory
Expand All @@ -84,7 +84,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
- **Hybrid search + task & skill evolution** — FTS5 + vector search, auto task summarization, reusable skills that self-upgrade
- **Multi-agent collaboration + Memory Viewer** — memory isolation, skill sharing, full web dashboard with 7 management pages

🌐 [Homepage](https://memos-claw.openmem.net) ·
🌐 [Homepage](https://memos-claw.openmem.net) ·
📖 [Documentation](https://memos-claw.openmem.net/docs/index.html) · 📦 [NPM](https://www.npmjs.com/package/@memtensor/memos-local-openclaw-plugin)

## 📌 MemOS: Memory Operating System for AI Agents
Expand All @@ -104,10 +104,10 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem

### News

- **2026-03-08** · 🦞 **MemOS OpenClaw Plugin — Cloud & Local**
- **2026-03-08** · 🦞 **MemOS OpenClaw Plugin — Cloud & Local**
Official OpenClaw memory plugins launched. **Cloud Plugin**: hosted memory service with 72% lower token usage and multi-agent memory sharing ([MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/MemOS-Cloud-OpenClaw-Plugin)). **Local Plugin** (`v1.0.0`): 100% on-device memory with persistent SQLite, hybrid search (FTS5 + vector), task summarization & skill evolution, multi-agent collaboration, and a full Memory Viewer dashboard.

- **2025-12-24** · 🎉 **MemOS v2.0: Stardust (星尘) Release**
- **2025-12-24** · 🎉 **MemOS v2.0: Stardust (星尘) Release**
Comprehensive KB (doc/URL parsing + cross-project sharing), memory feedback & precise deletion, multi-modal memory (images/charts), tool memory for agent planning, Redis Streams scheduling + DB optimizations, streaming/non-streaming chat, MCP upgrade, and lightweight quick/full deployment.
<details>
<summary>✨ <b>New Features</b></summary>
Expand Down Expand Up @@ -155,7 +155,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
</details>

- **2025-08-07** · 🎉 **MemOS v1.0.0 (MemCube) Release**
First MemCube release with a word-game demo, LongMemEval evaluation, BochaAISearchRetriever integration, NebulaGraph support, improved search capabilities, and the official Playground launch.
First MemCube release with a word-game demo, LongMemEval evaluation, BochaAISearchRetriever integration, improved search capabilities, and the official Playground launch.

<details>
<summary>✨ <b>New Features</b></summary>
Expand All @@ -176,7 +176,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem

**Plaintext Memory**
- Integrated internet search with Bocha.
- Added support for Nebula database.
- Expanded graph database support.
- Added contextual understanding for the tree-structured plaintext memory search interface.

</details>
Expand All @@ -188,7 +188,7 @@ Full tutorial → [MemOS-Cloud-OpenClaw-Plugin](https://github.com/MemTensor/Mem
- Fixed the concat_cache method.

**Plaintext Memory**
- Fixed Nebula search-related issues.
- Fixed graph search-related issues.

</details>

Expand Down
2 changes: 1 addition & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ MEMSCHEDULER_USE_REDIS_QUEUE=false

## Graph / vector stores
# Neo4j database selection mode
NEO4J_BACKEND=neo4j-community # neo4j-community | neo4j | nebular | polardb
NEO4J_BACKEND=neo4j-community # neo4j-community | neo4j | polardb | postgres
# Neo4j database url
NEO4J_URI=bolt://localhost:7687 # required when backend=neo4j*
# Neo4j database user
Expand Down
2 changes: 1 addition & 1 deletion examples/mem_agent/deepsearch_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def build_minimal_components():

# Build component configurations using APIConfig methods (like config_builders.py)

# Graph DB configuration - using APIConfig.get_nebular_config()
# Graph DB configuration - using APIConfig graph DB helpers
graph_db_backend = os.getenv("NEO4J_BACKEND", "polardb").lower()
graph_db_backend_map = {
"polardb": APIConfig.get_polardb_config(),
Expand Down
35 changes: 8 additions & 27 deletions src/memos/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,21 +741,6 @@ def get_neo4j_shared_config(user_id: str | None = None) -> dict[str, Any]:
"embedding_dimension": int(os.getenv("EMBEDDING_DIMENSION", 3072)),
}

@staticmethod
def get_nebular_config(user_id: str | None = None) -> dict[str, Any]:
"""Get Nebular configuration."""
return {
"uri": json.loads(os.getenv("NEBULAR_HOSTS", '["localhost"]')),
"user": os.getenv("NEBULAR_USER", "root"),
"password": os.getenv("NEBULAR_PASSWORD", "xxxxxx"),
"space": os.getenv("NEBULAR_SPACE", "shared-tree-textual-memory"),
"user_name": f"memos{user_id.replace('-', '')}",
"use_multi_db": False,
"auto_create": True,
"embedding_dimension": int(os.getenv("EMBEDDING_DIMENSION", 3072)),
}

@staticmethod
def get_milvus_config():
return {
"collection_name": [
Expand Down Expand Up @@ -1103,7 +1088,6 @@ def create_user_config(user_name: str, user_id: str) -> tuple["MOSConfig", "Gene

neo4j_community_config = APIConfig.get_neo4j_community_config(user_id)
neo4j_config = APIConfig.get_neo4j_config(user_id)
nebular_config = APIConfig.get_nebular_config(user_id)
polardb_config = APIConfig.get_polardb_config(user_id)
internet_config = (
APIConfig.get_internet_config()
Expand All @@ -1114,7 +1098,6 @@ def create_user_config(user_name: str, user_id: str) -> tuple["MOSConfig", "Gene
graph_db_backend_map = {
"neo4j-community": neo4j_community_config,
"neo4j": neo4j_config,
"nebular": nebular_config,
"polardb": polardb_config,
"postgres": postgres_config,
}
Expand Down Expand Up @@ -1144,9 +1127,9 @@ def create_user_config(user_name: str, user_id: str) -> tuple["MOSConfig", "Gene
"reorganize": os.getenv("MOS_ENABLE_REORGANIZE", "false").lower()
== "true",
"memory_size": {
"WorkingMemory": int(os.getenv("NEBULAR_WORKING_MEMORY", 20)),
"LongTermMemory": int(os.getenv("NEBULAR_LONGTERM_MEMORY", 1e6)),
"UserMemory": int(os.getenv("NEBULAR_USER_MEMORY", 1e6)),
"WorkingMemory": int(os.getenv("MOS_WORKING_MEMORY", 20)),
"LongTermMemory": int(os.getenv("MOS_LONGTERM_MEMORY", 1e6)),
"UserMemory": int(os.getenv("MOS_USER_MEMORY", 1e6)),
},
"search_strategy": {
"fast_graph": bool(os.getenv("FAST_GRAPH", "false") == "true"),
Expand All @@ -1169,7 +1152,7 @@ def create_user_config(user_name: str, user_id: str) -> tuple["MOSConfig", "Gene
}
)
else:
raise ValueError(f"Invalid Neo4j backend: {graph_db_backend}")
raise ValueError(f"Invalid graph DB backend: {graph_db_backend}")
default_mem_cube = GeneralMemCube(default_cube_config)
return default_config, default_mem_cube

Expand All @@ -1188,13 +1171,11 @@ def get_default_cube_config() -> "GeneralMemCubeConfig | None":
openai_config = APIConfig.get_openai_config()
neo4j_community_config = APIConfig.get_neo4j_community_config(user_id="default")
neo4j_config = APIConfig.get_neo4j_config(user_id="default")
nebular_config = APIConfig.get_nebular_config(user_id="default")
polardb_config = APIConfig.get_polardb_config(user_id="default")
postgres_config = APIConfig.get_postgres_config(user_id="default")
graph_db_backend_map = {
"neo4j-community": neo4j_community_config,
"neo4j": neo4j_config,
"nebular": nebular_config,
"polardb": polardb_config,
"postgres": postgres_config,
}
Expand Down Expand Up @@ -1227,9 +1208,9 @@ def get_default_cube_config() -> "GeneralMemCubeConfig | None":
== "true",
"internet_retriever": internet_config,
"memory_size": {
"WorkingMemory": int(os.getenv("NEBULAR_WORKING_MEMORY", 20)),
"LongTermMemory": int(os.getenv("NEBULAR_LONGTERM_MEMORY", 1e6)),
"UserMemory": int(os.getenv("NEBULAR_USER_MEMORY", 1e6)),
"WorkingMemory": int(os.getenv("MOS_WORKING_MEMORY", 20)),
"LongTermMemory": int(os.getenv("MOS_LONGTERM_MEMORY", 1e6)),
"UserMemory": int(os.getenv("MOS_USER_MEMORY", 1e6)),
},
"search_strategy": {
"fast_graph": bool(os.getenv("FAST_GRAPH", "false") == "true"),
Expand All @@ -1253,4 +1234,4 @@ def get_default_cube_config() -> "GeneralMemCubeConfig | None":
}
)
else:
raise ValueError(f"Invalid Neo4j backend: {graph_db_backend}")
raise ValueError(f"Invalid graph DB backend: {graph_db_backend}")
5 changes: 3 additions & 2 deletions src/memos/api/handlers/config_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ def build_graph_db_config(user_id: str = "default") -> dict[str, Any]:
graph_db_backend_map = {
"neo4j-community": APIConfig.get_neo4j_community_config(user_id=user_id),
"neo4j": APIConfig.get_neo4j_config(user_id=user_id),
"nebular": APIConfig.get_nebular_config(user_id=user_id),
"polardb": APIConfig.get_polardb_config(user_id=user_id),
"postgres": APIConfig.get_postgres_config(user_id=user_id),
}

# Support both GRAPH_DB_BACKEND and legacy NEO4J_BACKEND env vars
graph_db_backend = os.getenv("GRAPH_DB_BACKEND", os.getenv("NEO4J_BACKEND", "nebular")).lower()
graph_db_backend = os.getenv(
"GRAPH_DB_BACKEND", os.getenv("NEO4J_BACKEND", "neo4j-community")
).lower()
return GraphDBConfigFactory.model_validate(
{
"backend": graph_db_backend,
Expand Down
52 changes: 0 additions & 52 deletions src/memos/configs/graph_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,57 +103,6 @@ def validate_community(self):
return self


class NebulaGraphDBConfig(BaseGraphDBConfig):
"""
NebulaGraph-specific configuration.

Key concepts:
- `space`: Equivalent to a database or namespace. All tag/edge/schema live within a space.
- `user_name`: Used for logical tenant isolation if needed.
- `auto_create`: Whether to automatically create the target space if it does not exist.

Example:
---
hosts = ["127.0.0.1:9669"]
user = "root"
password = "nebula"
space = "shared_graph"
user_name = "alice"
"""

space: str = Field(
..., description="The name of the target NebulaGraph space (like a database)"
)
user_name: str | None = Field(
default=None,
description="Logical user or tenant ID for data isolation (optional, used in metadata tagging)",
)
auto_create: bool = Field(
default=False,
description="Whether to auto-create the space if it does not exist",
)
use_multi_db: bool = Field(
default=True,
description=(
"If True: use Neo4j's multi-database feature for physical isolation; "
"each user typically gets a separate database. "
"If False: use a single shared database with logical isolation by user_name."
),
)
max_client: int = Field(
default=1000,
description=("max_client"),
)
embedding_dimension: int = Field(default=3072, description="Dimension of vector embedding")

@model_validator(mode="after")
def validate_config(self):
"""Validate config."""
if not self.space:
raise ValueError("`space` must be provided")
return self


class PolarDBGraphDBConfig(BaseConfig):
"""
PolarDB-specific configuration.
Expand Down Expand Up @@ -299,7 +248,6 @@ class GraphDBConfigFactory(BaseModel):
backend_to_class: ClassVar[dict[str, Any]] = {
"neo4j": Neo4jGraphDBConfig,
"neo4j-community": Neo4jCommunityGraphDBConfig,
"nebular": NebulaGraphDBConfig,
"polardb": PolarDBGraphDBConfig,
"postgres": PostgresGraphDBConfig,
}
Expand Down
2 changes: 0 additions & 2 deletions src/memos/graph_dbs/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from memos.configs.graph_db import GraphDBConfigFactory
from memos.graph_dbs.base import BaseGraphDB
from memos.graph_dbs.nebular import NebulaGraphDB
from memos.graph_dbs.neo4j import Neo4jGraphDB
from memos.graph_dbs.neo4j_community import Neo4jCommunityGraphDB
from memos.graph_dbs.polardb import PolarDBGraphDB
Expand All @@ -15,7 +14,6 @@ class GraphStoreFactory(BaseGraphDB):
backend_to_class: ClassVar[dict[str, Any]] = {
"neo4j": Neo4jGraphDB,
"neo4j-community": Neo4jCommunityGraphDB,
"nebular": NebulaGraphDB,
"polardb": PolarDBGraphDB,
"postgres": PostgresGraphDB,
}
Expand Down
Loading
Loading