avatarLaxfed Paulacy

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1883

Abstract

e represented as an edge. The control flow is managed by edges, and they communicate by adding to the graph’s state.</p><h2 id="6443">Benefits of multi-agent designs</h2><ul><li>Grouping tools/responsibilities can give better results.</li><li>Separate prompts can give better results.</li><li>Helpful conceptual model to develop.</li></ul><p id="e18c">Multi-agent designs allow you to divide complicated problems into tractable units of work that can be targeted by specialized agents and LLM programs.</p><h2 id="448c">Multi-agent examples</h2><h2 id="3122">Example 1: Multi Agent Collaboration</h2><p id="21a0">In this example, different agents collaborate on a shared scratchpad of messages. This means that all the work either of them do is visible to the other. This has the benefit that other agents can see all the individual steps done. The main thing controlling the state transitions is the router, which is a rule-based router.</p><h2 id="c95a">Example 2: Agent Supervisor</h2><p id="0613">In this example, multiple agents are connected, but they do not share a shared scratchpad. Rather, they have their own independent scratchpads, and then their final responses are appended to a global scratchpad. An agent supervisor is responsible for routing to individual agents.</p><h2 id="38ba">Example 3: Hierarchical Agent Teams</h2><p id="882b">This example is similar to the previous one, but now the agents in the nodes are actually other <code>langgraph</code> objects themselves. This provides even more flexibility than using LangChain AgentExecutor as the agent runtime. A supervisor agent connects them.</p><h2 id="60a2">Third Party Applications</h2><p id="6f7a">Two third-party applications built on top of LangGraph that utilize the concept of multiple agents are GPT-Newspaper and CrewAI.</p><p id="def7">The GPT-Newspaper is an innovative autonomous agent designed t

Options

o create personalized newspapers tailored to user preferences. CrewAI orchestrates autonomous AI agents, enabling them to collaborate and execute complex tasks efficiently.</p><h2 id="f801">Conclusion</h2><p id="3c24">LangGraph is a powerful framework for creating multi-agent workflows. It provides a graph-based approach to represent independent agents and their connections, enabling developers to build complex and scalable multi-agent systems.</p><p id="3f83">With code examples and practical use cases, LangGraph empowers developers to leverage the benefits of multi-agent designs in their language model workflows. Whether it’s collaborative tasks, agent supervision, or hierarchical agent teams, LangGraph provides the tools and flexibility for building advanced multi-agent workflows.</p><div id="50cc" class="link-block"> <a href="https://readmedium.com/langchain-unleashed-future-of-ai-agent-teams-6447fc2cc348"> <div> <div> <h2>LANGCHAIN — Unleashed Future of AI Agent Teams?</h2> <div><h3>Without requirements or design, programming is the art of adding bugs to an empty text file. — Louis Srygley</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*nu7ZXSdSXeo6aCLEJYoZpg.jpeg)"></div> </div> </div> </a> </div><p id="1e50">In addition, LangGraph’s integration with the LangChain ecosystem and support from the community make it an ideal choice for developing and deploying multi-agent workflows in AI applications.</p><p id="5f8c">In summary, the concept of multi-agent workflows, in combination with LangGraph, opens up new possibilities for creating intelligent and collaborative AI systems.</p></article></body>

LANGCHAIN — LangGraph Multi-Agent Workflows

The Web does not just connect machines, it connects people. — Tim Berners-Lee

LangGraph is a powerful tool for enabling the creation of LLM workflows containing cycles, such as multi-agent workflows. In this article, we will cover the concept of multi-agent workflows, their benefits, and provide code examples of three concrete use cases using LangGraph for multi-agent workflows.

What is “multi-agent”?

When we refer to “multi-agent”, we are discussing multiple independent actors powered by language models connected in a specific way. Each agent can have its own prompt, LLM, tools, and other custom code to collaborate with the other agents. This concept is well-suited to a graph representation, which LangGraph provides. In this approach, each agent is a node in the graph, and their connections are represented as an edge. The control flow is managed by edges, and they communicate by adding to the graph’s state.

Benefits of multi-agent designs

  • Grouping tools/responsibilities can give better results.
  • Separate prompts can give better results.
  • Helpful conceptual model to develop.

Multi-agent designs allow you to divide complicated problems into tractable units of work that can be targeted by specialized agents and LLM programs.

Multi-agent examples

Example 1: Multi Agent Collaboration

In this example, different agents collaborate on a shared scratchpad of messages. This means that all the work either of them do is visible to the other. This has the benefit that other agents can see all the individual steps done. The main thing controlling the state transitions is the router, which is a rule-based router.

Example 2: Agent Supervisor

In this example, multiple agents are connected, but they do not share a shared scratchpad. Rather, they have their own independent scratchpads, and then their final responses are appended to a global scratchpad. An agent supervisor is responsible for routing to individual agents.

Example 3: Hierarchical Agent Teams

This example is similar to the previous one, but now the agents in the nodes are actually other langgraph objects themselves. This provides even more flexibility than using LangChain AgentExecutor as the agent runtime. A supervisor agent connects them.

Third Party Applications

Two third-party applications built on top of LangGraph that utilize the concept of multiple agents are GPT-Newspaper and CrewAI.

The GPT-Newspaper is an innovative autonomous agent designed to create personalized newspapers tailored to user preferences. CrewAI orchestrates autonomous AI agents, enabling them to collaborate and execute complex tasks efficiently.

Conclusion

LangGraph is a powerful framework for creating multi-agent workflows. It provides a graph-based approach to represent independent agents and their connections, enabling developers to build complex and scalable multi-agent systems.

With code examples and practical use cases, LangGraph empowers developers to leverage the benefits of multi-agent designs in their language model workflows. Whether it’s collaborative tasks, agent supervision, or hierarchical agent teams, LangGraph provides the tools and flexibility for building advanced multi-agent workflows.

In addition, LangGraph’s integration with the LangChain ecosystem and support from the community make it an ideal choice for developing and deploying multi-agent workflows in AI applications.

In summary, the concept of multi-agent workflows, in combination with LangGraph, opens up new possibilities for creating intelligent and collaborative AI systems.

Langchain
Langgraph
ChatGPT
Multi Agent
Recommended from ReadMedium