ement this type of design.

  * [ Basic Reflection ](https://github.com/langchain-ai/langgraph/tree/main/examples/reflection/reflection.ipynb) : add a simple "reflect" step in your graph to prompt your system to revise its outputs. 
  * [ Reflexion ](https://github.com/langchain-ai/langgraph/tree/main/examples/reflexion/reflexion.ipynb) : critique missing and superflous aspects of the agent's response to guide subsequent steps. Based on [ Reflexion ](https://arxiv.org/abs/2303.11366) , by Shinn, et. al. 
  * [ Language Agent Tree Search ](https://github.com/langchain-ai/langgraph/tree/main/examples/lats/lats.ipynb) : execute multiple agents in parallel, using reflection and environmental rewards to drive a Monte Carlo Tree Search. Based on [ LATS ](https://arxiv.org/abs/2310.04406) , by Zhou, et. al. 

###  Multi-agent Examples  ​

  * [ Multi-agent collaboration ](https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/multi-agent-collaboration.ipynb) : how to create two agents that work together to accomplish a task 
  * [ Multi-agent with supervisor ](https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/agent_supervisor.ipynb) : how to orchestrate individual agents by using an LLM as a "supervisor" to distribute work 
  * [ Hierarchical agent teams ](https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/hierarchical_agent_teams.ipynb) : how to orchestrate "teams" of agents as nested graphs that can collaborate to solve a problem 

###  Web Research  ​

  * [ STORM ](https://github.com/langchain-ai/langgraph/tree/main/examples/storm/storm.ipynb) : writing system that generates Wikipedia-style articles on any topic, applying outline generation (planning) + multi-perspective question-answering for added breadth and reliability. Based on [ STORM ](https://arxiv.org/abs/2402.14207) by Shao, et. al. 

###  Chatbot Evaluation via Simulation  ​

It can often be tough to evaluation chat bots in multi-turn situations. One
way to do this is with simulations.

  * [ Chat bot evaluation as multi-agent simulation ](https://github.com/langchain-ai/langgraph/blob/main/examples/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb) : how to simulate a dialogue between a "virtual user" and your chat bot 
  * [ Evaluating over a dataset ](https://github.com/langchain-ai/langgraph/tree/main/examples/chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb) : benchmark your assistant over a LangSmith dataset, which tasks a simulated customer to red-team your chat bot. 

###  Multimodal Examples  ​

  * [ WebVoyager ](https://github.com/langchain-ai/langgraph/blob/main/examples/web-navigation/web_voyager.ipynb) : vision-enabled web browsing agent that uses [ Set-of-marks ](https://som-gpt4v.github.io/) prompting to navigate a web browser and execute tasks 

###  [ Chain-of-Table ](https://github.com/CYQIQ/MultiCoT) ​

[ Chain of Table ](https://arxiv.org/abs/2401.04398) is a framework that
elicits SOTA performance when answering questions over tabular data. [ This
implementation ](https://github.com/CYQIQ/MultiCoT) by Github user [ CYQIQ
](https://github.com/CYQIQ) uses LangGraph to control the flow.

##  Documentation  ​

There are only a few new APIs to use.

###  StateGraph  ​

The main entrypoint is ` StateGraph ` .

    
    
    from langgraph.graph import StateGraph  
    

This class is responsible for constructing the graph. It exposes an interface
inspired by [ NetworkX ](https://networkx.org/documentation/latest/) . This
graph is parameterized by a state object that it passes around to each node.

####  ` __init__ ` ​

    
    
        def __init__(self, schema: Type[Any]) -> None:  
    

When constructing the graph, you need to pass in a schema for a state. Each
node then returns operations to update that state. These operations can either
SET specific attributes on the state (e.g. overwrite the existing values) or
ADD to the existing attribute. Whet