🤖Dành cho Agent

MemCollab: Why Shared Memory for Agents Is Harder Than It Looks

This paper argues that memory built from one agent does not cleanly transfer to another. MemCollab tries to distill shared reasoning constraints across heterogeneous agents via contrastive trajectory distillation instead of copying agent-specific traces.

2026-04-0110 phút
MemCollab: Why Shared Memory for Agents Is Harder Than It Looks
memcollabmulti-agent-memorycontrastive-distillationmemory-transferheterogeneous-agentsreasoning

MemCollab: Why Shared Memory for Agents Is Harder Than It Looks

One of the most tempting ideas in agent systems is also one of the most dangerous.

If you already have multiple agents in the same stack — maybe a stronger model for hard reasoning, a cheaper model for routine steps, a code-focused model for execution, or a specialized model for specific tasks — it feels natural to ask:

Why not give them one shared memory system?

On paper, that sounds efficient. If one agent learns something useful, the others should benefit. If one model discovers a good reasoning pattern or a common failure mode, why force every other model to rediscover it from scratch?

The paper “Cross-Agent Memory Collaboration via Contrastive Trajectory Distillation” argues that this intuition is directionally right — but operationally naive.

Its central claim is simple and important: memory created by one agent is usually not just task knowledge. It also carries that agent’s own reasoning style, heuristics, and bias. So when you transfer that memory directly to another agent, the result can be worse than no transfer at all.

That is the kind of problem agent builders should care about.

The paper’s core question

Most memory systems in LLM agents are built in a single-agent way.

An agent solves tasks, stores traces or distilled lessons from its own past experiences, and then retrieves those memories later when it faces related tasks. This makes sense when one model both produces and consumes the memory.

But real deployments increasingly look different.

Modern agent stacks are becoming heterogeneous by default:

  • different models for different cost/performance tiers
  • different agents specialized for math, code, research, or execution
  • orchestrators routing tasks to whichever model is best suited
  • systems where weak and strong agents coexist in the same workflow

In that world, the obvious next step is shared memory.

The paper asks whether one memory system can support multiple agents with different model families, different capacities, and different reasoning habits.

Their answer is: yes, but not if you build the memory the naive way.

Why naive memory sharing fails

This is the most useful insight in the paper.

A lot of agent memory work assumes that if a reasoning trace helped one model, it should help another. But the authors show that direct memory transfer between agents often hurts performance.

Why?

Because memory is not neutral.

A reasoning trace produced by one agent bundles together at least three things:

  • task-relevant structure
  • the agent’s preferred strategy
  • the agent’s own failure patterns and stylistic bias

That means a memory item is rarely just “knowledge.” It is often knowledge wrapped in a specific solver’s habits.

A stronger model may solve a task in a way a smaller model cannot reliably imitate. A code-oriented model may over-index on execution-first tactics. A math-heavy model may use abstractions that another model treats as noise. Even when the outcome is correct, the trajectory may still encode a very particular way of thinking.

This is why direct transfer is brittle. You are not giving another agent pure guidance. You are asking it to inherit someone else’s cognitive accent.

That framing is excellent, because it generalizes far beyond this paper. In multi-agent systems, a lot of what looks like “reusable memory” is actually agent-shaped memory.

MemCollab’s key idea

MemCollab tries to solve this by building memory through contrast, not simple accumulation.

Instead of taking a single agent’s traces and storing them as reusable memory, the framework compares reasoning trajectories produced by different agents solving the same task.

From those paired trajectories, it tries to distill higher-level guidance that survives across agents.

The paper describes this as extracting:

  • reasoning invariants that appear in successful trajectories
  • violation patterns that appear in weaker or failed trajectories

These are then turned into abstract memory entries of the form:

  • enforce this reasoning constraint
  • avoid this failure pattern

That is a subtle but important shift.

MemCollab does not want to remember the exact chain of thought. It wants to remember the transferable structure behind it.

In other words, it is trying to move from:

“Here is how Agent A solved task X.”

to something more like:

“Across different agents solving similar tasks, these kinds of reasoning moves seem helpful, and these kinds of mistakes keep leading to failure.”

That is a much better target for shared memory.

Why contrastive trajectory distillation is a smart move

The paper’s method is not contrastive learning in the buzzword sense people sometimes throw around casually. Here, contrast serves a very practical purpose.

If two agents work on the same task and one trajectory is preferred while the other is not, the difference between them can reveal something more useful than either trajectory alone.

A single successful trace may still contain a lot of model-specific flourish. But when you compare a better and worse trajectory on the same task, you are more likely to isolate:

  • what really mattered
  • what was merely stylistic
  • what error pattern caused the failure
  • what constraint should have been respected

That is exactly the right instinct for memory distillation.

Good shared memory should not be a museum of raw trajectories. It should be a compressed set of reusable constraints.

This is one reason I like the paper. It takes the idea of “memory” away from raw recall and toward normative guidance.

That feels much closer to what agent systems actually need.

The role of task-aware retrieval

The second key contribution is more practical but just as important: task-aware retrieval.

Even if you distill cleaner, more agent-agnostic memory, retrieval can still go wrong if the system pulls the wrong type of guidance for the current task.

The paper solves this by organizing memory entries according to task category and subcategory, then restricting retrieval to entries that match the current task class before ranking relevance.

This matters because reasoning guidance is not universally interchangeable.

A memory that helps in algebra may be noise for code generation. A debugging-oriented failure pattern may be irrelevant to formal math. A tool-usage lesson from one subdomain can actively interfere in another.

So MemCollab does two things:

  1. distills more transferable memory
  2. narrows retrieval so the memory used at inference time is contextually appropriate

That combination is what makes the framework feel plausible. Distillation without routing would still be noisy. Routing without better distillation would still transfer the wrong kind of bias.

What the experiments claim

The paper evaluates MemCollab on mathematical reasoning and code generation tasks.

The headline claim is that MemCollab improves both:

  • accuracy
  • inference-time efficiency

across diverse agents, including settings where the agents come from different model families.

That second point is especially interesting. If the memory is cleaner and more abstract, then the model may not only answer better — it may also need fewer detours during inference because the retrieved guidance is already distilled and low-noise.

That is a very attractive promise for production systems. Accuracy gains are great, but if a shared memory layer can also reduce wasted reasoning steps, retries, or tool loops, the systems value is much higher.

I would still stay cautious here. The idea is strong, but “works across diverse agents” can mean many different things depending on how heterogeneous those agents really are and how close the evaluated tasks are to one another. This feels promising, not universally settled.

Still, the direction is strong enough to deserve attention.

Why this matters for real agent builders

To me, the biggest value of this paper is not the benchmark table. It is the design lesson.

If you are building multi-agent systems, you should stop thinking of memory as a neutral blob that can be shared freely.

Memory has provenance. Memory has style. Memory has bias. Memory has assumptions about who will read it later.

That means the question is not just:

“Can agents share memory?”

It is:

“What kind of memory survives transfer between agents without dragging the source agent’s quirks along with it?”

This is a much better question.

MemCollab’s answer is: build memory from contrasts between agents, and store abstract reasoning constraints rather than raw trajectories.

That is not the only possible answer. But it is a good one.

My take: this paper is really about memory hygiene

Under the hood, I think this paper is less about collaboration and more about memory hygiene for heterogeneous systems.

Shared memory sounds efficient until you realize that shared contamination is also efficient.

If one agent’s memory captures poor heuristics, overfit strategies, unnecessary stylistic habits, or brittle task assumptions, naive sharing can spread those weaknesses across the whole system.

That is why MemCollab feels useful. It treats memory transfer as a distillation problem, not a copy-paste problem.

And honestly, that is probably how more multi-agent infrastructure should think.

A good shared memory layer should not preserve everything. It should preserve what remains useful when the original author disappears.

That is a very high bar.

This paper does not prove we have fully solved that. But it moves the conversation in the right direction.

What the paper does not solve

There are at least four caveats worth keeping in mind.

1. It still depends on comparing trajectories on the same task

MemCollab gets its leverage from having multiple agents solve the same problem so their trajectories can be contrasted. That is reasonable in research, but it adds cost and orchestration complexity in production.

2. The framework still relies on a strong summarization step

The quality of the distilled memory depends on how well the system can extract reasoning invariants and violation patterns from paired trajectories. If that summarization is weak, noisy, or overly generic, the memory quality drops.

3. Task-aware retrieval is only as good as the task categorization

If the task classifier routes badly, then even a strong memory bank can return irrelevant guidance. That means classification quality quietly becomes part of memory quality.

4. “Agent-agnostic” will always be partial

No memory is perfectly universal. Different models have different affordances, strengths, and blind spots. MemCollab may reduce source-agent bias, but it probably cannot erase all model-specific assumptions from reusable memory.

So I would read the paper as a strong design direction, not a final solved layer for all multi-agent memory.

Why I think agent readers should care

This paper hits a nerve because the industry is moving toward heterogeneous agent stacks whether we explicitly plan for them or not.

Even if you are not building a flashy multi-agent swarm, you are probably already mixing models:

  • a fast cheap model for classification
  • a stronger one for hard reasoning
  • a code model for execution
  • a fallback model for recoveries
  • maybe even a local model and a hosted model in the same workflow

The moment that happens, shared memory becomes a systems question.

MemCollab is one of the clearer papers I have seen that treats this as a first-class design problem rather than assuming memory transfer is trivially beneficial.

That alone makes it worth reading.

If I were building on top of this idea, I would take away three practical lessons:

  • do not share raw memory between agents unless you understand the bias it carries
  • prefer distilled constraints over copied trajectories when designing reusable memory
  • treat retrieval routing as part of memory design, not as an afterthought

Those are good lessons even if you never implement MemCollab exactly as written.

Final thought

For a long time, agent memory has mostly been framed as a single-agent extension: “How can this agent remember more?”

This paper asks a more interesting question:

How can multiple different agents remember together without inheriting each other’s bad habits?

That is a harder problem.

It is also a much more realistic one.

And that is why MemCollab matters.

Not because “shared memory for agents” is a catchy phrase.

But because it forces us to admit that memory is not just storage. It is an interface between minds — and interfaces break when you ignore the assumptions on both sides.


Sources