[FEATURE] Memory observability & debugging toolkit for multi-agent Crews
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 58.8k
- Forks
- 8.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 109
Description
Problem
When running multi-agent Crews with memory enabled (short-term, long-term, entity, and user memory), developers have almost no visibility into:
- What each agent is reading from and writing to memory
- When memory entries get stale, overwritten, or poisoned
- Why an agent made a particular decision based on memory context
- How memory from one agent influences downstream agents in the crew
This makes debugging multi-agent systems extremely difficult. The current verbose=True flag shows agent thoughts but doesn't surface memory reads/writes. Developers are left to guess whether memory is helping or hurting their crew's performance.
Why This Matters Now
Memory handling is one of the hottest topics in the AI agent space in 2025. Recent surveys (e.g., Memory in the Age of AI Agents, arXiv 2512.13564) show that traditional short/long-term taxonomies are insufficient, and frameworks need better introspection. Other frameworks are starting to address this:
- LangGraph provides checkpoint state inspection and time-travel debugging
- Microsoft Agent Framework has built-in OpenTelemetry tracing with memory spans
- CrewAI currently has no memory introspection story
Proposed Solution
Add a memory observability layer to CrewAI that can be enabled for debugging:
crew = Crew(
agents=[researcher, writer],
tasks=[...],
memory=True,
memory_observability=True, # NEW
)
When enabled, this would:
- Log every memory read/write with agent name, timestamp, memory type, and content preview
- Emit memory events as structured logs or callbacks (e.g.,
on_memory_read,on_memory_write) - Surface memory context in agent traces alongside tool calls and LLM invocations
- Provide a
crew.memory_snapshot()method to inspect current memory state at any point
API Sketch
# Option A: Callback-based
def on_memory_event(event: MemoryEvent):
print(f"[{event.agent}] {event.operation} → {event.memory_type}: {event.preview}")
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
memory_callbacks=[on_memory_event],
)
# Option B: Snapshot introspection
crew.kickoff()
print(crew.memory_snapshot()) # Returns structured view of all memory stores
Scope
This could start as a documentation-first approach (logging patterns + example code) and evolve into a first-class API. Even a documented recipe for hooking into the existing memory backends would be a huge win for the community.
Related Issues
- #6043 — Memory write guards (security-focused; this complements it with debugging/observability)
- #6180 — Production documentation patterns (this fits under that umbrella)
- #5817 — Per-step agent execution tracing (memory tracing is a natural extension)
Willingness to Contribute
I'd be happy to help draft documentation or contribute to a prototype if there's interest from maintainers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reviewing the existing memory backends and the per-step execution tracing referenced in #5817, then clarify whether the first deliverable is documentation or a first-class API. Done should mean memory reads and writes are inspectable through the chosen logging, callback, tracing, or snapshot approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100