CrewAI agents can keep three kinds of memory: short-term memory for the current task, long-term memory for past tasks, and entity memory for the people and things involved. Together they let an agent build on earlier work instead of starting blank each run.
Before you start
You need a CrewAI project with at least one agent and a job that spans more than one run, for example a weekly briefing. Decide what the agent is allowed to remember: names and preferences are fine, passwords and secrets are not.
Turn on the memory types for the agent
Enable short-term, long-term and entity memory on the agent in the crew configuration. Short-term memory holds the current run, long-term memory carries lessons from past runs, and entity memory tracks the people and organisations the crew works with.
Test recall with a second run that needs the first
Run the crew once with a detail to remember, for example a client preference. Run it again with a question that only makes sense if that detail is remembered. If the second run asks for the detail again, check which memory type is actually enabled.
Worked example: Two runs for a fictional client briefing crew
Maple Research is a fictional research desk. Its crew writes a weekly briefing for one client. The table shows what each memory type holds.
| Memory type | What it holds | Example |
|---|---|---|
| Short-term | The current run | This week topic list |
| Long-term | Past runs | Last week briefing style |
| Entity | People and organisations | Client prefers short briefings |
Expected result (UNTESTED): the second run produces a short briefing in the style of the first, without asking for the preference again. We checked the CrewAI documentation summary, which lists short-term, long-term and entity memory, but we did not run the crew on this machine.
Limits
Memory is only as good as what was stored: a wrong fact remembered is a wrong fact repeated. Review stored memories after the first week and delete anything wrong. Do not store secrets or personal data the crew does not need.
