mem0ai/mem0 · error · ImportError

The 'together' library is required. Please install it using

Error message

The 'together' library is required. Please install it using 'pip install together'.

What it means

Error "The 'together' library is required. Please install it using 'pip install together'." thrown in mem0ai/mem0.

Source

Thrown at mem0/llms/together.py:8

import json
import os
from typing import Dict, List, Optional

try:
    from together import Together
except ImportError:
    raise ImportError("The 'together' library is required. Please install it using 'pip install together'.")

from mem0.configs.llms.base import BaseLlmConfig
from mem0.llms.base import LLMBase
from mem0.memory.utils import extract_json


class TogetherLLM(LLMBase):
    def __init__(self, config: Optional[BaseLlmConfig] = None):
        super().__init__(config)

        if not self.config.model:
            self.config.model = "MiniMaxAI/MiniMax-M3"

        api_key = self.config.api_key or os.getenv("TOGETHER_API_KEY")
        self.client = Together(api_key=api_key)

    def _parse_response(self, response, tools):
        """

View on GitHub (pinned to 001c235229)

Solutions

  1. Install the dependency: pip install together.

When it happens

Trigger: Thrown at mem0/llms/together.py:8 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/30dfc1f6176a7c67. Report an issue: GitHub.