Unable to reproduce multi_agent_collaboration.ipynb on cloudflare workers #25

Closed
opened 2026-02-15 17:05:38 -05:00 by yindo · 3 comments
Owner

Originally created by @laurencejennings on GitHub (May 17, 2024).

I've replicated the whole notebook and I'm getting the following error :

Uncaught TypeError: Cannot use 'in' operator to search for 'reducer' in user

This is the code block that causes it:
// This defines the object that is passed between each node // in the graph. We will create different nodes for each agent and tool const agentStateChannels: AgentStateChannels = { messages: { value: (x: BaseMessage[], y: BaseMessage[]) => x.concat(y), default: () => [], }, sender: "user", };

I tried commenting out the sender: "user" line and the error goes away, but I'm not sure if initializing the state without a sender can cause other errors.

I'm excited to use Langgraph, thanks for all the work

Originally created by @laurencejennings on GitHub (May 17, 2024). I've replicated the whole notebook and I'm getting the following error : ` Uncaught TypeError: Cannot use 'in' operator to search for 'reducer' in user` This is the code block that causes it: ` // This defines the object that is passed between each node // in the graph. We will create different nodes for each agent and tool const agentStateChannels: AgentStateChannels = { messages: { value: (x: BaseMessage[], y: BaseMessage[]) => x.concat(y), default: () => [], }, sender: "user", };` I tried commenting out the `sender: "user"` line and the error goes away, but I'm not sure if initializing the state without a sender can cause other errors. I'm excited to use Langgraph, thanks for all the work
yindo closed this issue 2026-02-15 17:05:38 -05:00
Author
Owner

@hokaiyipV0 commented on GitHub (May 29, 2024):

Hello all,

I have tried the following

  // Define the graph
  const workflow = new StateGraph({
    channels: {
      __root__: agentStateChannels,
    },
  });

but then face another issue:

throw new Error("Branch condition returned unknown or null destination");

@hokaiyipV0 commented on GitHub (May 29, 2024): Hello all, I have tried the following ``` // Define the graph const workflow = new StateGraph({ channels: { __root__: agentStateChannels, }, }); ``` but then face another issue: throw new Error("Branch condition returned unknown or null destination");
Author
Owner

@hinthornw commented on GitHub (May 31, 2024):

Hi there, i've updated the doc to hopefully fix this - let me know if you still are running into issues

@hinthornw commented on GitHub (May 31, 2024): Hi there, i've updated the doc to hopefully fix this - let me know if you still are running into issues
Author
Owner

@benjamincburns commented on GitHub (Jan 29, 2025):

Closing, as we haven't had any more reports of this issue.

@benjamincburns commented on GitHub (Jan 29, 2025): Closing, as we haven't had any more reports of this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#25