mem0ai/mem0 · error · ValueError
Error: {error_message}
Error message
Error: {error_message} What it means
Error "Error: {error_message}" thrown in mem0ai/mem0.
Source
Thrown at mem0/client/main.py:181
params = self._prepare_params()
response = self.client.get("/v1/ping/", params=params)
response.raise_for_status()
data = response.json()
if data.get("org_id") and data.get("project_id"):
self.org_id = data.get("org_id")
self.project_id = data.get("project_id")
return data.get("user_email")
except httpx.HTTPStatusError as e:
try:
error_data = e.response.json()
error_message = error_data.get("detail", str(e))
except Exception:
error_message = str(e)
raise ValueError(f"Error: {error_message}")
@api_error_handler
def add(self, messages, options: Optional[AddMemoryOptions] = None, **kwargs) -> Dict[str, Any]:
"""Add a new memory.
Args:
messages: A list of message dictionaries, a single message dictionary,
or a string. If a string is provided, it will be converted to
a user message.
options: Typed options for the add operation (AddMemoryOptions).
**kwargs: Additional parameters such as user_id, agent_id, app_id,
metadata, filters.
Returns:
A dictionary containing the API response in v1.1 format.
Raises:
ValidationError: If the input data is invalid.View on GitHub (pinned to 001c235229)
Solutions
- Read the error_message returned by the API and fix the reported problem.
- Check network connectivity and API key validity if the error is authentication-related.
When it happens
Trigger: Thrown at mem0/client/main.py:181 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/fa4ae5a799241016.
Report an issue: GitHub.