Feature request: Export the Topic channel class #194

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

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

This class seems to be part of the public API in the python langgraph package, and it would be a very good fit for my channel, but there doesn't seem to be a way to use it in JS.

Originally created by @ethanresnick on GitHub (Mar 10, 2025). This class seems to be part of the public API in the python langgraph package, and it would be a very good fit for my channel, but there doesn't seem to be a way to use it in JS.
yindo added the enhancement label 2026-02-15 17:17:07 -05:00
yindo closed this issue 2026-02-15 17:17:07 -05:00
Author
Owner

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

@ethanresnick can you share a bit more detail about your use case, please? What problem are you trying to solve, and how would Topic solve it better than other options?

@benjamincburns commented on GitHub (Mar 13, 2025): @ethanresnick can you share a bit more detail about your use case, please? What problem are you trying to solve, and how would `Topic` solve it better than other options?
Author
Owner

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

@benjamincburns Sure. I have a node that dynamically determines a set of tasks to run, where each task has it's own node in the graph as well. So, the task router node returns a new Command({ goto: listOfSends })s to invoke the task nodes with task-specific input. Then, each task produces an output, and has an edge to a node whose job is to aggregate all the task outputs. I want to use Topic as the type of the channel that the aggregator node uses to receive all the task outputs from the prior step.

@ethanresnick commented on GitHub (Mar 13, 2025): @benjamincburns Sure. I have a node that dynamically determines a set of tasks to run, where each task has it's own node in the graph as well. So, the task router node returns a `new Command({ goto: listOfSends })`s to invoke the task nodes with task-specific input. Then, each task produces an output, and has an edge to a node whose job is to aggregate all the task outputs. I want to use `Topic` as the type of the channel that the aggregator node uses to receive all the task outputs from the prior step.
Author
Owner

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

It's basically the standard map-reduce case, except that I want the task outputs to be transient (i.e., gone from the state on the next turn/downstream step) so that, next time this process runs, I'm only looking at new task outputs. And Topic seems good for that, compared to aggregating to an array.

@ethanresnick commented on GitHub (Mar 13, 2025): It's basically the standard map-reduce case, except that I want the task outputs to be transient (i.e., gone from the state on the next turn/downstream step) so that, next time this process runs, I'm only looking at _new_ task outputs. And `Topic` seems good for that, compared to aggregating to an array.
Author
Owner

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

Thanks! I checked with another member of the team, and we agree that it'd be good to bring this feature to JS! I can't say when exactly we'll be able to get to this, but I'll add it to the list!

@benjamincburns commented on GitHub (Mar 13, 2025): Thanks! I checked with another member of the team, and we agree that it'd be good to bring this feature to JS! I can't say when exactly we'll be able to get to this, but I'll add it to the list!
Author
Owner

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

Thanks @benjamincburns! Can’t wait

@ethanresnick commented on GitHub (Mar 13, 2025): Thanks @benjamincburns! Can’t wait
Author
Owner

@dqbd commented on GitHub (Sep 8, 2025):

Will be now available in 1.0.0, closing this issue!

@dqbd commented on GitHub (Sep 8, 2025): Will be now available in 1.0.0, closing 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#194