[PR #330] [MERGED] Add managed values and IsLastStep #1390

Closed
opened 2026-02-20 17:44:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraph/pull/330
Author: @nfcampos
Created: 4/19/2024
Status: Merged
Merged: 5/10/2024
Merged by: @andrewnguonly

Base: mainHead: nc/19apr/managed-values-is-last-step


📝 Commits (10+)

📊 Changes

9 files changed (+369 additions, -65 deletions)

View changed files

📝 langgraph/graph/state.py (+36 -10)
langgraph/managed/__init__.py (+3 -0)
langgraph/managed/base.py (+105 -0)
langgraph/managed/is_last_step.py (+12 -0)
📝 langgraph/prebuilt/chat_agent_executor.py (+27 -1)
📝 langgraph/pregel/__init__.py (+135 -18)
📝 langgraph/pregel/read.py (+3 -2)
📝 tests/__snapshots__/test_pregel.ambr (+2 -2)
📝 tests/test_pregel.py (+46 -32)

📄 Description

  • managed values are read-only state keys whose values are managed by langgraph
  • this PR implements one: IsLastValue, a boolean which is True in the last iteration, eg to allow you to return a nice "ran out of iterations" message to user

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraph/pull/330 **Author:** [@nfcampos](https://github.com/nfcampos) **Created:** 4/19/2024 **Status:** ✅ Merged **Merged:** 5/10/2024 **Merged by:** [@andrewnguonly](https://github.com/andrewnguonly) **Base:** `main` ← **Head:** `nc/19apr/managed-values-is-last-step` --- ### 📝 Commits (10+) - [`7e2a0ee`](https://github.com/langchain-ai/langgraph/commit/7e2a0ee43b9d777a8a7e04fe0b56da1f1e5180ba) Add managed values and IsLastStep - [`1e7dd36`](https://github.com/langchain-ai/langgraph/commit/1e7dd3676a932c71406c4477f7764433dbe226df) Fix - [`d74531f`](https://github.com/langchain-ai/langgraph/commit/d74531f6a2795b7606bf757bb28be478bdaf0d8e) Fix some issues - [`8f4f9ca`](https://github.com/langchain-ai/langgraph/commit/8f4f9cae930111c7320960e74fe76cba41c6bb64) py39 - [`1121ab9`](https://github.com/langchain-ai/langgraph/commit/1121ab9e4d6180dfff077132e01b7da3093664cd) Break ref - [`0f949cb`](https://github.com/langchain-ai/langgraph/commit/0f949cbb81536bc435bceab622eaf208c6fd8562) Fix types - [`01f58f9`](https://github.com/langchain-ai/langgraph/commit/01f58f9405c1dea450109509ae9ca20d4e19b583) Fix - [`64401d8`](https://github.com/langchain-ai/langgraph/commit/64401d89fd512858870ff171b4c278a247b1ef32) Fix - [`224ebd2`](https://github.com/langchain-ai/langgraph/commit/224ebd2330e156c789cb7d9153f217e14b0ccfe0) Update state.py - [`4789c29`](https://github.com/langchain-ai/langgraph/commit/4789c29136ea84d028d9d792a36dd1f5583a27ed) Merge main branch, resolves conflicts. ### 📊 Changes **9 files changed** (+369 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/graph/state.py` (+36 -10) ➕ `langgraph/managed/__init__.py` (+3 -0) ➕ `langgraph/managed/base.py` (+105 -0) ➕ `langgraph/managed/is_last_step.py` (+12 -0) 📝 `langgraph/prebuilt/chat_agent_executor.py` (+27 -1) 📝 `langgraph/pregel/__init__.py` (+135 -18) 📝 `langgraph/pregel/read.py` (+3 -2) 📝 `tests/__snapshots__/test_pregel.ambr` (+2 -2) 📝 `tests/test_pregel.py` (+46 -32) </details> ### 📄 Description - managed values are read-only state keys whose values are managed by langgraph - this PR implements one: IsLastValue, a boolean which is True in the last iteration, eg to allow you to return a nice "ran out of iterations" message to user --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-20 17:44:36 -05:00
yindo closed this issue 2026-02-20 17:44:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1390