Support uv with `langgraph dev`
Checked other resources
- [x] This is a bug, not a usage question. For questions, please use GitHub Discussions.
- [x] I added a clear and detailed title that summarizes the issue.
- [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- [x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.
Example Code
langgraph.json:
{
"dependencies": [
"langchain-text-splitters",
"langchain-community",
"langgraph",
"python-dotenv",
"beautifulsoup4",
"langchain-neo4j",
"langchain-ollama",
"langchain-postgres",
"langchain-google-genai",
"langchain-core",
"./src/rag_agent"
],
"graphs": {
"rag_agent": "./src/rag_agent/RAGAgent.py:make_graph"
},
"env": "./.env",
"python_version": "3.13",
"pip_config_file": "Pipfile"
}
from .Tools import ground_search, store_memory, upsert_memory
Error Message and Stack Trace (if applicable)
INFO:langgraph_api.cli:
Welcome to
╦ ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬
║ ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤
╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴ ┴ ┴
- 🚀 API: http://127.0.0.1:2024
- 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
- 📚 API Docs: http://127.0.0.1:2024/docs
This in-memory server is designed for development and testing.
For production use, please use LangGraph Cloud.
2025-06-11T04:47:42.401546Z [info ] Using langgraph_runtime_inmem [langgraph_runtime] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:42.411465Z [info ] Using auth of type=noop [langgraph_api.auth.middleware] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:42.414649Z [info ] Starting In-Memory runtime with langgraph-api=0.2.39 [langgraph_runtime_inmem.lifespan] api_variant=local_dev thread_name=asyncio_0 version=0.2.39
2025-06-11T04:47:42.480973Z [info ] Starting metadata loop [langgraph_api.metadata] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:42.578797Z [info ] Starting 1 background workers [langgraph_runtime_inmem.queue] api_variant=local_dev thread_name=asyncio_1
2025-06-11T04:47:42.893415Z [info ] Starting thread TTL sweeper with interval 5 minutes [langgraph_api.thread_ttl] api_variant=local_dev interval_minutes=5 strategy=delete thread_name=asyncio_1
2025-06-11T04:47:42.893939Z [info ] Worker stats [langgraph_runtime_inmem.queue] active=0 api_variant=local_dev available=1 max=1 thread_name=asyncio_3
2025-06-11T04:47:43.196896Z [info ] HTTP Request: POST https://api.smith.langchain.com/v1/metadata/submit "HTTP/1.1 204 No Content" [httpx] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:43.443095Z [info ] Queue stats [langgraph_runtime_inmem.queue] api_variant=local_dev max_age_secs=None med_age_secs=None n_pending=0 n_running=0 thread_name=asyncio_1
2025-06-11T04:47:43.444648Z [info ] Sweeped runs [langgraph_runtime_inmem.queue] api_variant=local_dev run_ids=[] thread_name=MainThread
2025-06-11T04:47:44.138600Z [info ] Shutting down background workers [langgraph_runtime_inmem.queue] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:44.138819Z [info ] Shutting down remote graphs [langgraph_api.graph] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:44.170211Z [error ] Traceback (most recent call last):
File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/starlette/routing.py", line 692, in lifespan
async with self.lifespan_context(app) as maybe_state:
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langgraph_runtime_inmem/lifespan.py", line 63, in lifespan
await graph.collect_graphs_from_env(True)
File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langgraph_api/graph.py", line 376, in collect_graphs_from_env
graph = await run_in_executor(None, _graph_from_spec, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langchain_core/runnables/config.py", line 616, in run_in_executor
return await asyncio.get_running_loop().run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langchain_core/runnables/config.py", line 607, in wrapper
return func(*args, **kwargs)
File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langgraph_api/graph.py", line 416, in _graph_from_spec
modspec.loader.exec_module(module)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 44, in <module>
from .Tools import ground_search, store_memory, upsert_memory
ImportError: attempted relative import with no known parent package
Could not import python module for graph:
GraphSpec(id='rag_agent', path='./src/rag_agent/RAGAgent.py', module=None, variable='make_graph', config={}, description=None)
This error likely means you haven't installed your project and its dependencies yet. Before running the server, install your project:
If you are using requirements.txt:
python -m pip install -r requirements.txt
If you are using pyproject.toml or setuptools:
python -m pip install -e .
Make sure to run this command from your project's root directory (where your setup.py or pyproject.toml is located)
[uvicorn.error] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:44.170406Z [error ] Application startup failed. Exiting. [uvicorn.error] api_variant=local_dev thread_name=MainThread
2025-06-11T04:47:44.225604Z [info ] 21 changes detected [watchfiles.main] api_variant=local_dev thread_name=MainThread
Description
I have the following project structure:
|- src/
|- rag_agent/
|- __init__.py
|- RAGAgent.py
|- __init__.py
|- .env
|- langgraph.json
Run pipenv run langgraph dev in the root of the project hits the ImportError: attempted relative import with no known parent package error. The application starts without this error when run as a web application built on Quart and Hypercorn.
System Info
System Information
------------------
> OS: Linux
> OS Version: #23-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 23:02:20 UTC 2025
> Python Version: 3.13.3 (main, Jun 16 2025, 18:15:32) [GCC 14.2.0]
Package Information
-------------------
> langchain_core: 0.3.67
> langchain: 0.3.26
> langchain_community: 0.3.27
> langsmith: 0.4.4
> langchain_google_genai: 2.1.6
> langchain_neo4j: 0.4.0
> langchain_ollama: 0.3.3
> langchain_postgres: 0.0.15
> langchain_text_splitters: 0.3.8
> langgraph_api: 0.2.39
> langgraph_cli: 0.2.10
> langgraph_license: Installed. No version info available.
> langgraph_runtime: Installed. No version info available.
> langgraph_runtime_inmem: 0.2.0
> langgraph_sdk: 0.1.72
Optional packages not installed
-------------------------------
> langserve
Other Dependencies
------------------
> aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
> async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
> asyncpg>=0.30.0: Installed. No version info available.
> blockbuster<2.0.0,>=1.5.24: Installed. No version info available.
> click: 8.2.1
> cloudpickle>=3.0.0: Installed. No version info available.
> cryptography<45.0,>=42.0.0: Installed. No version info available.
> dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
> filetype: 1.2.0
> google-ai-generativelanguage: 0.6.18
> httpx: 0.28.1
> httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
> httpx>=0.25.0: Installed. No version info available.
> httpx>=0.25.2: Installed. No version info available.
> jsonpatch<2.0,>=1.33: Installed. No version info available.
> jsonschema-rs<0.30,>=0.20.0: Installed. No version info available.
> langchain-anthropic;: Installed. No version info available.
> langchain-aws;: Installed. No version info available.
> langchain-azure-ai;: Installed. No version info available.
> langchain-cohere;: Installed. No version info available.
> langchain-community;: Installed. No version info available.
> langchain-core<0.4.0,>=0.2.13: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.51: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.60: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.66: Installed. No version info available.
> langchain-core>=0.2.38: Installed. No version info available.
> langchain-deepseek;: Installed. No version info available.
> langchain-fireworks;: Installed. No version info available.
> langchain-google-genai;: Installed. No version info available.
> langchain-google-vertexai;: Installed. No version info available.
> langchain-groq;: Installed. No version info available.
> langchain-huggingface;: Installed. No version info available.
> langchain-mistralai;: Installed. No version info available.
> langchain-ollama;: Installed. No version info available.
> langchain-openai;: Installed. No version info available.
> langchain-perplexity;: Installed. No version info available.
> langchain-text-splitters<1.0.0,>=0.3.8: Installed. No version info available.
> langchain-together;: Installed. No version info available.
> langchain-xai;: Installed. No version info available.
> langchain<1.0.0,>=0.3.26: Installed. No version info available.
> langgraph-checkpoint>=2.0.23: Installed. No version info available.
> langgraph-checkpoint>=2.0.25: Installed. No version info available.
> langgraph-runtime-inmem<0.3,>=0.2.0: Installed. No version info available.
> langgraph-sdk>=0.1.66: Installed. No version info available.
> langgraph>=0.2: Installed. No version info available.
> langgraph>=0.3.27: Installed. No version info available.
> langsmith-pyo3: Installed. No version info available.
> langsmith>=0.1.112: Installed. No version info available.
> langsmith>=0.1.125: Installed. No version info available.
> langsmith>=0.1.17: Installed. No version info available.
> langsmith>=0.3.45: Installed. No version info available.
> neo4j: 5.28.1
> neo4j-graphrag: 1.6.1
> numpy<3,>=1.21: Installed. No version info available.
> numpy>=1.26.2;: Installed. No version info available.
> numpy>=2.1.0;: Installed. No version info available.
> ollama<1.0.0,>=0.4.8: Installed. No version info available.
> openai-agents: Installed. No version info available.
> opentelemetry-api: 1.34.1
> opentelemetry-exporter-otlp-proto-http: Installed. No version info available.
> opentelemetry-sdk: 1.34.1
> orjson: 3.10.18
> orjson>=3.10.1: Installed. No version info available.
> orjson>=3.9.7: Installed. No version info available.
> packaging: 24.2
> packaging<25,>=23.2: Installed. No version info available.
> pgvector<0.4,>=0.2.5: Installed. No version info available.
> psycopg-pool<4,>=3.2.1: Installed. No version info available.
> psycopg<4,>=3: Installed. No version info available.
> pydantic: 2.11.7
> pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
> pydantic<3.0.0,>=2.7.4: Installed. No version info available.
> pydantic>=2.7.4: Installed. No version info available.
> pyjwt>=2.9.0: Installed. No version info available.
> pytest: 8.4.0
> python-dotenv: 1.1.1
> PyYAML>=5.3: Installed. No version info available.
> requests: 2.32.4
> requests-toolbelt: 1.0.0
> requests<3,>=2: Installed. No version info available.
> rich: Installed. No version info available.
> SQLAlchemy<3,>=1.4: Installed. No version info available.
> sqlalchemy<3,>=2: Installed. No version info available.
> sse-starlette<2.2.0,>=2.1.0: Installed. No version info available.
> sse-starlette>=2: Installed. No version info available.
> starlette>=0.37: Installed. No version info available.
> starlette>=0.38.6: Installed. No version info available.
> structlog<26,>=24.1.0: Installed. No version info available.
> structlog>23: Installed. No version info available.
> tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
> tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
> tenacity>=8.0.0: Installed. No version info available.
> truststore>=0.1: Installed. No version info available.
> typing-extensions>=4.7: Installed. No version info available.
> uvicorn>=0.26.0: Installed. No version info available.
> watchfiles>=0.13: Installed. No version info available.
> zstandard: 0.23.0
@khteh take a look at the error trace. It has instructions to help you resolve your problem. Use pip instead of pipenv
File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 44, in <module>
from .Tools import ground_search, store_memory, upsert_memory
ImportError: attempted relative import with no known parent package
Could not import python module for graph:
GraphSpec(id='rag_agent', path='./src/rag_agent/RAGAgent.py', module=None, variable='make_graph', config={}, description=None)
This error likely means you haven't installed your project and its dependencies yet. Before running the server, install your project:
If you are using requirements.txt:
python -m pip install -r requirements.txt
If you are using pyproject.toml or setuptools:
python -m pip install -e .
Also consider starting with an existing template application and modifying a working application:
https://langchain-ai.github.io/langgraph/concepts/template_applications/
Doesn't pip install packages to global location!?! This is not what I want and pipenv works perfectly with my ASGI/WSGI web app with langchain. Why doesn't it work with langgraph?
There are a lot of package managers in the ecosystem (pip, pipenv, poetry, uv).
We support pip b/c it's officially bundled with Python and is the most widely used package manager in the ecosystem.
Realistically, we'll likely end up providing support for uv at some point as its quickly becoming the industry standard.
it's common to set up a virtualenv and use the pip for that virtualenv
cc @jdrogers940
We likely need to review the documentation to see whether this is clearly explained and we could consider adding support for uv lock files if it's requested enough by users.
Checked other resources
- [x] This is a bug, not a usage question. For questions, please use GitHub Discussions.[x] I added a clear and detailed title that summarizes the issue.[x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).[x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.
Example Code
langgraph.json:{ "dependencies": [ "langchain-text-splitters", "langchain-community", "langgraph", "python-dotenv", "beautifulsoup4", "langchain-neo4j", "langchain-ollama", "langchain-postgres", "langchain-google-genai", "langchain-core", "./src/rag_agent" ], "graphs": { "rag_agent": "./src/rag_agent/RAGAgent.py:make_graph" }, "env": "./.env", "python_version": "3.13", "pip_config_file": "Pipfile" }
from .Tools import ground_search, store_memory, upsert_memoryError Message and Stack Trace (if applicable)
INFO:langgraph_api.cli:
Welcome to╦ ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬ ║ ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤ ╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴ ┴ ┴
- 🚀 API: http://127.0.0.1:2024
- 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
- 📚 API Docs: http://127.0.0.1:2024/docs
This in-memory server is designed for development and testing. For production use, please use LangGraph Cloud.
2025-06-11T04:47:42.401546Z [info ] Using langgraph_runtime_inmem [langgraph_runtime] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:42.411465Z [info ] Using auth of type=noop [langgraph_api.auth.middleware] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:42.414649Z [info ] Starting In-Memory runtime with langgraph-api=0.2.39 [langgraph_runtime_inmem.lifespan] api_variant=local_dev thread_name=asyncio_0 version=0.2.39 2025-06-11T04:47:42.480973Z [info ] Starting metadata loop [langgraph_api.metadata] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:42.578797Z [info ] Starting 1 background workers [langgraph_runtime_inmem.queue] api_variant=local_dev thread_name=asyncio_1 2025-06-11T04:47:42.893415Z [info ] Starting thread TTL sweeper with interval 5 minutes [langgraph_api.thread_ttl] api_variant=local_dev interval_minutes=5 strategy=delete thread_name=asyncio_1 2025-06-11T04:47:42.893939Z [info ] Worker stats [langgraph_runtime_inmem.queue] active=0 api_variant=local_dev available=1 max=1 thread_name=asyncio_3 2025-06-11T04:47:43.196896Z [info ] HTTP Request: POST https://api.smith.langchain.com/v1/metadata/submit "HTTP/1.1 204 No Content" [httpx] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:43.443095Z [info ] Queue stats [langgraph_runtime_inmem.queue] api_variant=local_dev max_age_secs=None med_age_secs=None n_pending=0 n_running=0 thread_name=asyncio_1 2025-06-11T04:47:43.444648Z [info ] Sweeped runs [langgraph_runtime_inmem.queue] api_variant=local_dev run_ids=[] thread_name=MainThread 2025-06-11T04:47:44.138600Z [info ] Shutting down background workers [langgraph_runtime_inmem.queue] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:44.138819Z [info ] Shutting down remote graphs [langgraph_api.graph] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:44.170211Z [error ] Traceback (most recent call last): File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/starlette/routing.py", line 692, in lifespan async with self.lifespan_context(app) as maybe_state: ~~~~~~~~~~~~~~~~~~~~~^^^^^ File "/usr/lib/python3.13/contextlib.py", line 214, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langgraph_runtime_inmem/lifespan.py", line 63, in lifespan await graph.collect_graphs_from_env(True) File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langgraph_api/graph.py", line 376, in collect_graphs_from_env graph = await run_in_executor(None, _graph_from_spec, spec) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langchain_core/runnables/config.py", line 616, in run_in_executor return await asyncio.get_running_loop().run_in_executor( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... ) ^ File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langchain_core/runnables/config.py", line 607, in wrapper return func(*args, **kwargs) File "/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/lib/python3.13/site-packages/langgraph_api/graph.py", line 416, in _graph_from_spec modspec.loader.exec_module(module) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ File "
", line 1026, in exec_module File " ", line 488, in _call_with_frames_removed File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 44, in from .Tools import ground_search, store_memory, upsert_memory ImportError: attempted relative import with no known parent package Could not import python module for graph: GraphSpec(id='rag_agent', path='./src/rag_agent/RAGAgent.py', module=None, variable='make_graph', config={}, description=None) This error likely means you haven't installed your project and its dependencies yet. Before running the server, install your project: If you are using requirements.txt: python -m pip install -r requirements.txt
If you are using pyproject.toml or setuptools: python -m pip install -e .
Make sure to run this command from your project's root directory (where your setup.py or pyproject.toml is located) [uvicorn.error] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:44.170406Z [error ] Application startup failed. Exiting. [uvicorn.error] api_variant=local_dev thread_name=MainThread 2025-06-11T04:47:44.225604Z [info ] 21 changes detected [watchfiles.main] api_variant=local_dev thread_name=MainThread
Description
I have the following project structure:
|- src/ |- rag_agent/ |- __init__.py |- RAGAgent.py |- __init__.py |- .env |- langgraph.jsonRun
pipenv run langgraph devin the root of the project hits theImportError: attempted relative import with no known parent packageerror. The application starts without this error when run as a web application built on Quart and Hypercorn.System Info
System Information ------------------ > OS: Linux > OS Version: #23-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 23:02:20 UTC 2025 > Python Version: 3.13.3 (main, Jun 16 2025, 18:15:32) [GCC 14.2.0] Package Information ------------------- > langchain_core: 0.3.67 > langchain: 0.3.26 > langchain_community: 0.3.27 > langsmith: 0.4.4 > langchain_google_genai: 2.1.6 > langchain_neo4j: 0.4.0 > langchain_ollama: 0.3.3 > langchain_postgres: 0.0.15 > langchain_text_splitters: 0.3.8 > langgraph_api: 0.2.39 > langgraph_cli: 0.2.10 > langgraph_license: Installed. No version info available. > langgraph_runtime: Installed. No version info available. > langgraph_runtime_inmem: 0.2.0 > langgraph_sdk: 0.1.72 Optional packages not installed ------------------------------- > langserve Other Dependencies ------------------ > aiohttp<4.0.0,>=3.8.3: Installed. No version info available. > async-timeout<5.0.0,>=4.0.0;: Installed. No version info available. > asyncpg>=0.30.0: Installed. No version info available. > blockbuster<2.0.0,>=1.5.24: Installed. No version info available. > click: 8.2.1 > cloudpickle>=3.0.0: Installed. No version info available. > cryptography<45.0,>=42.0.0: Installed. No version info available. > dataclasses-json<0.7,>=0.5.7: Installed. No version info available. > filetype: 1.2.0 > google-ai-generativelanguage: 0.6.18 > httpx: 0.28.1 > httpx-sse<1.0.0,>=0.4.0: Installed. No version info available. > httpx>=0.25.0: Installed. No version info available. > httpx>=0.25.2: Installed. No version info available. > jsonpatch<2.0,>=1.33: Installed. No version info available. > jsonschema-rs<0.30,>=0.20.0: Installed. No version info available. > langchain-anthropic;: Installed. No version info available. > langchain-aws;: Installed. No version info available. > langchain-azure-ai;: Installed. No version info available. > langchain-cohere;: Installed. No version info available. > langchain-community;: Installed. No version info available. > langchain-core<0.4.0,>=0.2.13: Installed. No version info available. > langchain-core<1.0.0,>=0.3.51: Installed. No version info available. > langchain-core<1.0.0,>=0.3.60: Installed. No version info available. > langchain-core<1.0.0,>=0.3.66: Installed. No version info available. > langchain-core>=0.2.38: Installed. No version info available. > langchain-deepseek;: Installed. No version info available. > langchain-fireworks;: Installed. No version info available. > langchain-google-genai;: Installed. No version info available. > langchain-google-vertexai;: Installed. No version info available. > langchain-groq;: Installed. No version info available. > langchain-huggingface;: Installed. No version info available. > langchain-mistralai;: Installed. No version info available. > langchain-ollama;: Installed. No version info available. > langchain-openai;: Installed. No version info available. > langchain-perplexity;: Installed. No version info available. > langchain-text-splitters<1.0.0,>=0.3.8: Installed. No version info available. > langchain-together;: Installed. No version info available. > langchain-xai;: Installed. No version info available. > langchain<1.0.0,>=0.3.26: Installed. No version info available. > langgraph-checkpoint>=2.0.23: Installed. No version info available. > langgraph-checkpoint>=2.0.25: Installed. No version info available. > langgraph-runtime-inmem<0.3,>=0.2.0: Installed. No version info available. > langgraph-sdk>=0.1.66: Installed. No version info available. > langgraph>=0.2: Installed. No version info available. > langgraph>=0.3.27: Installed. No version info available. > langsmith-pyo3: Installed. No version info available. > langsmith>=0.1.112: Installed. No version info available. > langsmith>=0.1.125: Installed. No version info available. > langsmith>=0.1.17: Installed. No version info available. > langsmith>=0.3.45: Installed. No version info available. > neo4j: 5.28.1 > neo4j-graphrag: 1.6.1 > numpy<3,>=1.21: Installed. No version info available. > numpy>=1.26.2;: Installed. No version info available. > numpy>=2.1.0;: Installed. No version info available. > ollama<1.0.0,>=0.4.8: Installed. No version info available. > openai-agents: Installed. No version info available. > opentelemetry-api: 1.34.1 > opentelemetry-exporter-otlp-proto-http: Installed. No version info available. > opentelemetry-sdk: 1.34.1 > orjson: 3.10.18 > orjson>=3.10.1: Installed. No version info available. > orjson>=3.9.7: Installed. No version info available. > packaging: 24.2 > packaging<25,>=23.2: Installed. No version info available. > pgvector<0.4,>=0.2.5: Installed. No version info available. > psycopg-pool<4,>=3.2.1: Installed. No version info available. > psycopg<4,>=3: Installed. No version info available. > pydantic: 2.11.7 > pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available. > pydantic<3.0.0,>=2.7.4: Installed. No version info available. > pydantic>=2.7.4: Installed. No version info available. > pyjwt>=2.9.0: Installed. No version info available. > pytest: 8.4.0 > python-dotenv: 1.1.1 > PyYAML>=5.3: Installed. No version info available. > requests: 2.32.4 > requests-toolbelt: 1.0.0 > requests<3,>=2: Installed. No version info available. > rich: Installed. No version info available. > SQLAlchemy<3,>=1.4: Installed. No version info available. > sqlalchemy<3,>=2: Installed. No version info available. > sse-starlette<2.2.0,>=2.1.0: Installed. No version info available. > sse-starlette>=2: Installed. No version info available. > starlette>=0.37: Installed. No version info available. > starlette>=0.38.6: Installed. No version info available. > structlog<26,>=24.1.0: Installed. No version info available. > structlog>23: Installed. No version info available. > tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available. > tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available. > tenacity>=8.0.0: Installed. No version info available. > truststore>=0.1: Installed. No version info available. > typing-extensions>=4.7: Installed. No version info available. > uvicorn>=0.26.0: Installed. No version info available. > watchfiles>=0.13: Installed. No version info available. > zstandard: 0.23.0
Try to run
pipenv install langgraph-cli
then
python -m langgraph_cli dev
python -m langgraph_cli dev
Doesn't this use the dependencies installed globally in the system? pipenv run python -m langgraph_cli dev hits the same error!
@khteh no, you can still set up an environment and use them on a per environment basis. using python -m langgraph_cli.dev doesn't mean that you're necessarily using the system python.
@khteh no, you can still set up an environment and use them on a per environment basis. using
python -m langgraph_cli.devdoesn't mean that you're necessarily using the system python.
Are you sure you know what you were talking about or are you the right person in your team to evaluate this?
$ which python
/usr/bin/python
$ pipenv run which python
Loading .env environment variables...
/home/khteh/.local/share/virtualenvs/rag-agent-YeW3dxEa/bin/python
Hey - just tested and things work fine out of the box when using uv with the default template (though if there's a specific case not supported I'm missing let me know). We can definitely add some better walk through instructions to the example ReadMe about how to get started with uv. But I think that might be aside the point from the original issue.
I agree with Eugene we're unlikely to add default support for much outside of pip or uv and would be curious if there's any reason in particular you're using pipenv instead?
any reason in particular you're using pipenv instead?
That's the only python dependency management system I have used. It seems that uv is the latest development in this area. Need time and effort to look into it and migrate the existing applications to it.
$ uv run python -m langgraph_cli dev
INFO:langgraph_api.cli:
Welcome to
╦ ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬
║ ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤
╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴ ┴ ┴
- 🚀 API: http://127.0.0.1:2024
- 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
- 📚 API Docs: http://127.0.0.1:2024/docs
This in-memory server is designed for development and testing.
For production use, please use LangGraph Platform.
[version] A newer version of langgraph-api is available: 0.4.28 → 0.5.12 (pip install -U langgraph-api)
2025-11-12T05:20:57.564458Z [info ] [version] A newer version of langgraph-api is available: 0.4.28 → 0.5.12 (pip install -U langgraph-api) [version_check] api_variant=local_dev langgraph_api_version=0.4.28 message='[version] A newer version of langgraph-api is available: 0.4.28 → 0.5.12 (pip install -U langgraph-api)' thread_name='Thread-4 (_check_newer_version)'
⚠️ [support] langgraph-api 0.4.28 is in Critical support.
Only critical security and installation fixes are provided.
You are one minor version behind the latest (0.5.x).
Please plan an upgrade soon. See changelog: https://docs.langchain.com/langgraph-platform/langgraph-server-changelog
2025-11-12T05:20:57.564592Z [info ] ⚠️ [support] langgraph-api 0.4.28 is in Critical support.
Only critical security and installation fixes are provided.
You are one minor version behind the latest (0.5.x).
Please plan an upgrade soon. See changelog: https://docs.langchain.com/langgraph-platform/langgraph-server-changelog [version_check] api_variant=local_dev langgraph_api_version=0.4.28 message='⚠️ [support] langgraph-api 0.4.28 is in Critical support.\nOnly critical security and installation fixes are provided.\nYou are one minor version behind the latest (0.5.x).\nPlease plan an upgrade soon. See changelog: https://docs.langchain.com/langgraph-platform/langgraph-server-changelog' thread_name='Thread-4 (_check_newer_version)'
2025-11-12T05:20:57.750687Z [info ] Using langgraph_runtime_inmem [langgraph_runtime] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:57.754641Z [info ] Using auth of type=noop [langgraph_api.auth.middleware] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:57.756325Z [info ] Starting In-Memory runtime with langgraph-api=0.4.28 and in-memory runtime=0.14.1 [langgraph_runtime_inmem.lifespan] api_variant=local_dev langgraph_api_version=0.4.28 langgraph_runtime_inmem_version=0.14.1 thread_name=asyncio_0 version=0.4.28
2025-11-12T05:20:57.823768Z [info ] Starting metadata loop [langgraph_api.metadata] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:57.823900Z [info ] Getting auth instance: None [langgraph_api.auth.custom] api_variant=local_dev langgraph_api_version=0.4.28 langgraph_auth=None thread_name=MainThread
2025-11-12T05:20:57.826460Z [info ] Starting thread TTL sweeper with interval 5 minutes [langgraph_api.thread_ttl] api_variant=local_dev interval_minutes=5 langgraph_api_version=0.4.28 strategy=delete thread_name=asyncio_1
2025-11-12T05:20:58.210710Z [info ] HTTP Request: POST https://api.smith.langchain.com/v1/metadata/submit "HTTP/1.1 204 No Content" [httpx] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:58.211087Z [info ] Successfully submitted metadata to LangSmith instance [langgraph_api.metadata] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:58.736474Z [info ] Shutting down remote graphs [langgraph_api.graph] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:58.757610Z [error ] Traceback (most recent call last):
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_runtime_inmem/lifespan.py", line 80, in lifespan
await graph.collect_graphs_from_env(True)
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 421, in collect_graphs_from_env
graph = await run_in_executor(None, _graph_from_spec, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/utils/config.py", line 144, in run_in_executor
return await asyncio.get_running_loop().run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/utils/config.py", line 135, in wrapper
return func(*args, **kwargs)
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 468, in _graph_from_spec
modspec.loader.exec_module(module) # type: ignore[possibly-unbound-attribute]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 20, in <module>
from src.Infrastructure.VectorStore import VectorStore
File "/usr/src/Python/rag-agent/src/Infrastructure/VectorStore.py", line 5, in <module>
from langchain.tools.retriever import create_retriever_tool
ModuleNotFoundError: No module named 'langchain.tools.retriever'
Could not import python module for graph:
GraphSpec(id='rag_agent', path='./src/rag_agent/RAGAgent.py', module=None, variable='make_graph', config={}, description=None)
This error likely means you haven't installed your project and its dependencies yet. Before running the server, install your project:
If you are using requirements.txt:
python -m pip install -r requirements.txt
If you are using pyproject.toml or setuptools:
python -m pip install -e .
Make sure to run this command from your project's root directory (where your setup.py or pyproject.toml is located)
[uvicorn.error] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:58.757794Z [error ] Application startup failed. Exiting. [uvicorn.error] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-12T05:20:58.813784Z [info ] 21 changes detected [watchfiles.main] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
Got it! Makes sense.
Re the error you're seeing - just tried to reproduce using langchain version 0.3.27 and a number of different cli versions, and I'm able to do the import you use above exactly: from langchain.tools.retriever import create_retriever_tool
Could you share what your pyproject.toml looks like? Are you running uv sync ahead of time?
For reference, the demo project with the relevant imports:
pyproject.toml
[project]
name = "agent"
version = "0.0.1"
description = "Starter template for making a new agent LangGraph."
authors = [
{ name = "William Fu-Hinthorn", email = "[email protected]" },
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
dependencies = [
"langgraph>=1.0.0",
"langchain==0.3.26,<1.0.0",
"langchain-community>=0.3.0,<1.0.0",
"python-dotenv>=1.0.1",
]
...
test_dep.py
from langchain.tools.retriever import create_retriever_tool
from langchain_community.retrievers import WikipediaRetriever
def get_retriever_tool():
retriever = WikipediaRetriever(
query="What is the capital of France?",
max_results=1,
)
return create_retriever_tool(
retriever=retriever,
name="fooey_retriever",
description="A tool for retrieving fooey information",
)
Above imported into graph.py with the following:
from agent.test_dep import get_retriever_tool
async def call_model(state: State, runtime: Runtime[Context]) -> Dict[str, Any]:
"""Process input and returns output.
Can use runtime context to alter behavior.
"""
tool = get_retriever_tool()
return {
"changeme": "output from call_model. "
f"Configured with {(runtime.context or {}).get('my_configurable_param')}"
}
Now I hit relative import error:
$ uv run python -m langgraph_cli dev
INFO:langgraph_api.cli:
Welcome to
╦ ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬
║ ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤
╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴ ┴ ┴
- 🚀 API: http://127.0.0.1:2024
- 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
- 📚 API Docs: http://127.0.0.1:2024/docs
This in-memory server is designed for development and testing.
For production use, please use LangGraph Platform.
2025-11-13T02:38:52.142256Z [info ] Using langgraph_runtime_inmem [langgraph_runtime] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:52.151723Z [info ] Using auth of type=noop [langgraph_api.auth.middleware] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:52.154681Z [info ] Starting In-Memory runtime with langgraph-api=0.4.28 and in-memory runtime=0.14.1 [langgraph_runtime_inmem.lifespan] api_variant=local_dev langgraph_api_version=0.4.28 langgraph_runtime_inmem_version=0.14.1 thread_name=asyncio_0 version=0.4.28
2025-11-13T02:38:52.219853Z [info ] Starting metadata loop [langgraph_api.metadata] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:52.220024Z [info ] Getting auth instance: None [langgraph_api.auth.custom] api_variant=local_dev langgraph_api_version=0.4.28 langgraph_auth=None thread_name=MainThread
2025-11-13T02:38:52.224223Z [info ] Starting thread TTL sweeper with interval 5 minutes [langgraph_api.thread_ttl] api_variant=local_dev interval_minutes=5 langgraph_api_version=0.4.28 strategy=delete thread_name=asyncio_1
2025-11-13T02:38:52.318556Z [info ] 3 changes detected [watchfiles.main] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:52.609827Z [info ] HTTP Request: POST https://api.smith.langchain.com/v1/metadata/submit "HTTP/1.1 204 No Content" [httpx] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:52.611224Z [info ] Successfully submitted metadata to LangSmith instance [langgraph_api.metadata] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:53.504803Z [info ] Shutting down remote graphs [langgraph_api.graph] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:53.527019Z [error ] Traceback (most recent call last):
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3.13/contextlib.py", line 214, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_runtime_inmem/lifespan.py", line 80, in lifespan
await graph.collect_graphs_from_env(True)
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 421, in collect_graphs_from_env
graph = await run_in_executor(None, _graph_from_spec, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/utils/config.py", line 144, in run_in_executor
return await asyncio.get_running_loop().run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/utils/config.py", line 135, in wrapper
return func(*args, **kwargs)
File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 468, in _graph_from_spec
modspec.loader.exec_module(module) # type: ignore[possibly-unbound-attribute]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 23, in <module>
from .Tools import ground_search, store_memory, upsert_memory
ImportError: attempted relative import with no known parent package
Could not import python module for graph:
GraphSpec(id='rag_agent', path='./src/rag_agent/RAGAgent.py', module=None, variable='make_graph', config={}, description=None)
This error likely means you haven't installed your project and its dependencies yet. Before running the server, install your project:
If you are using requirements.txt:
python -m pip install -r requirements.txt
If you are using pyproject.toml or setuptools:
python -m pip install -e .
Make sure to run this command from your project's root directory (where your setup.py or pyproject.toml is located)
[uvicorn.error] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:53.527208Z [error ] Application startup failed. Exiting. [uvicorn.error] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
2025-11-13T02:38:53.621849Z [info ] 24 changes detected [watchfiles.main] api_variant=local_dev langgraph_api_version=0.4.28 thread_name=MainThread
You need to use an absolute import instead of a relative one:
from rag_agent.Tools import ground_search, store_memory, upsert_memory
src.rag_agent.Tools seems to work. Strange as .Tools works perfectly in the ASGI app. However, I have problem upgrading loaggraph-api to the latest version:
$ uv lock --upgrade-package langgraph-api
Resolved 204 packages in 72ms
warning: The package `google-cloud-aiplatform==1.71.1` does not have an extra named `all`
$ uv pip list|grep langgraph-api
langgraph-api 0.4.28
Ah, doing uv lock --upgrade-package langgraph-api will update the lock file, but not what you have locally installed. Run uv sync after and you should see the version updated to 0.5.14 (the latest of writing).
uv sync -P langgraph-api will do both in a single command.
I am sure I tried many of those commands but to no avail:
$ uv sync -P langgraph-api
Resolved 204 packages in 1.35s
warning: The package `google-cloud-aiplatform==1.71.1` does not have an extra named `all`
Audited 200 packages in 0.90ms
$ uv run python -m langgraph_cli dev
INFO:langgraph_api.cli:
Welcome to
╦ ┌─┐┌┐┌┌─┐╔═╗┬─┐┌─┐┌─┐┬ ┬
║ ├─┤││││ ┬║ ╦├┬┘├─┤├─┘├─┤
╩═╝┴ ┴┘└┘└─┘╚═╝┴└─┴ ┴┴ ┴ ┴
- 🚀 API: http://127.0.0.1:2024
- 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
- 📚 API Docs: http://127.0.0.1:2024/docs
This in-memory server is designed for development and testing.
For production use, please use LangGraph Platform.
[version] A newer version of langgraph-api is available: 0.4.28 → 0.5.14 (pip install -U langgraph-api)
$ grep -A1 langgraph-api uv.lock
name = "langgraph-api"
version = "0.4.28"
--
{ name = "langgraph-api" },
{ name = "langgraph-runtime-inmem" },
Hmm interesting. Can you share your pyproject.toml file? Are you pinning the langgraph-api version anywhere or taking a dependency that does?
Maybe also worth trying to run just uv sync --upgrade to bump any other dependencies as well?
https://github.com/khteh/rag-agent/blob/master/pyproject.toml
Ah ok super helpful! Looks like the dependency on vertexai takes a dependency on protobuf<=6.0.0 but langgraph-api>=0.5.0 takes a dependency on protobuf>=6.32.1 and so langgraph-api is being resolved to an earlier version that meets that constraint. Pulling out vertexai lets you grab the latest.
Let me see if we can relax the protobuf version, but probably set that high for a reason.
I don't need vertexai