# \[Proposal\] Add 'langgraph\_writers' metadata to enable edge visualization and better debugging

**URL:** <https://forum.langchain.com/t/proposal-add-langgraph-writers-metadata-to-enable-edge-visualization-and-better-debugging/2432>\
**Category:** LangGraph\
**Tags:** python-help, feature-request\
**Created:** [December 6, 2025, 11:02am UTC](https://forum.langchain.com/t/proposal-add-langgraph-writers-metadata-to-enable-edge-visualization-and-better-debugging/2432 "2025-12-06T11:02:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HyunMooKim](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/hyunmookim/32/1706_2.png) [@HyunMooKim](https://forum.langchain.com/u/HyunMooKim)\
**Post date:** [December 6, 2025, 11:02am UTC](https://forum.langchain.com/t/proposal-add-langgraph-writers-metadata-to-enable-edge-visualization-and-better-debugging/2432/1 "2025-12-06T11:02:59Z")

</div>

Hi everyone,

I’ve been building a visualizer for LangGraph (using Streamlit) and encountered a limitation when trying to visualize the specific **“path” (or edge)** of execution.

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/8/88708de2d0126fae364320fecd80c975829b96d8.jpeg)

### The Problem

Currently, the `metadata` tells us **which node** is executed , but it lacks context on **what triggered it**.  
In complex graphs with branching logic or multiple upstream nodes, knowing that “Node C is activated” isn’t enough—we need to know whether it was triggered by “Node A” or “Node B”.

Without this, we can visualize active **nodes** , but we cannot highlight **the active edges**.

### The Proposed Solution

I propose adding a metadata field: `langgraph_writers`.  
This tracks which upstream node(s) wrote the channel updates that caused the current node to run. **Proposed Metadata Structure** :

```python
 metadata = {
                "langgraph_step": step,
                "langgraph_node": name,
                "langgraph_triggers": triggers,
                # ... existing fields
                "langgraph_writers": writers # <--- NEW: Tracks the source of the update
            }

```

This indicates **which upstream node(s)** wrote the channel updates that caused the current node to run.

* * *

### Why this matters

1. **Visualizers:** It becomes possible to draw lines/edges showing the flow of data, not just the active states.
2. **Debugging:** In multi-branch workflows, developers can instantly trace _why_ a specific node was activated.

### Proof of Concept

I have already implemented a prototype by adding just ~10-15 lines of code to `algo.py` and `loop.py`. It successfully tracks writers in multi-writer/branching scenarios.

> Metadata: {
> 
> ```auto
> ‘langgraph_step’: 2, 
> ‘langgraph_node’: ‘B2’, 
> ‘langgraph_triggers’: (‘branch:to:B2’,), 
> ‘langgraph_path’: (‘__pregel_pull’, ‘B2’), 
> ‘langgraph_checkpoint_ns’: ‘B2:d5b2d952-c589-2194-14e8-c40d12f6332d’,
> ‘langgraph_writers’: (‘A’,) 
> } 
> # We can see "A" -> "B2" edge is working now ! 
> 
> ```

**Video Demo**

Here is the video showing highlighting the EDGES.

> [streamlit-demo-video-link](https://drive.google.com/file/d/1snBmgTQHbtcYF31_r5P6efgARTC791d4/view?usp=sharing)

I believe this small addition would greatly enhance the developer experience for debugging and tooling. If this sounds good to the team, I am **ready to open a PR** immediately !

---

<div class="post-metadata">

**Author:** ![pawel-twardziak](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/pawel-twardziak/32/960_2.png) [@pawel-twardziak](https://forum.langchain.com/u/pawel-twardziak)\
**Post date:** [December 6, 2025, 2:08pm UTC](https://forum.langchain.com/t/proposal-add-langgraph-writers-metadata-to-enable-edge-visualization-and-better-debugging/2432/2 "2025-12-06T14:08:37Z")

</div>

Hi @HyunMooKim

I can’t play the video demo

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/system/32/1_2.png) [@system](https://forum.langchain.com/u/system)\
**Post date:** [December 7, 2025, 10:12am UTC](https://forum.langchain.com/t/proposal-add-langgraph-writers-metadata-to-enable-edge-visualization-and-better-debugging/2432/4 "2025-12-07T10:12:36Z")

</div>

Unlisted on December 7, 2025, 10:12am UTC



---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/system/32/1_2.png) [@system](https://forum.langchain.com/u/system)\
**Post date:** [December 10, 2025, 2:41pm UTC](https://forum.langchain.com/t/proposal-add-langgraph-writers-metadata-to-enable-edge-visualization-and-better-debugging/2432/5 "2025-12-10T14:41:13Z")

</div>

Listed on December 10, 2025, 2:41pm UTC


