langgraph-prebuilt 0.1.7__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. langgraph_prebuilt-0.2.0/.gitignore +183 -0
  2. langgraph_prebuilt-0.2.0/Makefile +78 -0
  3. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/PKG-INFO +8 -14
  4. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/langgraph/prebuilt/chat_agent_executor.py +229 -299
  5. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/langgraph/prebuilt/interrupt.py +1 -5
  6. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/langgraph/prebuilt/tool_node.py +14 -11
  7. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/langgraph/prebuilt/tool_validator.py +51 -81
  8. langgraph_prebuilt-0.2.0/pyproject.toml +72 -0
  9. langgraph_prebuilt-0.2.0/tests/__init__.py +0 -0
  10. langgraph_prebuilt-0.2.0/tests/__snapshots__/test_react_agent_graph.ambr +173 -0
  11. langgraph_prebuilt-0.2.0/tests/any_str.py +86 -0
  12. langgraph_prebuilt-0.2.0/tests/compose-postgres.yml +17 -0
  13. langgraph_prebuilt-0.2.0/tests/conftest.py +167 -0
  14. langgraph_prebuilt-0.2.0/tests/conftest_checkpointer.py +185 -0
  15. langgraph_prebuilt-0.2.0/tests/conftest_store.py +154 -0
  16. langgraph_prebuilt-0.2.0/tests/memory_assert.py +134 -0
  17. langgraph_prebuilt-0.2.0/tests/messages.py +50 -0
  18. langgraph_prebuilt-0.2.0/tests/model.py +98 -0
  19. langgraph_prebuilt-0.2.0/tests/test_react_agent.py +1542 -0
  20. langgraph_prebuilt-0.2.0/tests/test_react_agent_graph.py +52 -0
  21. langgraph_prebuilt-0.2.0/tests/test_tool_node.py +1140 -0
  22. langgraph_prebuilt-0.2.0/tests/test_validation_node.py +81 -0
  23. langgraph_prebuilt-0.2.0/uv.lock +1408 -0
  24. langgraph_prebuilt-0.1.7/pyproject.toml +0 -62
  25. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/LICENSE +0 -0
  26. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/README.md +0 -0
  27. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/langgraph/prebuilt/__init__.py +0 -0
  28. {langgraph_prebuilt-0.1.7 → langgraph_prebuilt-0.2.0}/langgraph/prebuilt/py.typed +0 -0
@@ -0,0 +1,183 @@
1
+ .vs/
2
+ .vscode/
3
+ .idea/
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ pip-wheel-metadata/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+ docs/docs/_build/
77
+
78
+ # PyBuilder
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+ notebooks/
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
100
+ __pypackages__/
101
+
102
+ # Celery stuff
103
+ celerybeat-schedule
104
+ celerybeat.pid
105
+
106
+ # SageMath parsed files
107
+ *.sage.py
108
+
109
+ # Environments
110
+ .env
111
+ .envrc
112
+ .venv
113
+ .venvs
114
+ env/
115
+ venv/
116
+ ENV/
117
+ env.bak/
118
+ venv.bak/
119
+
120
+ # Spyder project settings
121
+ .spyderproject
122
+ .spyproject
123
+
124
+ # Rope project settings
125
+ .ropeproject
126
+
127
+ # mkdocs documentation
128
+ /site
129
+
130
+ # mypy
131
+ .mypy_cache/
132
+ .dmypy.json
133
+ dmypy.json
134
+
135
+ # Pyre type checker
136
+ .pyre/
137
+
138
+ # macOS display setting files
139
+ .DS_Store
140
+
141
+ # Wandb directory
142
+ wandb/
143
+
144
+ # asdf tool versions
145
+ .tool-versions
146
+ /.ruff_cache/
147
+
148
+ *.pkl
149
+ *.bin
150
+
151
+ # integration test artifacts
152
+ data_map*
153
+ \[('_type', 'fake'), ('stop', None)]
154
+
155
+ # Replit files
156
+ *replit*
157
+
158
+ node_modules
159
+ docs/.yarn/
160
+ docs/node_modules/
161
+ docs/.docusaurus/
162
+ docs/.cache-loader/
163
+ docs/_dist
164
+ docs/api_reference/api_reference.rst
165
+ docs/api_reference/experimental_api_reference.rst
166
+ docs/api_reference/_build
167
+ docs/api_reference/*/
168
+ !docs/api_reference/_static/
169
+ !docs/api_reference/templates/
170
+ !docs/api_reference/themes/
171
+ docs/docs_skeleton/build
172
+ docs/docs_skeleton/node_modules
173
+ docs/docs_skeleton/yarn.lock
174
+
175
+ # Any new jupyter notebooks
176
+ # not intended for the repo
177
+ Untitled*.ipynb
178
+
179
+ Chinook.db
180
+
181
+ .vercel
182
+ .turbo
183
+ .editorconfig
@@ -0,0 +1,78 @@
1
+ .PHONY: all format lint test test_watch integration_tests spell_check spell_fix benchmark profile
2
+
3
+ # Default target executed when no arguments are given to make.
4
+ all: help
5
+
6
+ ######################
7
+ # TESTING AND COVERAGE
8
+ ######################
9
+
10
+ start-postgres:
11
+ docker compose -f tests/compose-postgres.yml up -V --force-recreate --wait --remove-orphans
12
+
13
+ stop-postgres:
14
+ docker compose -f tests/compose-postgres.yml down -v
15
+
16
+ TEST ?= .
17
+
18
+ test:
19
+ make start-postgres && uv run pytest $(TEST); \
20
+ EXIT_CODE=$$?; \
21
+ make stop-postgres; \
22
+ exit $$EXIT_CODE
23
+
24
+ test_watch:
25
+ make start-postgres && uv run ptw $(TEST); \
26
+ EXIT_CODE=$$?; \
27
+ make stop-postgres; \
28
+ exit $$EXIT_CODE
29
+
30
+ ######################
31
+ # LINTING AND FORMATTING
32
+ ######################
33
+
34
+ # Define a variable for Python and notebook files.
35
+ PYTHON_FILES=.
36
+ MYPY_CACHE=.mypy_cache
37
+ lint format: PYTHON_FILES=.
38
+ lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --relative --diff-filter=d main . | grep -E '\.py$$|\.ipynb$$')
39
+ lint_package: PYTHON_FILES=langgraph
40
+ lint_tests: PYTHON_FILES=tests
41
+ lint_tests: MYPY_CACHE=.mypy_cache_test
42
+
43
+ lint lint_diff lint_package lint_tests:
44
+ uv run ruff check .
45
+ [ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff
46
+ [ "$(PYTHON_FILES)" = "" ] || uv run ruff check --select I $(PYTHON_FILES)
47
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE)
48
+ [ "$(PYTHON_FILES)" = "" ] || uv run mypy langgraph --cache-dir $(MYPY_CACHE)
49
+
50
+ format format_diff:
51
+ uv run ruff format $(PYTHON_FILES)
52
+ uv run ruff check --select I --fix $(PYTHON_FILES)
53
+
54
+ spell_check:
55
+ uv run codespell --toml pyproject.toml
56
+
57
+ spell_fix:
58
+ uv run codespell --toml pyproject.toml -w
59
+
60
+
61
+ ######################
62
+ # HELP
63
+ ######################
64
+
65
+ help:
66
+ @echo '===================='
67
+ @echo '-- DOCUMENTATION --'
68
+
69
+ @echo '-- LINTING --'
70
+ @echo 'format - run code formatters'
71
+ @echo 'lint - run linters'
72
+ @echo 'spell_check - run codespell on the project'
73
+ @echo 'spell_fix - run codespell on the project and fix the errors'
74
+ @echo '-- TESTS --'
75
+ @echo 'coverage - run unit tests and generate coverage report'
76
+ @echo 'test - run unit tests'
77
+ @echo 'test TEST_FILE=<test_file> - run all tests in file'
78
+ @echo 'test_watch - run unit tests in watch mode'
@@ -1,19 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: langgraph-prebuilt
3
- Version: 0.1.7
3
+ Version: 0.2.0
4
4
  Summary: Library with high-level APIs for creating and executing LangGraph agents and tools.
5
- Home-page: https://www.github.com/langchain-ai/langgraph
6
- License: MIT
7
- Requires-Python: >=3.9.0,<4.0.0
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Programming Language :: Python :: 3.9
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: langchain-core (>=0.2.43,<0.4.0,!=0.3.0,!=0.3.1,!=0.3.2,!=0.3.3,!=0.3.4,!=0.3.5,!=0.3.6,!=0.3.7,!=0.3.8,!=0.3.9,!=0.3.10,!=0.3.11,!=0.3.12,!=0.3.13,!=0.3.14,!=0.3.15,!=0.3.16,!=0.3.17,!=0.3.18,!=0.3.19,!=0.3.20,!=0.3.21,!=0.3.22)
15
- Requires-Dist: langgraph-checkpoint (>=2.0.10,<3.0.0)
16
5
  Project-URL: Repository, https://www.github.com/langchain-ai/langgraph
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.9
9
+ Requires-Dist: langchain-core>=0.3.22
10
+ Requires-Dist: langgraph-checkpoint>=2.0.10
17
11
  Description-Content-Type: text/markdown
18
12
 
19
13
  # LangGraph Prebuilt
@@ -132,4 +126,4 @@ def my_graph_function():
132
126
  if response['type'] == "response":
133
127
  # Do something with the response
134
128
  ...
135
- ```
129
+ ```