Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

DOC: How to add subgraphs? #125

Closed
lee0v0 opened this issue Feb 20, 2024 · 4 comments
Closed

DOC: How to add subgraphs? #125

lee0v0 opened this issue Feb 20, 2024 · 4 comments

Comments

@lee0v0
Copy link

lee0v0 commented Feb 20, 2024

Issue with current documentation:

I seem to have not found the related content on adding subgraphs in the documentation. For example, if there are three subgraphs that are three modules, how do I connect these subgraphs together?

Idea or request for content:

I currently have three subgraphs: the message summary subgraph, the self-rag subgraph, and the tool invocation subgraph. Each subgraph is a module. How do I piece together the subgraphs of the three modules?

@hinthornw
Copy link
Contributor

We have an example of this here: https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/hierarchical_agent_teams.ipynb

But will keep this issue open as we should improve our documentation of it

@russell-dot-js
Copy link

russell-dot-js commented Feb 22, 2024

Some clear docs outside of a full blown example would be awesome! When reading through that full blown implementation, it can be hard to find the important parts.

Building on the example given above, it would be great to see some concise documentation showing how research_graph has its own ResearchTeamState, the authoring_graph has its DocWritingState, and how the super_graph orchestrates between the two of them, only passing the relevant state from its SuperState. To really illustrate how this works, it would be nice if the super_graph in this example had a more complex state than just "messages", for example:

SuperState:
  research_states: list[ResearchState]
  authoring_states: list[DocWritingState]
  # add messages, whatever else

Then it would be easy to illustrate how the supervisor_node adds to either the research_states or authoring_states and then how the super_graph delegates to the correct subgraph with only its state

@hinthornw
Copy link
Contributor

Added an example #194

We will work to add better native support for composition, so I'll leave this ticket open for now

@arthurGrigo
Copy link

At the end of the example it looks like the 'Research team' is called multiple times and replies with the same response. Do I get something wrong or is this intended to show how suboptimal it works?

@langchain-ai langchain-ai locked and limited conversation to collaborators May 15, 2024
@hinthornw hinthornw converted this issue into discussion #462 May 15, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants