From 4ed0e4e98dfe6104bbe1878af2ec383f1c873778 Mon Sep 17 00:00:00 2001 From: vbarda Date: Fri, 20 Dec 2024 09:58:29 -0500 Subject: [PATCH 1/2] docs: remove langgraph up references --- docs/docs/cloud/deployment/cloud.md | 2 +- docs/docs/cloud/deployment/test_locally.md | 32 ++++++++++++------- .../cloud/how-tos/test_local_deployment.md | 14 +++++--- docs/docs/cloud/quick_start.md | 1 - .../langgraph-platform/local-server.md | 2 +- 5 files changed, 32 insertions(+), 19 deletions(-) diff --git a/docs/docs/cloud/deployment/cloud.md b/docs/docs/cloud/deployment/cloud.md index acba37e5d..754104702 100644 --- a/docs/docs/cloud/deployment/cloud.md +++ b/docs/docs/cloud/deployment/cloud.md @@ -5,7 +5,7 @@ LangGraph Cloud is available within Ready! +> +> - API: [http://localhost:2024](http://localhost:2024/) +> +> - Docs: http://localhost:2024/docs +> +> - LangGraph Studio Web UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024 + +!!! note "In-Memory Mode" + + The `langgraph dev` command starts LangGraph Server in an in-memory mode. This mode is suitable for development and testing purposes. For production use, you should deploy LangGraph Server with access to a persistent storage backend. + + If you want to test your application with a persistent storage backend, you can use the `langgraph up` command instead of `langgraph dev`. You will + need to have `docker` installed on your machine to use this command. + ### Interact with the server @@ -53,7 +63,7 @@ You can either initialize by passing authentication or by setting an environment ```python from langgraph_sdk import get_client - # only pass the url argument to get_client() if you changed the default port when calling langgraph up + # only pass the url argument to get_client() if you changed the default port when calling langgraph dev client = get_client(url=,api_key=) # Using the graph deployed with the name "agent" assistant_id = "agent" @@ -65,7 +75,7 @@ You can either initialize by passing authentication or by setting an environment ```js import { Client } from "@langchain/langgraph-sdk"; - // only set the apiUrl if you changed the default port when calling langgraph up + // only set the apiUrl if you changed the default port when calling langgraph dev const client = new Client({ apiUrl: , apiKey: }); // Using the graph deployed with the name "agent" const assistantId = "agent"; @@ -91,7 +101,7 @@ If you have a `LANGSMITH_API_KEY` set in your environment, you do not need to ex ```python from langgraph_sdk import get_client - # only pass the url argument to get_client() if you changed the default port when calling langgraph up + # only pass the url argument to get_client() if you changed the default port when calling langgraph dev client = get_client() # Using the graph deployed with the name "agent" assistant_id = "agent" @@ -103,7 +113,7 @@ If you have a `LANGSMITH_API_KEY` set in your environment, you do not need to ex ```js import { Client } from "@langchain/langgraph-sdk"; - // only set the apiUrl if you changed the default port when calling langgraph up + // only set the apiUrl if you changed the default port when calling langgraph dev const client = new Client(); // Using the graph deployed with the name "agent" const assistantId = "agent"; diff --git a/docs/docs/cloud/how-tos/test_local_deployment.md b/docs/docs/cloud/how-tos/test_local_deployment.md index c0c9c09b9..5705d7a88 100644 --- a/docs/docs/cloud/how-tos/test_local_deployment.md +++ b/docs/docs/cloud/how-tos/test_local_deployment.md @@ -7,17 +7,21 @@ Make sure you have setup your app correctly, by creating a compiled graph, a `.env` file with any environment variables, and a `langgraph.json` config file that points to your environment file and compiled graph. See [here](https://langchain-ai.github.io/langgraph/cloud/deployment/setup/) for more detailed instructions. -After you have your app setup, head into the directory with your `langgraph.json` file and call `langgraph up -c langgraph.json --watch` to start the API server in watch mode which means it will restart on code changes, which is ideal for local testing. If the API server start correctly you should see logs that look something like this: +After you have your app setup, head into the directory with your `langgraph.json` file and call `langgraph dev` to start the API server in watch mode which means it will restart on code changes, which is ideal for local testing. If the API server start correctly you should see logs that look something like this: - Ready! - - API: http://localhost:8123 - 2024-06-26 19:20:41,056:INFO:uvicorn.access 127.0.0.1:44138 - "GET /ok HTTP/1.1" 200 +> Ready! +> +> - API: [http://localhost:2024](http://localhost:2024/) +> +> - Docs: http://localhost:2024/docs +> +> - LangGraph Studio Web UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024 Read this [reference](https://langchain-ai.github.io/langgraph/cloud/reference/cli/#up) to learn about all the options for starting the API server. ## Access Studio -Once you have successfully started the API server, you can access the studio by going to the following URL: `https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:8123` (see warning above if using Safari). +Once you have successfully started the API server, you can access the studio by going to the following URL: `https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024` (see warning above if using Safari). If everything is working correctly you should see the studio show up looking something like this (with your graph diagram on the left hand side): diff --git a/docs/docs/cloud/quick_start.md b/docs/docs/cloud/quick_start.md index 12944a01d..f64e954c8 100644 --- a/docs/docs/cloud/quick_start.md +++ b/docs/docs/cloud/quick_start.md @@ -208,7 +208,6 @@ export LANGSMITH_API_KEY=... ```js const { Client } = await import("@langchain/langgraph-sdk"); - // only set the apiUrl if you changed the default port when calling langgraph up const client = new Client({ apiUrl: "your-deployment-url", apiKey: "your-langsmith-api-key" }); const streamResponse = client.runs.stream( diff --git a/docs/docs/tutorials/langgraph-platform/local-server.md b/docs/docs/tutorials/langgraph-platform/local-server.md index 71c2289f3..a716a8c51 100644 --- a/docs/docs/tutorials/langgraph-platform/local-server.md +++ b/docs/docs/tutorials/langgraph-platform/local-server.md @@ -180,7 +180,7 @@ LangGraph Studio Web is a specialized UI that you can connect to LangGraph API s ```js const { Client } = await import("@langchain/langgraph-sdk"); - // only set the apiUrl if you changed the default port when calling langgraph up + // only set the apiUrl if you changed the default port when calling langgraph dev const client = new Client({ apiUrl: "http://localhost:2024"}); const streamResponse = client.runs.stream( From 1070712aef9cdbd731796c8f56ae7a3ef8ee183b Mon Sep 17 00:00:00 2001 From: vbarda Date: Fri, 20 Dec 2024 10:58:48 -0500 Subject: [PATCH 2/2] remove brew --- docs/docs/cloud/deployment/test_locally.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/docs/cloud/deployment/test_locally.md b/docs/docs/cloud/deployment/test_locally.md index 7adb6ab6c..fb037e47b 100644 --- a/docs/docs/cloud/deployment/test_locally.md +++ b/docs/docs/cloud/deployment/test_locally.md @@ -6,17 +6,11 @@ Testing locally ensures that there are no errors or conflicts with Python depend ## Setup -Install the proper packages: +Install the LangGraph CLI package: - -=== "pip" - ```bash - pip install -U "langgraph-cli[inmem]" - ``` -=== "Homebrew (macOS only)" - ```bash - brew install langgraph-cli - ``` +```bash +pip install -U "langgraph-cli[inmem]" +``` Ensure you have an API key, which you can create from the [LangSmith UI](https://smith.langchain.com) (Settings > API Keys). This is required to authenticate that you have LangGraph Cloud access. After you have saved the key to a safe place, place the following line in your `.env` file: