crewAIInc/crewAI · error · SystemExit

The 'reset-memories' command requires the full crewai packag

Error message

The 'reset-memories' command requires the full crewai package.
Install it with: pip install crewai

What it means

Raised by `crewai reset-memories` when the optional import `from crewai.utilities.reset_memories import reset_memories_command` fails. The CLI package (crewai-cli) is deliberately installable without the heavy `crewai` core, but resetting memories requires the core package's storage layer. The handler tells the user to install crewai and exits 1 via `raise SystemExit(1) from None` (the ImportError itself is suppressed as uninteresting).

Source

Thrown at lib/cli/src/crewai_cli/reset_memories_command.py:29

def reset_memories_command(
    memory: bool,
    knowledge: bool,
    agent_knowledge: bool,
    kickoff_outputs: bool,
    all: bool,
) -> None:
    try:
        from crewai.utilities.reset_memories import (
            reset_memories_command as _reset,
        )
    except ImportError:
        click.secho(
            "The 'reset-memories' command requires the full crewai package.\n"
            "Install it with: pip install crewai",
            fg="red",
        )
        raise SystemExit(1) from None

    _reset(memory, knowledge, agent_knowledge, kickoff_outputs, all)

View on GitHub (pinned to 754d7323be)

Solutions

  1. Install the full package in the active environment: `pip install crewai` (or `uv add crewai` / `uv sync` in the project).
  2. Confirm you are in the correct virtualenv: `pip show crewai` must report a version.
  3. Reinstall cleanly if it still fails: `pip install --force-reinstall crewai`.

Example fix

# before
$ crewai reset-memories --all
# The 'reset-memories' command requires the full crewai package.

# after
$ pip install crewai
$ crewai reset-memories --all
Defensive patterns

Strategy: fallback

Validate before calling

import importlib.util

if importlib.util.find_spec("crewai.utilities.reset_memories") is None:
    raise SystemExit("full crewai package missing; run: pip install crewai")

from crewai.utilities.reset_memories import reset_memories_command  # noqa

Prevention

When it happens

Trigger: Running `crewai reset-memories ...` in an environment where only `crewai-cli` (or `crewai[cli]` without core) is installed; a venv where crewai was uninstalled but the CLI shim remains; dependency resolver downgrades that removed crewai.

Common situations: Lightweight CI containers that install just the CLI for scaffolding; `pipx install crewai` getting only the CLI distribution; a broken venv after partial upgrades.

Related errors


AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15). Data as JSON: /api/errors/1c27711cd06bdcf5. Report an issue: GitHub.