LANGGRAPH_AUTH_TYPE is not working properly.
rxyshww opened this issue · 6 comments
Checked other resources
- I added a very descriptive title to this issue.
- I searched the LangGraph/LangChain documentation with the integrated search.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangGraph/LangChain rather than my code.
- I am sure this is better as an issue rather than a GitHub discussion, since this is a LangGraph bug and not a design question.
Example Code
When I use langgraph-cli for local development, I don't need the deployment of the cloud but the local startup, but it doesn't run as expected.
//.env
ANTHROPIC_API_KEY=sk-proj-LfBOnaxzGYkId
TAVILY_API_KEY=tvly-CW8gcAEU83s8zb37I8
LANGGRAPH_AUTH_TYPE=noop
// langgraph.json
{
"dependencies": ["."],
"graphs": {
"agent": "./agent.py:graph"
},
"env": ".env"
}
// agent.py
from langchain_anthropic import ChatAnthropic
from langchain_community.tools.tavily_search import TavilySearchResults
from langgraph.prebuilt import create_react_agent
import os
os.environ["LANGGRAPH_AUTH_TYPE"] = "noop"
model = ChatAnthropic(model="claude-3-5-sonnet-20240620")
tools = [TavilySearchResults(max_results=2)]
graph = create_react_agent(model, tools)
Error Message and Stack Trace (if applicable)
langgraph up
Starting LangGraph API server...
For local dev, requires env var LANGSMITH_API_KEY with access to LangGraph Cloud closed beta.
For production use, requires a license key in env var LANGGRAPH_CLOUD_LICENSE_KEY.
| Building...#1 [langgraph-api internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s
#2 [langgraph-api internal] load build definition from Dockerfile
#2 transferring dockerfile: 753B done
#2 DONE 0.0s
#3 [langgraph-api internal] load metadata for docker.io/langchain/langgraph-api:3.11
#3 DONE 0.0s
#4 [langgraph-api 1/7] FROM docker.io/langchain/langgraph-api:3.11
#4 DONE 0.0s
#5 [langgraph-api internal] load build context
#5 transferring context: 270B done
#5 DONE 0.0s
#6 [langgraph-api 4/7] ADD . /deps/__outer_graph-up/src
#6 CACHED
#7 [langgraph-api 2/7] ADD requirements.txt /deps/__outer_graph-up/src/requirements.txt
#7 CACHED
#8 [langgraph-api 3/7] RUN pip install -c /api/constraints.txt -r /deps/__outer_graph-up/src/requirements.txt
#8 CACHED
#9 [langgraph-api 6/7] RUN pip install -c /api/constraints.txt -e /deps/*
#9 CACHED
#10 [langgraph-api 5/7] RUN set -ex && for line in '[project]' 'name = "graph-up"' 'version = "0.1"' '[tool.setuptools.package-data]' '"*" = ["**/*"]'; do echo "" >> /deps/__outer_graph-up/pyproject.toml; done
#10 CACHED
#11 [langgraph-api 7/7] WORKDIR /deps/__outer_graph-up/src
#11 CACHED
#12 [langgraph-api] exporting to image
#12 exporting layers done
#12 writing image sha256:ee2d148333ee20ab826ef432402c9b61c3d23aaf7a933dc8ed29077e0fd2e335 done
#12 naming to docker.io/library/graph-up-langgraph-api done
#12 DONE 0.0s
Attaching to graph-up-langgraph-api-1, graph-up-langgraph-postgres-1
graph-up-langgraph-postgres-1 |
graph-up-langgraph-postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
graph-up-langgraph-postgres-1 |
graph-up-langgraph-postgres-1 |
graph-up-langgraph-api-1 | 2024-06-30 09:14:20,495:INFO:uvicorn.error Started server process [1]
graph-up-langgraph-api-1 | 2024-06-30 09:14:20,495:INFO:uvicorn.error Waiting for application startup.
graph-up-langgraph-api-1 | 2024-06-30 09:14:20,496:ERROR:uvicorn.error Traceback (most recent call last):
graph-up-langgraph-api-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 732, in lifespan
graph-up-langgraph-api-1 | async with self.lifespan_context(app) as maybe_state:
graph-up-langgraph-api-1 | File "/usr/local/lib/python3.11/contextlib.py", line 210, in __aenter__
graph-up-langgraph-api-1 | return await anext(self.gen)
graph-up-langgraph-api-1 | ^^^^^^^^^^^^^^^^^^^^^
graph-up-langgraph-api-1 | File "/api/langgraph_api/lifespan.py", line 18, in lifespan
graph-up-langgraph-api-1 | ValueError: License key is not valid
graph-up-langgraph-api-1 |
graph-up-langgraph-api-1 | 2024-06-30 09:14:20,496:ERROR:uvicorn.error Application startup failed. Exiting.
graph-up-langgraph-api-1 |
graph-up-langgraph-api-1 exited with code 3
time="2024-06-30T17:14:14+08:00" level=warning msg="The \"line\" variable is not set. Defaulting to a blank string."
Container graph-up-langgraph-postgres-1 Created
Container graph-up-langgraph-api-1 Created
graph-up-langgraph-postgres-1 | 2024-06-30 09:14:14.494 UTC [1] LOG: starting PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
graph-up-langgraph-postgres-1 | 2024-06-30 09:14:14.494 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
graph-up-langgraph-postgres-1 | 2024-06-30 09:14:14.494 UTC [1] LOG: listening on IPv6 address "::", port 5432
graph-up-langgraph-postgres-1 | 2024-06-30 09:14:14.496 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
graph-up-langgraph-postgres-1 | 2024-06-30 09:14:14.499 UTC [29] LOG: database system was shut down at 2024-06-30 09:13:28 UTC
graph-up-langgraph-postgres-1 | 2024-06-30 09:14:14.504 UTC [1] LOG: database system is ready to accept connections
Aborting on container exit...
Container graph-up-langgraph-api-1 Stopping
Container graph-up-langgraph-api-1 Stopped
Container graph-up-langgraph-postgres-1 Stopping
Container graph-up-langgraph-postgres-1 Stopped
Description
ValueError: License key is not valid
it's not work!
System Info
py311
langgraph-cli 1.47
mac
@rxyshww We have to wait. I do not know how long. I won't give up yet, because I already spent a week with this error
We are working on removing the license restrictions and will post an update here as soon as we can
@vbarda Is there a work around for local development until the update comes out?
@blackflame007 the only thing you can do is use langgraph test
for local development, which allows you to confirm the server is working but won’t have full persistence features (you can create graph runs but won’t be able to save state). but to test full functionality you need to either get the license key or deploy your app with LangGraph cloud
@vbarda the license key is another question. How much does it cost. Is it the same as the waiting list ? Or how much the Langgraph cost ?
Hi all - we do not have a timeframe on a solution for local only workflows.
As to the Cloud licensing, we are currently in closed beta and access requires either a license key or the service being enabled in your LangSmith instance.
Please submit a request to the waitlist and someone will reach out to review your use case. Thanks everyone for your collective interest!