fix links

This commit is contained in:
Eugene Yurtsev
2025-06-16 15:46:18 -04:00
parent e777244c77
commit 1eb0c2cdb8
5 changed files with 12 additions and 9 deletions
+4 -1
View File
@@ -1,3 +1,6 @@
JS_LINK_MAP = {
"langgraph.types.interrupt": "https://langchain-ai.github.io/langgraphjs/reference/functions/langgraph.interrupt-2.html",
}
"create_react_agent": "https://langchain-ai.github.io/langgraphjs/reference/functions/langgraph_prebuilt.createReactAgent.html",
"langgraph.types.Command": "https://langchain-ai.github.io/langgraphjs/reference/classes/langgraph.Command.html",
}
+1 -1
View File
@@ -251,7 +251,7 @@ npm install langchain @langchain/langgraph @langchain/anthropic
## 2. Create an agent
Use [`createReactAgent`](/langgraphjs/reference/functions/langgraph_prebuilt.createReactAgent.html) to instantiate an agent:
Use [`createReactAgent`][create_react_agent] to instantiate an agent:
```ts
import { createReactAgent } from "@langchain/langgraph/prebuilt";
-2
View File
@@ -514,6 +514,4 @@ await agent.invoke(
{ configurable: { userId: "user_123" } }
);
```
For more details, see [how to update state from tools](../how-tos/update-state-from-tools.ipynb).
:::
+2 -2
View File
@@ -294,7 +294,7 @@ const agent = createReactAgent({
});
```
1. The [`interrupt` function](/langgraphjs/reference/functions/langgraph.interrupt-1.html) pauses the agent graph at a specific node. In this case, we call `interrupt()` at the beginning of the tool function, which pauses the graph at the node that executes the tool. The information inside `interrupt()` (e.g., tool calls) can be presented to a human, and the graph can be resumed with the user input (tool call approval, edit or feedback).
1. The [`interrupt` function][langgraph.types.interrupt] pauses the agent graph at a specific node. In this case, we call `interrupt()` at the beginning of the tool function, which pauses the graph at the node that executes the tool. The information inside `interrupt()` (e.g., tool calls) can be presented to a human, and the graph can be resumed with the user input (tool call approval, edit or feedback).
2. The `InMemorySaver` is used to store the agent state at every step in the tool calling loop. This enables [short-term memory](./memory.md#short-term-memory) and [human-in-the-loop](./human-in-the-loop.md) capabilities. In this example, we use `InMemorySaver` to store the agent state in memory. In a production application, the agent state will be stored in a database.
3. Initialize the agent with the `checkpointer`.
@@ -336,7 +336,7 @@ for await (const chunk of await agent.stream(
};
```
1. The [`interrupt` function](/langgraphjs/reference/functions/langgraph.interrupt-1.html) is used in conjunction with the [`Command`](/langgraphjs/reference/classes/langgraph.Command.html) object to resume the graph with a value provided by the human.
1. The [`interrupt` function][langgraph.types.interrupt] is used in conjunction with the [`Command`][langgraph.types.Command] object to resume the graph with a value provided by the human.
:::
+5 -3
View File
@@ -201,7 +201,7 @@ document$.subscribe(initializeWidget);
The high-level components are organized into several packages, each with a specific focus.
| Package | Description | Installation |
| ------------------------ | --------------------------------------------------------------------------- | -------------------------------------------------- |
|--------------------------|-----------------------------------------------------------------------------|----------------------------------------------------|
| `langgraph` | Prebuilt components to [**create agents**](./agents.md) | `npm install @langchain/langgraph @langchain/core` |
| `langgraph-supervisor` | Tools for building [**supervisor**](./multi-agent.md#supervisor) agents | `npm install @langchain/langgraph-supervisor` |
| `langgraph-swarm` | Tools for building a [**swarm**](./multi-agent.md#swarm) multi-agent system | `npm install @langchain/langgraph-swarm` |
@@ -210,7 +210,7 @@ The high-level components are organized into several packages, each with a speci
## Visualize an agent graph
Use the following tool to visualize the graph generated by [`createReactAgent`](/langgraphjs/reference/functions/langgraph_prebuilt.createReactAgent.html) and to view an outline of the corresponding code. It allows you to explore the infrastructure of the agent as defined by the presence of:
Use the following tool to visualize the graph generated by [`createReactAgent`][create_react_agent] and to view an outline of the corresponding code. It allows you to explore the infrastructure of the agent as defined by the presence of:
- [`tools`](./tools.md): A list of tools (functions, APIs, or other callable objects) that the agent can use to perform tasks.
- `preModelHook`: A function that is called before the model is invoked. It can be used to condense messages or perform other preprocessing tasks.
@@ -234,7 +234,9 @@ Use the following tool to visualize the graph generated by [`createReactAgent`](
</div>
</div>
The following code snippet shows how to create the above agent (and underlying graph) with [`createReactAgent`](/langgraphjs/reference/functions/langgraph_prebuilt.createReactAgent.html):
The following code snippet shows how to create the above agent (and underlying graph) with [`createReactAgent`][create_react_agent]:
```typescript
<div class="language-typescript">
<pre><code id="agent-code" class="language-typescript"></code></pre>