Skip to content

Commit

Permalink
Merge branch 'juno/firebase-checkpoint-saver' of https://github.com/j…
Browse files Browse the repository at this point in the history
…uuunoz/langgraphjs into juno/firebase-checkpoint-saver
  • Loading branch information
trollboss2572 committed Nov 29, 2024
2 parents db6345a + 51bc03f commit cd204ee
Show file tree
Hide file tree
Showing 45 changed files with 820 additions and 272 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ concurrency:
jobs:
deploy:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.MKDOCS_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -36,6 +38,7 @@ jobs:
pip install uv
uv venv
uv pip install -r docs/docs-requirements.txt
uv pip install "git+https://${GITHUB_TOKEN}@github.com/langchain-ai/mkdocs-material-insiders.git"
- name: Use Node.js 18.x
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Is there anything else you'd like to know about the weather in New York or any o
<summary>Initialize the model and tools.</summary>

- We use `ChatAnthropic` as our LLM. **NOTE:** We need make sure the model knows that it has these tools available to call. We can do this by converting the LangChain tools into the format for Anthropic tool calling using the `.bindTools()` method.
- We define the tools we want to use -- a weather tool in our case. See the documentation [here](https://js.langchain.com/docs/modules/agents/tools/dynamic) on how to create your own tools.
- We define the tools we want to use -- a weather tool in our case. See the documentation [here](https://js.langchain.com/docs/how_to/custom_tools/) on how to create your own tools.
</details>

2. <details>
Expand Down
3 changes: 1 addition & 2 deletions docs/docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ mkdocs-jupyter
mkdocs-redirects
mkdocs-minify-plugin
mkdocs-rss-plugin
mkdocs-material[imaging]
mkdocs-typedoc
markdown-include
markdown-callouts
markdown-callouts
14 changes: 6 additions & 8 deletions docs/docs/concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ The conceptual guide does not cover step-by-step instructions or specific implem

## LangGraph

**High Level**
### High Level

- [Why LangGraph?](high_level.md): A high-level overview of LangGraph and its goals.

**Concepts**
### Concepts

- [LangGraph Glossary](low_level.md): LangGraph workflows are designed as graphs, with nodes representing different components and edges representing the flow of information between them. This guide provides an overview of the key concepts associated with LangGraph graph primitives.
- [Common Agentic Patterns](agentic_concepts.md): An agent uses an LLM to pick its own control flow to solve more complex problems! Agents are a key building block in many LLM applications. This guide explains the different types of agent architectures and how they can be used to control the flow of an application.
Expand All @@ -41,14 +41,14 @@ The LangGraph Platform offers a few different deployment options described in th
* LangGraph is an MIT-licensed open-source library, which we are committed to maintaining and growing for the community.
* You can always deploy LangGraph applications on your own infrastructure using the open-source LangGraph project without using LangGraph Platform.

**High Level**
### High Level

- [Why LangGraph Platform?](./langgraph_platform.md): The LangGraph platform is an opinionated way to deploy and manage LangGraph applications. This guide provides an overview of the key features and concepts behind LangGraph Platform.
- [Deployment Options](./deployment_options.md): LangGraph Platform offers four deployment options: [Self-Hosted Lite](./self_hosted.md#self-hosted-lite), [Self-Hosted Enterprise](./self_hosted.md#self-hosted-enterprise), [bring your own cloud (BYOC)](./bring_your_own_cloud.md), and [Cloud SaaS](./langgraph_cloud.md). This guide explains the differences between these options, and which Plans they are available on.
- [Plans](./plans.md): LangGraph Platforms offer three different plans: Developer, Plus, Enterprise. This guide explains the differences between these options, what deployment options are available for each, and how to sign up for each one.
- [Template Applications](./template_applications.md): Reference applications designed to help you get started quickly when building with LangGraph.

**Components**
### Components

The LangGraph Platform comprises several components that work together to support the deployment and management of LangGraph applications:

Expand All @@ -58,17 +58,15 @@ The LangGraph Platform comprises several components that work together to suppor
- [Python/JS SDK](./sdk.md): The Python/JS SDK provides a programmatic way to interact with deployed LangGraph Applications.
- [Remote Graph](../how-tos/use-remote-graph.md): A RemoteGraph allows you to interact with any deployed LangGraph application as though it were running locally.

**LangGraph Server**
### LangGraph Server

- [Application Structure](./application_structure.md): A LangGraph application consists of one or more graphs, a LangGraph API Configuration file (`langgraph.json`), a file that specifies dependencies, and environment variables.
- [Assistants](./assistants.md): Assistants are a way to save and manage different configurations of your LangGraph applications.
- [Web-hooks](./langgraph_server.md#webhooks): Webhooks allow your running LangGraph application to send data to external services on specific events.
- [Cron Jobs](./langgraph_server.md#cron-jobs): Cron jobs are a way to schedule tasks to run at specific times in your LangGraph application.
- [Double Texting](./double_texting.md): Double texting is a common issue in LLM applications where users may send multiple messages before the graph has finished running. This guide explains how to handle double texting with LangGraph Deploy.


**Deployment Options**

### Deployment Options

- [Self-Hosted Lite](./self_hosted.md): A free (up to 1 million nodes executed), limited version of LangGraph Platform that you can run locally or in a self-hosted manner
- [Cloud SaaS](./langgraph_cloud.md): Hosted as part of LangSmith.
Expand Down
46 changes: 23 additions & 23 deletions docs/docs/how-tos/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Here you’ll find answers to “How do I...?” types of questions. These guide
LangGraph.js is known for being a highly controllable agent framework.
These how-to guides show how to achieve that controllability.

- [How to define graph state](define-state.ipynb)
- [How to create subgraphs](subgraph.ipynb)
- [How to create branches for parallel execution](branching.ipynb)
- [How to create map-reduce branches for parallel execution](map-reduce.ipynb)

Expand All @@ -34,8 +32,12 @@ LangGraph.js makes it easy to persist state across graph runs. The guides below
- [How to add thread-level persistence to subgraphs](subgraph-persistence.ipynb)
- [How to add cross-thread persistence](cross-thread-persistence.ipynb)
- [How to use a Postgres checkpointer for persistence](persistence-postgres.ipynb)

### Memory

LangGraph makes it easy to manage conversation [memory](../concepts/memory.md) in your graph. These how-to guides show how to implement different strategies for that.

- [How to manage conversation history](manage-conversation-history.ipynb)
- [How to view and update past graph state](time-travel.ipynb)
- [How to delete messages](delete-messages.ipynb)
- [How to add summary of the conversation history](add-summary-conversation-history.ipynb)

Expand All @@ -46,21 +48,22 @@ These guides cover common examples of that.

- [How to add breakpoints](breakpoints.ipynb)
- [How to add dynamic breakpoints](dynamic_breakpoints.ipynb)
- [How to wait for user input](wait-user-input.ipynb)
- [How to edit graph state](edit-graph-state.ipynb)
- [How to wait for user input](wait-user-input.ipynb)
- [How to view and update past graph state](time-travel.ipynb)
- [How to review tool calls](review-tool-calls.ipynb)

### Streaming

LangGraph is built to be streaming first.
These guides show how to use different streaming modes.

- [How to stream full state of your graph](stream-values.ipynb)
- [How to stream the full state of your graph](stream-values.ipynb)
- [How to stream state updates of your graph](stream-updates.ipynb)
- [How to configure multiple streaming modes](stream-multiple.ipynb)
- [How to stream LLM tokens](stream-tokens.ipynb)
- [How to stream LLM tokens without LangChain models](streaming-tokens-without-langchain.ipynb)
- [How to stream custom data](streaming-content.ipynb)
- [How to configure multiple streaming modes](stream-multiple.ipynb)
- [How to stream events from within a tool](streaming-events-from-within-tools.ipynb)
- [How to stream from the final node](streaming-from-final-node.ipynb)

Expand All @@ -73,21 +76,25 @@ These guides show how to use different streaming modes.

### Subgraphs

[Subgraphs](../concepts/low_level.md#subgraphs) allow you to reuse an existing graph from another graph. These how-to guides show how to use subgraphs:

- [How to add and use subgraphs](subgraph.ipynb)
- [How to view and update state in subgraphs](subgraphs-manage-state.ipynb)
- [How to transform inputs and outputs of a subgraph](subgraph-transform-state.ipynb)

### State management

- [How to define graph state](define-state.ipynb)
- [Have a separate input and output schema](input_output_schema.ipynb)
- [Pass private state between nodes inside the graph](pass_private_state.ipynb)

### Prebuilt ReAct Agent
### Other

- [How to create a ReAct agent](create-react-agent.ipynb)
- [How to add memory to a ReAct agent](react-memory.ipynb)
- [How to add a system prompt to a ReAct agent](react-system-prompt.ipynb)
- [How to add Human-in-the-loop to a ReAct agent](react-human-in-the-loop.ipynb)
- [How to add runtime configuration to your graph](configuration.ipynb)
- [How to add node retries](node-retry-policies.ipynb)
- [How to let agent return tool results directly](dynamically-returning-directly.ipynb)
- [How to have agent respond in structured format](respond-in-format.ipynb)
- [How to manage agent steps](managing-agent-steps.ipynb)

### Prebuilt ReAct Agent

Expand All @@ -96,14 +103,6 @@ These guides show how to use different streaming modes.
- [How to add a system prompt to a ReAct agent](react-system-prompt.ipynb)
- [How to add Human-in-the-loop to a ReAct agent](react-human-in-the-loop.ipynb)

### Other

- [How to add runtime configuration to your graph](configuration.ipynb)
- [How to let agent return tool results directly](dynamically-returning-directly.ipynb)
- [How to have agent respond in structured format](respond-in-format.ipynb)
- [How to manage agent steps](managing-agent-steps.ipynb)
- [How to add node retry policies](node-retry-policies.ipynb)

## LangGraph Platform

This section includes how-to guides for LangGraph Platform.
Expand Down Expand Up @@ -203,8 +202,9 @@ LangGraph Studio is a built-in UI for visualizing, testing, and debugging your a

## Troubleshooting

The [Error Reference](../troubleshooting/errors/index.md) page contains guides around resolving common errors you may find while building with LangGraph. Errors referenced below will have an `lc_error_code` property corresponding to one of the below codes when they are thrown in code.

### Errors
These are the guides for resolving common errors you may find while building with LangGraph. Errors referenced below will have an `lc_error_code` property corresponding to one of the below codes when they are thrown in code.

- [Error reference](../troubleshooting/errors/index.md)
- [GRAPH_RECURSION_LIMIT](../troubleshooting/errors/GRAPH_RECURSION_LIMIT.ipynb)
- [INVALID_CONCURRENT_GRAPH_UPDATE](../troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE.ipynb)
- [INVALID_GRAPH_NODE_RETURN_VALUE](../troubleshooting/errors/INVALID_GRAPH_NODE_RETURN_VALUE.ipynb)
- [MULTIPLE_SUBGRAPHS](../troubleshooting/errors/MULTIPLE_SUBGRAPHS.ipynb)
161 changes: 151 additions & 10 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ theme:
- navigation.instant
- navigation.instant.prefetch
- navigation.instant.progress
- navigation.path
- navigation.prune
- navigation.tabs
- navigation.top
Expand Down Expand Up @@ -65,12 +66,153 @@ plugins:
title_link: "/" # optional, default: '/'

nav:
# Setting the names of the nav items explicitly due to mkdocs
# how-reload being a bit buggy with the names of the tabs.
- Home: "index.md"
- Tutorials: "tutorials/index.md"
- Concepts: "concepts/index.md"
- "How-to Guides": "how-tos/index.md"
- Home: index.md
- Tutorials:
- tutorials/index.md
- Quick Start:
- Quick Start: tutorials#quick-start
- tutorials/quickstart.ipynb
- Chatbots:
- Chatbots: tutorials/chatbots/customer_support_small_model.ipynb
- RAG:
- RAG: tutorials#rag
- tutorials/rag/langgraph_agentic_rag.ipynb
- tutorials/rag/langgraph_crag.ipynb
- tutorials/rag/langgraph_self_rag.ipynb
- Agent Architectures:
- Agent Architectures: tutorials#agent-architectures
- Multi-Agent Systems:
- Multi-Agent Systems: tutorials#multi-agent-systems
- tutorials/multi_agent/multi_agent_collaboration.ipynb
- tutorials/multi_agent/agent_supervisor.ipynb
- tutorials/multi_agent/hierarchical_agent_teams.ipynb
- Planning Agents:
- Planning Agents: tutorials#planning-agents
- tutorials/plan-and-execute/plan-and-execute.ipynb
- Reflection & Critique:
- Reflection & Critique: tutorials#reflection-critique
- tutorials/reflection/reflection.ipynb
- tutorials/rewoo/rewoo.ipynb
- Evaluation & Analysis:
- Evaluation & Analysis: tutorials#evaluation
- tutorials/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb

- How-to Guides:
- how-tos/index.md
- Installation:
- Installation: how-tos#installation
- how-tos/manage-ecosystem-dependencies.ipynb
- how-tos/use-in-web-environments.ipynb
- LangGraph:
- LangGraph: how-tos#langgraph
- Controllability:
- Controllability: how-tos#controllability
- how-tos/map-reduce.ipynb
- how-tos/branching.ipynb
- Persistence:
- Persistence: how-tos#persistence
- how-tos/persistence.ipynb
- how-tos/subgraph-persistence.ipynb
- how-tos/cross-thread-persistence.ipynb
- how-tos/persistence-postgres.ipynb
- Memory:
- Memory: how-tos#memory
- how-tos/manage-conversation-history.ipynb
- how-tos/delete-messages.ipynb
- how-tos/add-summary-conversation-history.ipynb
- Human-in-the-loop:
- Human-in-the-loop: how-tos#human-in-the-loop
- how-tos/breakpoints.ipynb
- how-tos/dynamic_breakpoints.ipynb
- how-tos/edit-graph-state.ipynb
- how-tos/wait-user-input.ipynb
- how-tos/time-travel.ipynb
- how-tos/review-tool-calls.ipynb
- Streaming:
- Streaming: how-tos#streaming
- how-tos/stream-values.ipynb
- how-tos/stream-updates.ipynb
- how-tos/stream-tokens.ipynb
- how-tos/streaming-tokens-without-langchain.ipynb
- how-tos/streaming-content.ipynb
- how-tos/stream-multiple.ipynb
- how-tos/streaming-events-from-within-tools.ipynb
- how-tos/streaming-from-final-node.ipynb
- Tool calling:
- Tool calling: how-tos#tool-calling
- how-tos/tool-calling.ipynb
- how-tos/force-calling-a-tool-first.ipynb
- how-tos/tool-calling-errors.ipynb
- how-tos/pass-run-time-values-to-tools.ipynb
- Subgraphs:
- Subgraphs: how-tos#subgraphs
- how-tos/subgraph.ipynb
- how-tos/subgraphs-manage-state.ipynb
- how-tos/subgraph-transform-state.ipynb
- State Management:
- State Management: how-tos#state-management
- how-tos/define-state.ipynb
- how-tos/input_output_schema.ipynb
- how-tos/pass_private_state.ipynb
- Other:
- Other: how-tos#other
- how-tos/configuration.ipynb
- how-tos/node-retry-policies.ipynb
- how-tos/dynamically-returning-directly.ipynb
- how-tos/respond-in-format.ipynb
- how-tos/managing-agent-steps.ipynb
- Prebuilt ReAct Agent:
- Prebuilt ReAct Agent: how-tos#prebuilt-react-agent
- how-tos/create-react-agent.ipynb
- how-tos/react-memory.ipynb
- how-tos/react-system-prompt.ipynb
- how-tos/react-human-in-the-loop.ipynb
- Troubleshooting:
- Troubleshooting: how-tos#troubleshooting
- troubleshooting/errors/index.md
- troubleshooting/errors/GRAPH_RECURSION_LIMIT.ipynb
- troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE.ipynb
- troubleshooting/errors/INVALID_GRAPH_NODE_RETURN_VALUE.ipynb
- troubleshooting/errors/MULTIPLE_SUBGRAPHS.ipynb

- Conceptual Guides:
- concepts/index.md
- LangGraph:
- LangGraph: concepts#langgraph
- concepts/high_level.md
- concepts/low_level.md
- concepts/agentic_concepts.md
- concepts/multi_agent.md
- concepts/human_in_the_loop.md
- concepts/persistence.md
- concepts/memory.md
- concepts/streaming.md
- concepts/faq.md
- LangGraph Platform:
- LangGraph Platform: concepts#langgraph-platform
- High Level:
- High Level: concepts#high-level
- concepts/langgraph_platform.md
- concepts/deployment_options.md
- concepts/plans.md
- concepts/template_applications.md
- Components:
- Components: concepts#components
- concepts/langgraph_server.md
- concepts/langgraph_studio.md
- concepts/langgraph_cli.md
- concepts/sdk.md
- how-tos/use-remote-graph.md
- LangGraph Server:
- LangGraph Server: concepts#langgraph-server
- concepts/application_structure.md
- concepts/assistants.md
- concepts/double_texting.md
- Deployment Options:
- Deployment Options: concepts#deployment-options
- concepts/self_hosted.md
- concepts/langgraph_cloud.md
- concepts/bring_your_own_cloud.md
- "Reference":
- "reference/index.html"
- "Versions":
Expand Down Expand Up @@ -148,7 +290,6 @@ validation:
omitted_files: ignore
# absolute_links: warn
unrecognized_links: warn
nav:
not_found: warn
links:
not_found: warn
anchors: info
# this is needed to handle headers with anchors for nav
not_found: info
11 changes: 11 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
color: #1E88E5;
}

.md-sidebar {
display: none;
}

/* Show sidebar on mobile */
@media screen and (max-width: 1220px) {
.md-sidebar--primary {
display: block;
}
}

.md-typeset a:hover {
color: #1565C0;
}
Expand Down
Loading

0 comments on commit cd204ee

Please sign in to comment.