mem0ai/mem0 · error · ValueError

At least one of text, metadata, timestamp, or expiration_dat

Error message

At least one of text, metadata, timestamp, or expiration_date must be provided for update.

What it means

Error "At least one of text, metadata, timestamp, or expiration_date must be provided for update." thrown in mem0ai/mem0.

Source

Thrown at mem0/client/main.py:374

            **kwargs: Alternatively pass text, metadata, timestamp, or
                      expiration_date as keyword args.

        Returns:
            Dict[str, Any]: The response from the server.

        Raises:
            ValueError: If none of text, metadata, timestamp, or expiration_date are provided.

        Example:
            >>> client.update("mem_123", UpdateMemoryOptions(text="Updated text"))
            >>> client.update("mem_123", text="Updated text")
            >>> client.update("mem_123", expiration_date=None)
        """
        payload = {**(options.model_dump(exclude_unset=True) if options else {}), **kwargs}
        payload = {k: v for k, v in payload.items() if v is not None or k == "expiration_date"}

        if not payload:
            raise ValueError("At least one of text, metadata, timestamp, or expiration_date must be provided for update.")

        capture_client_event("client.update", self, {"memory_id": memory_id, "sync_type": "sync"})
        params = self._prepare_params()
        response = self.client.put(f"/v1/memories/{_encode_path_segment(memory_id)}/", json=payload, params=params)
        response.raise_for_status()
        return response.json()

    @api_error_handler
    def delete(self, memory_id: str, delete_linked: bool = False) -> Dict[str, Any]:
        """Delete a specific memory by ID.

        Args:
            memory_id: The ID of the memory to delete.
            delete_linked: When True, also delete the older memories this one
                superseded (the v3 ``linked_memory_ids`` chain), transitively.
                This is the delete-side counterpart of ``latest_only`` — it
                stops a superseded memory from resurfacing after you delete the
                current one. Defaults to False (only the given memory is deleted).

View on GitHub (pinned to 001c235229)

Solutions

  1. Provide at least one of text, metadata, timestamp, or expiration_date in the update() call.

When it happens

Trigger: Thrown at mem0/client/main.py:374 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15). Data as JSON: /api/errors/15e584e2af7d16bb. Report an issue: GitHub.