diff --git a/README.md b/README.md index 5a3db2a06..0233bc5bc 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ ## Overview [LangGraph](https://langchain-ai.github.io/langgraph/) is a library for building stateful, multi-actor applications with LLMs. -Inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/), LangGraph lets you coordinate and checkpoint multiple chains (or actors) across cyclic computational steps using regular python functions (or [JS]()). -The current public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). +Inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/), LangGraph lets you coordinate and checkpoint multiple chains (or actors) across cyclic computational steps using regular python functions (or [JS](https://github.com/langchain-ai/langgraphjs)). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). The main use is for adding **cycles** and **persistance** to your LLM application. If you only need quick Directed Acyclic Graphs (DAGs), you can already accomplish this using [LangChain Expression Language](https://python.langchain.com/docs/expression_language/). diff --git a/docs/docs/reference/checkpoints.md b/docs/docs/reference/checkpoints.md index 926cbbecb..bc653e4c2 100644 --- a/docs/docs/reference/checkpoints.md +++ b/docs/docs/reference/checkpoints.md @@ -1,6 +1,6 @@ # Checkpoints -You can [compile](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.MessageGraph.compile) any LangGraph workflow with a [CheckPointer]() to give your agent "memory" by persisting its state. This permits things like: +You can [compile](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.MessageGraph.compile) any LangGraph workflow with a [CheckPointer](https://langchain-ai.github.io/langgraph/reference/checkpoints/#checkpoint) to give your agent "memory" by persisting its state. This permits things like: - Remembering things across multiple interactions - Interrupting to wait for user input diff --git a/docs/docs/tutorials/index.md b/docs/docs/tutorials/index.md index 9229e0914..56f151360 100644 --- a/docs/docs/tutorials/index.md +++ b/docs/docs/tutorials/index.md @@ -8,22 +8,6 @@ Learn the basics of LangGraph through the onboarding tutorials. - [Introduction to LangGraph](introduction.ipynb) - -## AgentExecutor - -Learn to build a simple agent in LangGraph. - -- [Base](agent_executor/base.ipynb): Learn to build a LangGraph agent "from scratch" -- [High-Level](agent_executor/high-level.ipynb): Learn to use the `create_agent_executor` - -## Chat Agent Executor - -Learn to build a simple chat agent executor, which is a basic graph with an agentic loop that also supports dialog with a user. - -- [Base](chat_agent_executor_with_function_calling/base.ipynb): Build a chat agent executor with function calling -- [High-Level](chat_agent_executor_with_function_calling/high-level.ipynb): Using the high-level chat agent executor API -- [High-Level Tools](chat_agent_executor_with_function_calling/high-level-tools.ipynb): Integrating tools into the high-level chat agent executor - ## Use cases Learn from example implementations of graphs designed for specific scenarios and that implement common design patterns. @@ -33,7 +17,6 @@ Learn from example implementations of graphs designed for specific scenarios and - [Customer Support](customer-support/customer-support.ipynb): Build a customer support chatbot to manage flights, hotel reservations, car rentals, and other tasks - [Info Gathering](chatbots/information-gather-prompting.ipynb): Build an information gathering chatbot - [Code Assistant](code_assistant/langgraph_code_assistant.ipynb): Building a code analysis and generation assistant -- [Web Navigation](web-navigation/web_voyager.ipynb): Building an agent that can navigate and interact with websites #### Multi-Agent Systems @@ -52,7 +35,6 @@ Learn from example implementations of graphs designed for specific scenarios and - [Corrective RAG with local models](rag/langgraph_crag_local.ipynb) - [Self-RAG](rag/langgraph_self_rag.ipynb) - [Self-RAG with local models](rag/langgraph_self_rag_local.ipynb) - - [Web Research (STORM)](storm/storm.ipynb): Generating Wikipedia-like articles via research and multi-perspective QA @@ -69,11 +51,16 @@ Learn from example implementations of graphs designed for specific scenarios and - [Language Agent Tree Search](lats/lats.ipynb): Using reflection and rewards to drive a tree search over agents - [Self-Discovering Agent](self-discover/self-discover.ipynb): Analyzing an agent that learns about its own capabilities +#### Evaluation + +- [Agent-based](chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb): Evaluating chatbots via simulated user interactions +- [Within LangSmith](chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb): Evaluating chatbots in LangSmith over a dialog dataset + #### Competitve Programming - [Can Language Models Solve Olympiad Programming?](usaco/usaco.ipynb): Build an agent with few-shot "episodic memory" and human-in-the-loop collaboration to solve problems from the USA Computing Olympiad; adapted from the [paper of the same name](https://arxiv.org/abs/2404.10952v1) by Shi, Tang, Narasimhan, and Yao. -#### Evaluation -- [Agent-based](chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb): Evaluating chatbots via simulated user interactions -- [Dataset-based](chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb): Evaluating chatbots in LangSmith over a dialog dataset \ No newline at end of file +#### Other Experimental Architectures + +- [Web Navigation](web-navigation/web_voyager.ipynb): Building an agent that can navigate and interact with websites \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 3e150b1dd..1ba03592f 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -89,19 +89,11 @@ nav: - Tutorials: - 'tutorials/index.md' - Introduction: tutorials/introduction.ipynb - - Agent Executor: - - "Base": tutorials/agent_executor/base.ipynb - - "High-Level": tutorials/agent_executor/high-level.ipynb - - Chat Agent Executor: - - "Base": tutorials/chat_agent_executor_with_function_calling/base.ipynb - - "High-Level": tutorials/chat_agent_executor_with_function_calling/high-level.ipynb - - "Tool Node": tutorials/chat_agent_executor_with_function_calling/prebuilt-tool-node.ipynb - - "High-Level Tools": tutorials/chat_agent_executor_with_function_calling/high-level-tools.ipynb - Use cases: - Chatbots: - Customer Support: tutorials/customer-support/customer-support.ipynb - Info Gathering: tutorials/chatbots/information-gather-prompting.ipynb - - Code Assistant: tutorials/code_assistant/langgraph_code_assistant.ipynb + - Code Assistant: tutorials/code_assistant/langgraph_code_assistant.ipynb - Multi-Agent Systems: - Collaboration: tutorials/multi_agent/multi-agent-collaboration.ipynb - Supervision: tutorials/multi_agent/agent_supervisor.ipynb diff --git a/langgraph/checkpoint/memory.py b/langgraph/checkpoint/memory.py index 2230d57a2..01c20e1d8 100644 --- a/langgraph/checkpoint/memory.py +++ b/langgraph/checkpoint/memory.py @@ -22,6 +22,7 @@ class MemorySaver(BaseCheckpointSaver): serde (Optional[SerializerProtocol]): The serializer to use for serializing and deserializing checkpoints. Defaults to None. Examples: + import asyncio from langgraph.checkpoint.memory import MemorySaver