crewAIInc / crewAIInc/crewAI

[FEATURE] Memory observability & debugging toolkit for multi-agent Crews

Open
#7,352 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

vendor-pitch
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:

  1. Log every memory read/write with agent name, timestamp, memory type, and content preview
  2. Emit memory events as structured logs or callbacks (e.g., on_memory_read, on_memory_write)
  3. Surface memory context in agent traces alongside tool calls and LLM invocations
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.