Support for createSupervisor in web browser environments #193

Closed
opened 2026-02-15 17:17:07 -05:00 by yindo · 4 comments
Owner

Originally created by @xugaoliang on GitHub (Mar 10, 2025).

I'm trying to use createSupervisor from @langchain/langgraph-supervisor in a web browser environment, but it fails because getCurrentTaskInput relies on async_hooks, which is not supported in browsers (as noted in the docs: "It also requires async_hooks support, which is supported in many popular JavaScript environments... but not all of them (mainly web browsers)").

Environment

"@langchain/core": "^0.3.42",
"@langchain/langgraph": "^0.2.54",
"@langchain/langgraph-checkpoint": "^0.0.15",
"@langchain/langgraph-supervisor": "^0.0.9",
"@langchain/openai": "^0.4.4",

Question

Is there a version or workaround for createSupervisor that works in web browsers? If not, are there plans to add browser-compatible support in the future? I’d love to use this functionality in a browser-based application.

Reference

LangGraph docs: getCurrentTaskInput compatibility

Originally created by @xugaoliang on GitHub (Mar 10, 2025). I'm trying to use `createSupervisor` from `@langchain/langgraph-supervisor` in a web browser environment, but it fails because `getCurrentTaskInput` relies on `async_hooks`, which is not supported in browsers (as noted in the docs: "It also requires async_hooks support, which is supported in many popular JavaScript environments... but not all of them (mainly web browsers)"). ## Environment "@langchain/core": "^0.3.42", "@langchain/langgraph": "^0.2.54", "@langchain/langgraph-checkpoint": "^0.0.15", "@langchain/langgraph-supervisor": "^0.0.9", "@langchain/openai": "^0.4.4", ## Question Is there a version or workaround for `createSupervisor` that works in web browsers? If not, are there plans to add browser-compatible support in the future? I’d love to use this functionality in a browser-based application. ## Reference LangGraph docs: [getCurrentTaskInput compatibility](https://langchain-ai.github.io/langgraphjs/how-tos/pass-run-time-values-to-tools/#the-getcurrenttaskinput-utility-function)
yindo closed this issue 2026-02-15 17:17:07 -05:00
Author
Owner

@GeekMubai commented on GitHub (Mar 10, 2025):

太需要了 求支持一下!@benjamincburns

@GeekMubai commented on GitHub (Mar 10, 2025): 太需要了 求支持一下!@benjamincburns
Author
Owner

@GeekMubai commented on GitHub (Mar 10, 2025):

please , we need help @vbarda @benjamincburns
我尝试了很久 也尝试过 https://langchain-ai.github.io/langgraphjs/how-tos/pass-run-time-values-to-tools/#the-getcurrenttaskinput-utility-function
但是没有解决这个问题 可能还是太笨了, 可以帮助我们能在web浏览器使用langgraph-supervisor吗?

@GeekMubai commented on GitHub (Mar 10, 2025): please , we need help @vbarda @benjamincburns 我尝试了很久 也尝试过 https://langchain-ai.github.io/langgraphjs/how-tos/pass-run-time-values-to-tools/#the-getcurrenttaskinput-utility-function 但是没有解决这个问题 可能还是太笨了, 可以帮助我们能在web浏览器使用langgraph-supervisor吗?
Author
Owner

@benjamincburns commented on GitHub (Mar 13, 2025):

@GeekMubai 请不要发表对理解问题没有帮助的评论。

我们知道这个问题,并且正在研究可能的支持方案,但目前 langgraph-supervisor 需要一个支持 AsyncLocalStorage 的执行环境。


@GeekMubai Please refrain from writing comments that don't help us to understand the issue in some way.

We're aware of this issue and looking into ways that we might support it, but at the moment langgraph-supervisor requires an execution environment that supports AsyncLocalStorage.

@benjamincburns commented on GitHub (Mar 13, 2025): @GeekMubai 请不要发表对理解问题没有帮助的评论。 我们知道这个问题,并且正在研究可能的支持方案,但目前 `langgraph-supervisor` 需要一个支持 `AsyncLocalStorage` 的执行环境。 --- @GeekMubai Please refrain from writing comments that don't help us to understand the issue in some way. We're aware of this issue and looking into ways that we might support it, but at the moment `langgraph-supervisor` requires an execution environment that supports `AsyncLocalStorage`.
Author
Owner

@benjamincburns commented on GitHub (Mar 25, 2025):

这个问题已在 #879 下追踪。


Tracking this under #879.

@benjamincburns commented on GitHub (Mar 25, 2025): 这个问题已在 #879 下追踪。 --- Tracking this under #879.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#193