reformat troubleshooting section and remove faqs page

This commit is contained in:
Arjun Natarajan
2025-05-13 17:54:51 -04:00
parent e705ea1961
commit 72d085d9f8
5 changed files with 67 additions and 101 deletions
-48
View File
@@ -1,48 +0,0 @@
# LangGraph Studio FAQs
## Why is my project failing to start?
A project may fail to start if the configuration file is defined incorrectly, or if required environment variables are missing. See [here](../../reference/cli.md#configuration-file) for how your configuration file should be defined.
## Why are extra edges showing up in my graph?
If you don't define your conditional edges carefully, you might notice extra edges appearing in your graph. This is because without proper definition, LangGraph Studio assumes the conditional edge could access all other nodes. In order for this to not be the case, you need to be explicit about how you define the nodes the conditional edge routes to. There are two ways you can do this:
### Solution 1: Include a path map
The first way to solve this is to add path maps to your conditional edges. A path map is just a dictionary or array that maps the possible outputs of your router function with the names of the nodes that each output corresponds to. The path map is passed as the third argument to the `add_conditional_edges` function like so:
=== "Python"
```python
graph.add_conditional_edges("node_a", routing_function, {True: "node_b", False: "node_c"})
```
=== "Javascript"
```ts
graph.addConditionalEdges("node_a", routingFunction, { true: "node_b", false: "node_c" });
```
In this case, the routing function returns either True or False, which map to `node_b` and `node_c` respectively.
### Solution 2: Update the typing of the router (Python only)
Instead of passing a path map, you can also be explicit about the typing of your routing function by specifying the nodes it can map to using the `Literal` python definition. Here is an example of how to define a routing function in that way:
```python
def routing_function(state: GraphState) -> Literal["node_b","node_c"]:
if state['some_condition'] == True:
return "node_b"
else:
return "node_c"
```
## Why is my graph taking so long to startup?
The LangGraph Studio interacts with a local LangGraph API server. To stay aligned with ongoing updates, the LangGraph API requires regular rebuilding. As a result, you may occasionally experience slight delays when starting up your project.
## Can I use Studio without using LangSmith?
By default, LangGraph Studio is accessed from the LangSmith UI, within the LangGraph Platform Deployments tab. For local development, if you do not wish to have data traced to Langsmith, simply set `LANGSMITH_TRACING=false` in your application's `.env` file. With tracing disabled, no data will leave your local server.
+20 -18
View File
@@ -7,9 +7,11 @@ LangGraph Studio supports connecting to two types of graphs:
- Graphs deployed on [LangGraph Platform](../../../cloud/quick_start.md)
- Graphs running locally via the [LangGraph Server](../../../tutorials/langgraph-platform/local-server.md).
LangGraph Studio is accessed from the LangSmith UI, within the LangGraph Platform Deployments tab.
## Deployed application
For applications that are deployed on LangGraph Platform, you can access Studio as part of that deployment. To do so, navigate to the deployment in LangGraph Platform within the LangSmith UI and click the "LangGraph Studio" button.
For applications that are [deployed](../../quick_start.md) on LangGraph Platform, you can access Studio as part of that deployment. To do so, navigate to the deployment in LangGraph Platform within the LangSmith UI and click the "LangGraph Studio" button.
This will load the Studio UI connected to your live deployment, allowing you to create, read, and update the [threads](../../concepts/threads.md), [assistants](../../../concepts/assistants.md), and [memory](../../../concepts//memory.md) in that deployment.
@@ -17,6 +19,9 @@ This will load the Studio UI connected to your live deployment, allowing you to
To test your locally running application using LangGraph Studio, ensure your application is set up following [this guide](https://langchain-ai.github.io/langgraph/cloud/deployment/setup/).
!!! info "LangSmith Tracing"
For local development, if you do not wish to have data traced to LangSmith, set `LANGSMITH_TRACING=false` in your application's `.env` file. With tracing disabled, no data will leave your local server.
Next, install the [LangGraph CLI](../../../concepts/langgraph_cli.md):
```
@@ -30,7 +35,7 @@ langgraph dev
```
!!! warning "Browser Compatibility"
Safari blocks `localhost` connections to Studio. To work around this, run the above command with `--tunnel` to access Studio via a secure tunnel.
Safari blocks `localhost` connections to Studio. To work around this, run the above command with `--tunnel` to access Studio via a secure tunnel.
This will start the LangGraph Server locally, running in-memory. The server will run in watch mode, listening for and automatically restarting on code changes. Read this [reference](https://langchain-ai.github.io/langgraph/cloud/reference/cli/#dev) to learn about all the options for starting the API server.
@@ -44,15 +49,14 @@ If successful, you will see the following logs:
>
> - LangGraph Studio Web UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
Once running, you will automatically be directed to LangGraph Studio.
Once running, you will automatically be directed to LangGraph Studio.
For an already running server, access Studio by either:
1. Directly navigate to the following URL: `https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024`.
2. Within LangSmith, navigate to the LangGraph Platform Deployments tab, click the "LangGraph Studio" button, enter `http://127.0.0.1:2024` and click "Connect".
If running your server at a different host or port, simply update the `baseUrl` to match.
1. Directly navigate to the following URL: `https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024`.
2. Within LangSmith, navigate to the LangGraph Platform Deployments tab, click the "LangGraph Studio" button, enter `http://127.0.0.1:2024` and click "Connect".
If running your server at a different host or port, simply update the `baseUrl` to match.
### (Optional) Attach a debugger
@@ -69,8 +73,8 @@ langgraph dev --debug-port 5678
Then attach your preferred debugger:
=== "VS Code"
Add this configuration to `launch.json`:
```json
Add this configuration to `launch.json`:
`json
{
"name": "Attach to LangGraph",
"type": "debugpy",
@@ -80,16 +84,14 @@ Then attach your preferred debugger:
"port": 5678
}
}
```
Specify the port number you chose in the previous step.
`
Specify the port number you chose in the previous step.
=== "PyCharm"
1. Go to Run → Edit Configurations
2. Click + and select "Python Debug Server"
3. Set IDE host name: `localhost`
4. Set port: `5678` (or the port number you chose in the previous step)
5. Click "OK" and start debugging
=== "PyCharm" 1. Go to Run → Edit Configurations 2. Click + and select "Python Debug Server" 3. Set IDE host name: `localhost` 4. Set port: `5678` (or the port number you chose in the previous step) 5. Click "OK" and start debugging
## Troubleshooting
For issues getting started, please see this [troubleshooting guide](../../../troubleshooting/studio.md).
## Next steps