Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for createSupervisor in web browser environments #974

Open
xugaoliang opened this issue Mar 10, 2025 · 3 comments
Open

Support for createSupervisor in web browser environments #974

xugaoliang opened this issue Mar 10, 2025 · 3 comments

Comments

@xugaoliang
Copy link

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

@GeekMubai
Copy link

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

@GeekMubai
Copy link

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吗?

@benjamincburns
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants