From 79a1ce6804c99298f31c103d700051fce55eb8e3 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Mon, 16 Dec 2024 21:47:32 -0500 Subject: [PATCH 1/3] x --- docs/docs/cloud/quick_start.md | 26 ++++++++++--------- docs/docs/tutorials/index.md | 6 ++--- .../langgraph-platform/local-server.md | 4 +-- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/docs/cloud/quick_start.md b/docs/docs/cloud/quick_start.md index 060384c35..0b1c83d6a 100644 --- a/docs/docs/cloud/quick_start.md +++ b/docs/docs/cloud/quick_start.md @@ -2,26 +2,28 @@ !!! note "Prerequisites" - Before you start, make sure you have the following: + Before you begin, ensure you have the following: - - [A GitHub account](https://github.com/) - - [A LangSmith account](https://smith.langchain.com/) - -In this quickstart, we'll deploy a **pre-built** LangGraph application into LangGraph cloud. + - [GitHub account](https://github.com/) + - [LangSmith account](https://smith.langchain.com/) ## Create a repository on GitHub -To deploy a LangGraph application to **LangGraph Cloud**, you need to have your application code in a GitHub repository. Either a public or private repository will work. +To deploy a LangGraph application to **LangGraph Cloud**, your application code must reside in a GitHub repository. Both public and private repositories are supported. -We will use the pre-built python [**ReAct Agent**](https://github.com/langchain-ai/react-agent) template for this quickstart. This application requires two API keys (`ANTHROPIC_API_KEY` and `TAVILY_API_KEY`) to run. +You can deploy any [LangGraph Application](../concepts/application_structure.md) to LangGraph Cloud. -1. Go to the [ReAct Agent](https://github.com/langchain-ai/react-agent) repository. -2. Fork the repository to your GitHub account by clicking the `Fork` button in the top right corner. +For this guide, we'll use the pre-built Python [**ReAct Agent**](https://github.com/langchain-ai/react-agent) template. + +??? note "Get Required API Keys for the ReAct Agent template" -??? note "Get API Keys for the ReAct Agent template" + This **ReAct Agent** application requires an API key from [Anthropic](https://console.anthropic.com/) and [Tavily](https://app.tavily.com/). You can get these API keys by signing up on their respective websites. - - **ANTHROPIC_API_KEY**: Get an API key from [Anthropic](https://console.anthropic.com/). - - **TAVILY_API_KEY**: Get an API key on the [Tavily website](https://app.tavily.com/). + **Alternative**: If you'd prefer a scaffold application that doesn't require API keys, use the [**New LangGraph Project**](https://github.com/langchain-ai/new-langgraph-project) template instead of the **ReAct Agent** template. + + +1. Go to the [ReAct Agent](https://github.com/langchain-ai/react-agent) repository. +2. Fork the repository to your GitHub account by clicking the `Fork` button in the top right corner. ## Deploy to LangGraph Cloud diff --git a/docs/docs/tutorials/index.md b/docs/docs/tutorials/index.md index 286137479..f6eefe87c 100644 --- a/docs/docs/tutorials/index.md +++ b/docs/docs/tutorials/index.md @@ -11,9 +11,9 @@ New to LangGraph or LLM app development? Read this material to get up and runnin ## Get Started 🚀 {#quick-start} - [LangGraph Quickstart](introduction.ipynb): Build a chatbot that can use tools and keep track of conversation history. Add human-in-the-loop capabilities and explore how time-travel works. -- [LangGraph Server Quickstart](langgraph-platform/local-server.md): Launch a LangGraph server locally and interact with it using the REST API and LangGraph Studio Web UI. -- [LangGraph Cloud QuickStart](../cloud/quick_start.md): Deploy a LangGraph app using LangGraph Cloud. -- [LangGraph Template Quickstart](../concepts/template_applications.md): Quickly start building with LangGraph Platform using a template application. +- [LangGraph Server Quickstart](langgraph-platform/local-server.md): Launch a LangGraph server locally and interact with it using REST API and LangGraph Studio Web UI. +- [LangGraph Template Quickstart](../concepts/template_applications.md): Start building with LangGraph Platform using a template application. +- [Deploy with LangGraph Cloud Quickstart](../cloud/quick_start.md): Deploy a LangGraph app using LangGraph Cloud. ## Use cases 🛠️ diff --git a/docs/docs/tutorials/langgraph-platform/local-server.md b/docs/docs/tutorials/langgraph-platform/local-server.md index ead867eda..9aa06cdbc 100644 --- a/docs/docs/tutorials/langgraph-platform/local-server.md +++ b/docs/docs/tutorials/langgraph-platform/local-server.md @@ -1,4 +1,4 @@ -# Quick Start: Launch Local LangGraph Server +# QuickStart: Launch Local LangGraph Server This is a quick start guide to help you get a LangGraph app up and running locally. @@ -226,7 +226,7 @@ Now that you have a LangGraph app running locally, take your journey further by ### 🌐 Deploy to LangGraph Cloud -- **[LangGraph Cloud QuickStart](../../cloud/quick_start.md)**: Deploy your LangGraph app using LangGraph Cloud. +- **[LangGraph Cloud Quickstart](../../cloud/quick_start.md)**: Deploy your LangGraph app using LangGraph Cloud. ### 📚 Learn More about LangGraph Platform From 2f1e864570afdc5253977908fb859a09476cff0a Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Mon, 16 Dec 2024 22:00:41 -0500 Subject: [PATCH 2/3] x --- docs/docs/cloud/quick_start.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/cloud/quick_start.md b/docs/docs/cloud/quick_start.md index 0b1c83d6a..17276237f 100644 --- a/docs/docs/cloud/quick_start.md +++ b/docs/docs/cloud/quick_start.md @@ -125,7 +125,7 @@ Once your application is deployed, you can test it in **LangGraph Studio**. The API calls below are for the **ReAct Agent** template. If you're deploying a different application, you may need to adjust the API calls accordingly. -Before using, you need to get the URL of your LangGraph deployment. You can find this in the `Deployment` view. Click the URL to copy it to the clipboard. +Before using, you need to get the `URL` of your LangGraph deployment. You can find this in the `Deployment` view. Click the `URL` to copy it to the clipboard. You also need to make sure you have set up your API key properly, so you can authenticate with LangGraph Cloud. @@ -146,7 +146,7 @@ export LANGSMITH_API_KEY=... ```python from langgraph_sdk import get_client - client = get_client(url="http://localhost:8123") + client = get_client(url="your-deployment-url", api_key="your-langsmith-api-key") async for chunk in client.runs.stream( None, # Threadless run @@ -177,7 +177,7 @@ export LANGSMITH_API_KEY=... ```python from langgraph_sdk import get_sync_client - client = get_sync_client(url="http://localhost:8123") + client = get_sync_client(url="your-deployment-url", api_key="your-langsmith-api-key") for chunk in client.runs.stream( None, # Threadless run @@ -209,7 +209,7 @@ export LANGSMITH_API_KEY=... 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: "http://localhost:8123"}); + const client = new Client({ apiUrl: "your-deployment-url", apiKey: "your-langsmith-api-key" }); const streamResponse = client.runs.stream( null, // Threadless run From 3eca363c23884fbccc53c7cd9823ffd874c3aae6 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Mon, 16 Dec 2024 22:01:53 -0500 Subject: [PATCH 3/3] x --- docs/docs/cloud/quick_start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cloud/quick_start.md b/docs/docs/cloud/quick_start.md index 17276237f..12944a01d 100644 --- a/docs/docs/cloud/quick_start.md +++ b/docs/docs/cloud/quick_start.md @@ -235,7 +235,7 @@ export LANGSMITH_API_KEY=... ```bash curl -s --request POST \ - --url "http://localhost:8123/runs/stream" \ + --url \ --header 'Content-Type: application/json' \ --data "{ \"assistant_id\": \"agent\",