mem0-cli 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/PKG-INFO +1 -1
  2. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/pyproject.toml +1 -1
  3. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/__init__.py +1 -1
  4. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/app.py +0 -38
  5. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/backend/base.py +0 -3
  6. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/backend/platform.py +5 -14
  7. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/config_cmd.py +0 -5
  8. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/memory.py +0 -6
  9. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/config.py +0 -9
  10. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/.gitignore +0 -0
  11. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/README.md +0 -0
  12. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/__main__.py +0 -0
  13. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/backend/__init__.py +0 -0
  14. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/branding.py +0 -0
  15. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/__init__.py +0 -0
  16. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/entities.py +0 -0
  17. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/events_cmd.py +0 -0
  18. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/init_cmd.py +0 -0
  19. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/commands/utils.py +0 -0
  20. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/output.py +0 -0
  21. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/state.py +0 -0
  22. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/telemetry.py +0 -0
  23. {mem0_cli-0.2.3 → mem0_cli-0.2.4}/src/mem0_cli/telemetry_sender.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mem0-cli
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: The official CLI for mem0 — the memory layer for AI agents
5
5
  Author-email: "mem0.ai" <founders@mem0.ai>
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mem0-cli"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  description = "The official CLI for mem0 — the memory layer for AI agents"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -1,3 +1,3 @@
1
1
  """mem0 CLI — the command-line interface for the mem0 memory layer."""
2
2
 
3
- __version__ = "0.2.3"
3
+ __version__ = "0.2.4"
@@ -267,8 +267,6 @@ def add(
267
267
  categories: str | None = typer.Option(
268
268
  None, "--categories", help="Categories (JSON array or comma-separated)."
269
269
  ),
270
- graph: bool = typer.Option(False, "--graph", help="Enable graph memory extraction."),
271
- no_graph: bool = typer.Option(False, "--no-graph", help="Disable graph memory extraction."),
272
270
  output: str = typer.Option(
273
271
  "text", "--output", "-o", help="Output format: text, json, quiet.", rich_help_panel="Output"
274
272
  ),
@@ -295,13 +293,6 @@ def add(
295
293
  backend, config = _get_backend_and_config(api_key, base_url)
296
294
  ids = _resolve_ids(config, user_id=user_id, agent_id=agent_id, app_id=app_id, run_id=run_id)
297
295
 
298
- if no_graph:
299
- graph_enabled = False
300
- elif graph:
301
- graph_enabled = True
302
- else:
303
- graph_enabled = config.defaults.enable_graph
304
-
305
296
  cmd_add(
306
297
  backend,
307
298
  text,
@@ -313,7 +304,6 @@ def add(
313
304
  no_infer=no_infer,
314
305
  expires=expires,
315
306
  categories=categories,
316
- enable_graph=graph_enabled,
317
307
  output=output,
318
308
  )
319
309
 
@@ -357,12 +347,6 @@ def search(
357
347
  help="Specific fields to return (comma-separated).",
358
348
  rich_help_panel="Search",
359
349
  ),
360
- graph: bool = typer.Option(
361
- False, "--graph", help="Enable graph in search.", rich_help_panel="Search"
362
- ),
363
- no_graph: bool = typer.Option(
364
- False, "--no-graph", help="Disable graph in search.", rich_help_panel="Search"
365
- ),
366
350
  output: str = typer.Option(
367
351
  "text", "--output", "-o", help="Output: text, json, table.", rich_help_panel="Output"
368
352
  ),
@@ -396,13 +380,6 @@ def search(
396
380
  backend, config = _get_backend_and_config(api_key, base_url)
397
381
  ids = _resolve_ids(config, user_id=user_id, agent_id=agent_id, app_id=app_id, run_id=run_id)
398
382
 
399
- if no_graph:
400
- graph_enabled = False
401
- elif graph:
402
- graph_enabled = True
403
- else:
404
- graph_enabled = config.defaults.enable_graph
405
-
406
383
  cmd_search(
407
384
  backend,
408
385
  query,
@@ -413,7 +390,6 @@ def search(
413
390
  keyword=keyword,
414
391
  filter_json=filter_json,
415
392
  fields=fields,
416
- enable_graph=graph_enabled,
417
393
  output=output,
418
394
  )
419
395
 
@@ -480,12 +456,6 @@ def list_cmd(
480
456
  before: str | None = typer.Option(
481
457
  None, "--before", help="Created before (YYYY-MM-DD).", rich_help_panel="Filters"
482
458
  ),
483
- graph: bool = typer.Option(
484
- False, "--graph", help="Enable graph in listing.", rich_help_panel="Filters"
485
- ),
486
- no_graph: bool = typer.Option(
487
- False, "--no-graph", help="Disable graph in listing.", rich_help_panel="Filters"
488
- ),
489
459
  output: str = typer.Option(
490
460
  "table", "--output", "-o", help="Output: text, json, table.", rich_help_panel="Output"
491
461
  ),
@@ -511,13 +481,6 @@ def list_cmd(
511
481
  backend, config = _get_backend_and_config(api_key, base_url)
512
482
  ids = _resolve_ids(config, user_id=user_id, agent_id=agent_id, app_id=app_id, run_id=run_id)
513
483
 
514
- if no_graph:
515
- graph_enabled = False
516
- elif graph:
517
- graph_enabled = True
518
- else:
519
- graph_enabled = config.defaults.enable_graph
520
-
521
484
  cmd_list(
522
485
  backend,
523
486
  **ids,
@@ -526,7 +489,6 @@ def list_cmd(
526
489
  category=category,
527
490
  after=after,
528
491
  before=before,
529
- enable_graph=graph_enabled,
530
492
  output=output,
531
493
  )
532
494
 
@@ -26,7 +26,6 @@ class Backend(ABC):
26
26
  infer: bool = True,
27
27
  expires: str | None = None,
28
28
  categories: list[str] | None = None,
29
- enable_graph: bool = False,
30
29
  ) -> dict: ...
31
30
 
32
31
  @abstractmethod
@@ -44,7 +43,6 @@ class Backend(ABC):
44
43
  keyword: bool = False,
45
44
  filters: dict | None = None,
46
45
  fields: list[str] | None = None,
47
- enable_graph: bool = False,
48
46
  ) -> list[dict]: ...
49
47
 
50
48
  @abstractmethod
@@ -63,7 +61,6 @@ class Backend(ABC):
63
61
  category: str | None = None,
64
62
  after: str | None = None,
65
63
  before: str | None = None,
66
- enable_graph: bool = False,
67
64
  ) -> list[dict]: ...
68
65
 
69
66
  @abstractmethod
@@ -64,7 +64,6 @@ class PlatformBackend(Backend):
64
64
  infer: bool = True,
65
65
  expires: str | None = None,
66
66
  categories: list[str] | None = None,
67
- enable_graph: bool = False,
68
67
  ) -> dict:
69
68
  payload: dict[str, Any] = {}
70
69
 
@@ -91,11 +90,9 @@ class PlatformBackend(Backend):
91
90
  payload["expiration_date"] = expires
92
91
  if categories:
93
92
  payload["categories"] = categories
94
- if enable_graph:
95
- payload["enable_graph"] = True
96
93
  payload["source"] = "CLI"
97
94
 
98
- return self._request("POST", "/v1/memories/", json=payload)
95
+ return self._request("POST", "/v3/memories/add/", json=payload)
99
96
 
100
97
  def _build_filters(
101
98
  self,
@@ -106,7 +103,7 @@ class PlatformBackend(Backend):
106
103
  run_id: str | None = None,
107
104
  extra_filters: dict | None = None,
108
105
  ) -> dict | None:
109
- """Build a filters dict for v2 API endpoints.
106
+ """Build a filters dict for v3 API endpoints.
110
107
 
111
108
  Entity IDs are ANDed (all provided IDs must match).
112
109
  Extra filters (date ranges, categories) are also ANDed.
@@ -152,7 +149,6 @@ class PlatformBackend(Backend):
152
149
  keyword: bool = False,
153
150
  filters: dict | None = None,
154
151
  fields: list[str] | None = None,
155
- enable_graph: bool = False,
156
152
  ) -> list[dict]:
157
153
  payload: dict[str, Any] = {"query": query, "top_k": top_k, "threshold": threshold}
158
154
 
@@ -171,11 +167,9 @@ class PlatformBackend(Backend):
171
167
  payload["keyword_search"] = True
172
168
  if fields:
173
169
  payload["fields"] = fields
174
- if enable_graph:
175
- payload["enable_graph"] = True
176
170
  payload["source"] = "CLI"
177
171
 
178
- result = self._request("POST", "/v2/memories/search/", json=payload)
172
+ result = self._request("POST", "/v3/memories/search/", json=payload)
179
173
  return (
180
174
  result
181
175
  if isinstance(result, list)
@@ -197,12 +191,11 @@ class PlatformBackend(Backend):
197
191
  category: str | None = None,
198
192
  after: str | None = None,
199
193
  before: str | None = None,
200
- enable_graph: bool = False,
201
194
  ) -> list[dict]:
202
195
  payload: dict[str, Any] = {}
203
196
  params = {"page": str(page), "page_size": str(page_size)}
204
197
 
205
- # Build filters for v2 API — entity IDs and date filters go inside "filters"
198
+ # Build filters — entity IDs and date filters go inside "filters"
206
199
  extra: dict[str, Any] = {}
207
200
  if category:
208
201
  extra["categories"] = {"contains": category}
@@ -220,11 +213,9 @@ class PlatformBackend(Backend):
220
213
  )
221
214
  if api_filters:
222
215
  payload["filters"] = api_filters
223
- if enable_graph:
224
- payload["enable_graph"] = True
225
216
  payload["source"] = "CLI"
226
217
 
227
- result = self._request("POST", "/v2/memories/", json=payload, params=params)
218
+ result = self._request("POST", "/v3/memories/", json=payload, params=params)
228
219
  return (
229
220
  result
230
221
  if isinstance(result, list)
@@ -39,7 +39,6 @@ def cmd_config_show(*, output: str = "text") -> None:
39
39
  "agent_id": config.defaults.agent_id or None,
40
40
  "app_id": config.defaults.app_id or None,
41
41
  "run_id": config.defaults.run_id or None,
42
- "enable_graph": config.defaults.enable_graph,
43
42
  },
44
43
  "platform": {
45
44
  "api_key": redact_key(config.platform.api_key),
@@ -73,10 +72,6 @@ def cmd_config_show(*, output: str = "text") -> None:
73
72
  "defaults.run_id",
74
73
  config.defaults.run_id or f"[{DIM_COLOR}](not set)[/]",
75
74
  )
76
- table.add_row(
77
- "defaults.enable_graph",
78
- str(config.defaults.enable_graph).lower(),
79
- )
80
75
  table.add_row("", "")
81
76
 
82
77
  # Platform
@@ -62,7 +62,6 @@ def cmd_add(
62
62
  no_infer: bool,
63
63
  expires: str | None,
64
64
  categories: str | None,
65
- enable_graph: bool = False,
66
65
  output: str = "text",
67
66
  ) -> None:
68
67
  """Add a memory."""
@@ -145,7 +144,6 @@ def cmd_add(
145
144
  infer=not no_infer,
146
145
  expires=expires,
147
146
  categories=cats,
148
- enable_graph=enable_graph,
149
147
  )
150
148
  except Exception as e:
151
149
  ts.error_msg = str(e)
@@ -226,7 +224,6 @@ def cmd_search(
226
224
  keyword: bool,
227
225
  filter_json: str | None,
228
226
  fields: str | None,
229
- enable_graph: bool = False,
230
227
  output: str = "text",
231
228
  ) -> None:
232
229
  """Search memories."""
@@ -269,7 +266,6 @@ def cmd_search(
269
266
  keyword=keyword,
270
267
  filters=filters,
271
268
  fields=field_list,
272
- enable_graph=enable_graph,
273
269
  )
274
270
  except Exception as e:
275
271
  print_error(err_console, str(e))
@@ -356,7 +352,6 @@ def cmd_list(
356
352
  category: str | None,
357
353
  after: str | None,
358
354
  before: str | None,
359
- enable_graph: bool = False,
360
355
  output: str = "table",
361
356
  ) -> None:
362
357
  """List memories."""
@@ -385,7 +380,6 @@ def cmd_list(
385
380
  category=category,
386
381
  after=after,
387
382
  before=before,
388
- enable_graph=enable_graph,
389
383
  )
390
384
  except Exception as e:
391
385
  print_error(err_console, str(e))
@@ -36,7 +36,6 @@ class DefaultsConfig:
36
36
  agent_id: str = ""
37
37
  app_id: str = ""
38
38
  run_id: str = ""
39
- enable_graph: bool = False
40
39
 
41
40
 
42
41
  @dataclass
@@ -60,7 +59,6 @@ SHORT_KEY_ALIASES: dict[str, str] = {
60
59
  "agent_id": "defaults.agent_id",
61
60
  "app_id": "defaults.app_id",
62
61
  "run_id": "defaults.run_id",
63
- "enable_graph": "defaults.enable_graph",
64
62
  }
65
63
 
66
64
 
@@ -91,8 +89,6 @@ def load_config() -> Mem0Config:
91
89
  config.defaults.agent_id = defaults.get("agent_id", "")
92
90
  config.defaults.app_id = defaults.get("app_id", "")
93
91
  config.defaults.run_id = defaults.get("run_id", "")
94
- config.defaults.enable_graph = defaults.get("enable_graph", False)
95
-
96
92
  telemetry = data.get("telemetry", {})
97
93
  config.telemetry.anonymous_id = telemetry.get("anonymous_id", "")
98
94
 
@@ -121,10 +117,6 @@ def load_config() -> Mem0Config:
121
117
  if env_run_id:
122
118
  config.defaults.run_id = env_run_id
123
119
 
124
- env_graph = os.environ.get("MEM0_ENABLE_GRAPH")
125
- if env_graph:
126
- config.defaults.enable_graph = env_graph.lower() in ("true", "1", "yes")
127
-
128
120
  return config
129
121
 
130
122
 
@@ -139,7 +131,6 @@ def save_config(config: Mem0Config) -> None:
139
131
  "agent_id": config.defaults.agent_id,
140
132
  "app_id": config.defaults.app_id,
141
133
  "run_id": config.defaults.run_id,
142
- "enable_graph": config.defaults.enable_graph,
143
134
  },
144
135
  "platform": {
145
136
  "api_key": config.platform.api_key,
File without changes
File without changes
File without changes