Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/red-ladybugs-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@langchain/langgraph": patch
---

fix(createReactAgent): update deprecation messages to contain reactAgent
6 changes: 3 additions & 3 deletions libs/langgraph-swarm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export OPENAI_API_KEY=<your_api_key>
```ts
import { z } from "zod";
import { ChatOpenAI } from "@langchain/openai";
import { tool, createReactAgent } from "langchain";
import { tool, createAgent } from "langchain";
import { MemorySaver } from "@langchain/langgraph";
import { createSwarm, createHandoffTool } from "@langchain/langgraph-swarm";

Expand All @@ -48,14 +48,14 @@ const add = tool(
);

// Create agents with handoff tools
const alice = createReactAgent({
const alice = createAgent({
llm: model,
tools: [add, createHandoffTool({ agentName: "Bob" })],
name: "Alice",
prompt: "You are Alice, an addition expert."
});

const bob = createReactAgent({
const bob = createAgent({
llm: model,
tools: [createHandoffTool({
agentName: "Alice",
Expand Down
4 changes: 2 additions & 2 deletions libs/langgraph/src/prebuilt/react_agent_executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ type ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> =

/**
* @deprecated `CreateReactAgentParams` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.
* Update your import to `import { CreateReactAgentParams } from "langchain";`
* Update your import to `import { CreateAgentParams } from "langchain";`
*/
export type CreateReactAgentParams<
A extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot,
Expand Down Expand Up @@ -623,7 +623,7 @@ export type CreateReactAgentParams<

/**
* @deprecated `createReactAgent` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.
* Update your import to `import { createReactAgent } from "langchain";`
* Update your import to `import { createAgent } from "langchain";`
*
* Creates a StateGraph agent that relies on a chat model utilizing tool calling.
*
Expand Down
Loading