Exploring Provenance and Dependency-Aware Memory for Long-Horizon Agents

Exploring Provenance and Dependency-Aware Memory for Long-Horizon Agents

Hi LangChain team and community,

I’ve been exploring recent research on long-horizon agents, particularly the ReTree paper:

I also explored the current LangChain/LangGraph codebase, including agent middleware, state management, checkpointing, Store, and context management.

The paper proposes a tree-structured evidence memory where agent state can retain provenance and dependencies between pieces of evidence. When an earlier piece of evidence is revised, dependent state can be identified and invalidated instead of continuing to rely on stale information.

This made me wonder whether there is a useful abstraction around provenance and dependency-aware state/memory that could be valuable for long-running agents in the LangGraph ecosystem.

What I found

LangGraph already provides several related primitives:

  • Checkpointing and state history

  • Time travel

  • Store and semantic search

  • Agent middleware

  • Summarization/context management

  • Message citations

However, from my initial exploration, these mechanisms don’t appear to explicitly model relationships such as:

Evidence A
    ↓
Conclusion B
    ↓
Conclusion C

where discovering that Evidence A is incorrect could identify B and C as dependent state.

For example, imagine a research agent retrieves:

“Company X was founded in 2015.”

Later, another source shows that the company was actually founded in 2010.

If the agent has already derived several conclusions from the 2015 date, it would be useful to know which parts of its state depend on that evidence and potentially reconsider them.

This seems particularly relevant for long-running research agents, where simply accumulating or summarizing the trajectory can lead to context growth, loss of provenance, or stale conclusions.

I’m not proposing a specific implementation yet

I’m intentionally not proposing a new Memory or Store API at this point.

I’d first like to understand from the LangGraph/LangChain maintainers:

  1. Is provenance/dependency-aware state already being addressed somewhere that I may have missed?

  2. Is this considered a useful problem within the scope of LangGraph?

  3. If so, where would this concept fit best in the current architecture — state, Store, middleware, checkpointing, Deep Agents, or somewhere else?

  4. Are there existing design constraints or ongoing work that I should take into account?

  5. Would a small proof-of-concept based on these concepts be a useful contribution?

If there is interest, I’d be happy to prototype a minimal implementation and benchmark it against a standard long-horizon agent.

The goal would not be to directly port the paper, but to understand whether some of its ideas — particularly provenance, dependency tracking, bounded context, and dependency-aware revision — could provide a useful abstraction for the LangGraph ecosystem.

I’d appreciate any feedback on whether this direction makes sense before I start implementing anything.