docs: Simplify LGP quickstarts (#4678)

- Change quickstarts to use `new-langgraph-project`, which doesn't
require API keys for Anthropic, Tavily, etc.
This commit is contained in:
Lauren Hirata Singh
2025-05-13 11:47:48 -07:00
committed by GitHub
10 changed files with 16 additions and 42 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

+7 -21
View File
@@ -9,20 +9,11 @@ Before you begin, ensure you have the following:
- A [GitHub account](https://github.com/)
- A [LangSmith account](https://smith.langchain.com/) free to sign up
This quickstart uses the [pre-built Python ReAct agent template](https://github.com/langchain-ai/react-agent), which requires the following:
- An API key for [Anthropic](https://console.anthropic.com/)
- An API key for [Tavily](https://app.tavily.com/)
!!! note
If you want to use a scaffold application that doesn't require API keys, use the [New LangGraph Project](https://github.com/langchain-ai/new-langgraph-project) template instead.
## 1. Create a repository on GitHub
To deploy a LangGraph application to **LangGraph Platform**, your application code must reside in a GitHub repository. Both public and private repositories are supported. For this quickstart, use the [pre-built Python ReAct agent template](https://github.com/langchain-ai/react-agent) for your application:
To deploy an application to **LangGraph Platform**, your application code must reside in a GitHub repository. Both public and private repositories are supported. For this quickstart, use the [`new-langgraph-project` template](https://github.com/langchain-ai/react-agent) for your application:
1. Go to the [ReAct Agent](https://github.com/langchain-ai/react-agent) repository.
1. Go to the [`new-langgraph-project` repository](https://github.com/langchain-ai/new-langgraph-project) or [`new-langgraphjs-project` template](https://github.com/langchain-ai/new-langgraphjs-project).
1. Click the `Fork` button in the top right corner to fork the repository to your GitHub account.
1. Click **Create fork**.
@@ -30,14 +21,9 @@ To deploy a LangGraph application to **LangGraph Platform**, your application co
1. Log in to [LangSmith](https://smith.langchain.com/).
1. In the left sidebar, select **LangGraph Platform**.
1. Click the **+ New Deployment** button. A modal will open where you can fill in the required fields.
1. Click the **+ New Deployment** button. A pane will open where you can fill in the required fields.
1. If you are a first time user or adding a private repository that has not been previously connected, click the **Import from GitHub** button and follow the instructions to connect your GitHub account.
1. Select your ReAct Agent repository.
1. In the **Environment Variables** section, set the following secrets:
- **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/).
1. Select your New LangGraph Project repository.
1. Click **Submit** to deploy.
This may take about 15 minutes to complete. You can check the status in the **Deployment details** view.
@@ -52,7 +38,7 @@ Once your application is deployed:
LangGraph Studio will open to display your graph.
<figure markdown="1">
[![image](deployment/img/09_langgraph_studio.png){: style="max-height:400px"}](deployment/img/09_langgraph_studio.png)
[![image](deployment/img/langgraph_studio.png){: style="max-height:400px"}](deployment/img/langgraph_studio.png)
<figcaption>
Sample graph run in LangGraph Studio.
</figcaption>
@@ -129,7 +115,7 @@ You can now test the API:
print("\n\n")
```
=== "Javascript SDK"
=== "JavaScript SDK"
1. Install the LangGraph JS SDK
@@ -185,7 +171,7 @@ You can now test the API:
```
## Next Steps
## Next steps
Congratulations! You have deployed an application using LangGraph Platform.
@@ -8,15 +8,6 @@ Before you begin, ensure you have the following:
- An API key for [LangSmith](https://smith.langchain.com/settings) - free to sign up
This quickstart uses the [pre-built Python ReAct agent template](https://github.com/langchain-ai/react-agent), which requires the following:
- An API key for [Anthropic](https://console.anthropic.com/)
- An API key for [Tavily](https://app.tavily.com/)
!!! note
If you want to use a scaffold application that doesn't require API keys, use the [New LangGraph Project](https://github.com/langchain-ai/new-langgraph-project) template instead.
## 1. Install the LangGraph CLI
```bash
@@ -27,18 +18,18 @@ pip install --upgrade "langgraph-cli[inmem]"
## 2. Create a LangGraph app 🌱
Create a new app from the `react-agent` template. This template is a simple agent that can be flexibly extended to many tools.
Create a new app from the [`new-langgraph-project` template](https://github.com/langchain-ai/new-langgraph-project) or [`new-langgraphjs-project` template](https://github.com/langchain-ai/new-langgraphjs-project). This template demonstrates a simple chatbot that maintains chat memory, which allows for coherent conversations across multiple interactions.
=== "Python Server"
=== "Python server"
```shell
langgraph new path/to/your/app --template react-agent-python
langgraph new path/to/your/app --template new-langgraph-project
```
=== "Node Server"
=== "Node server"
```shell
langgraph new path/to/your/app --template react-agent-js
langgraph new path/to/your/app --template new-langgraphjs-project
```
!!! tip "Additional templates"
@@ -69,21 +60,18 @@ You will find a `.env.example` in the root of your new LangGraph app. Create a `
```bash
LANGSMITH_API_KEY=lsv2...
TAVILY_API_KEY=tvly-...
ANTHROPIC_API_KEY=sk-
```
## 5. Launch LangGraph Server 🚀
Start the LangGraph API server locally:
=== "Python Server"
=== "Python server"
```shell
langgraph dev
```
=== "Node Server"
=== "Node server"
```shell
npx @langchain/langgraph-cli dev
@@ -187,7 +175,7 @@ For a LangGraph Server running on a custom host/port, update the baseURL paramet
print(chunk.data)
print("\n\n")
```
=== "Javascript SDK"
1. Install the LangGraph JS SDK:
@@ -244,7 +232,7 @@ For a LangGraph Server running on a custom host/port, update the baseURL paramet
}"
```
## Next Steps
## Next steps
Now that you have a LangGraph app running locally, take your journey further by exploring deployment and advanced features: