From 8408ba3a3efacd94615eda0a05a2fdb3dc651106 Mon Sep 17 00:00:00 2001 From: Vadym Barda Date: Thu, 7 Nov 2024 16:33:55 -0500 Subject: [PATCH] docs: add breadcrumbs (#2363) --- .github/workflows/deploy_docs.yml | 12 +- docs/docs/how-tos/index.md | 1 - docs/docs/reference/index.md | 7 + docs/mkdocs.yml | 206 +++++++++++++++++++++++++++++- docs/overrides/main.html | 4 + poetry.lock | 8 +- pyproject.toml | 1 + 7 files changed, 226 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index dfc9bb792..721bb4117 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -44,6 +44,8 @@ jobs: deploy: # needs: run-changed-notebooks runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.MKDOCS_GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 with: @@ -58,8 +60,14 @@ jobs: - name: Install dependencies run: | - poetry install --with test - poetry run pip install -U pytest pytest-check-links langsmith langchain GitPython + poetry install --with test --no-root + poetry run pip install -U \ + pytest \ + pytest-check-links \ + langsmith \ + langchain \ + GitPython \ + "git+https://${GITHUB_TOKEN}@github.com/langchain-ai/mkdocs-material-insiders.git" - name: Lint Docs # This step lints the docs using the existing linting set up. diff --git a/docs/docs/how-tos/index.md b/docs/docs/how-tos/index.md index 4689ebb0a..23e8dc485 100644 --- a/docs/docs/how-tos/index.md +++ b/docs/docs/how-tos/index.md @@ -99,7 +99,6 @@ These how-to guides show common patterns for tool calling with LangGraph: - [How to run graph asynchronously](async.ipynb) - [How to visualize your graph](visualization.ipynb) - [How to add runtime configuration to your graph](configuration.ipynb) -- [How to use a Pydantic model as your state](state-model.ipynb) - [How to add node retries](node-retries.ipynb) - [How to force function calling agent to structure output](react-agent-structured-output.ipynb) - [How to pass custom LangSmith run ID for graph runs](run-id-langsmith.ipynb) diff --git a/docs/docs/reference/index.md b/docs/docs/reference/index.md index e312f97de..dd78c1e8e 100644 --- a/docs/docs/reference/index.md +++ b/docs/docs/reference/index.md @@ -3,6 +3,13 @@ title: Reference description: API reference for LangGraph --- + + + # Reference Welcome to the LangGraph API reference! This reference provides detailed information about the LangGraph API, including classes, methods, and other components. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 15b716744..dba94613f 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -25,6 +25,7 @@ theme: - navigation.sections - navigation.instant.prefetch - navigation.instant.progress + - navigation.path - navigation.prune - navigation.tabs - navigation.tabs.sticky @@ -87,12 +88,205 @@ plugins: filters: - "!^_" 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: + - tutorials/introduction.ipynb + - cloud/quick_start.md + - Chatbots: + - tutorials/customer-support/customer-support.ipynb + - tutorials/chatbots/information-gather-prompting.ipynb + - tutorials/code_assistant/langgraph_code_assistant.ipynb + - RAG: + - tutorials/rag/langgraph_adaptive_rag.ipynb + - tutorials/rag/langgraph_adaptive_rag_local.ipynb + - tutorials/rag/langgraph_agentic_rag.ipynb + - tutorials/rag/langgraph_crag.ipynb + - tutorials/rag/langgraph_crag_local.ipynb + - tutorials/rag/langgraph_self_rag.ipynb + - tutorials/rag/langgraph_self_rag_local.ipynb + - tutorials/sql-agent.ipynb + - Agent Architectures: + - 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: + - tutorials/plan-and-execute/plan-and-execute.ipynb + - tutorials/rewoo/rewoo.ipynb + - tutorials/llm-compiler/LLMCompiler.ipynb + - Reflection & Critique: + - tutorials/reflection/reflection.ipynb + - tutorials/reflexion/reflexion.ipynb + - tutorials/tot/tot.ipynb + - tutorials/lats/lats.ipynb + - tutorials/self-discover/self-discover.ipynb + - Evaluation & Analysis: + - tutorials/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb + - tutorials/chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb + - Experimental: + - tutorials/storm/storm.ipynb + - tutorials/tnt-llm/tnt-llm.ipynb + - tutorials/web-navigation/web_voyager.ipynb + - tutorials/usaco/usaco.ipynb + - tutorials/extraction/retries.ipynb + + - How-to Guides: + - how-tos/index.md + - LangGraph: + - Controllability: + - how-tos/branching.ipynb + - how-tos/map-reduce.ipynb + - how-tos/recursion-limit.ipynb + - Persistence: + - how-tos/persistence.ipynb + - how-tos/subgraph-persistence.ipynb + - how-tos/cross-thread-persistence.ipynb + - how-tos/persistence_postgres.ipynb + - how-tos/persistence_mongodb.ipynb + - how-tos/persistence_redis.ipynb + - Memory: + - how-tos/memory/manage-conversation-history.ipynb + - how-tos/memory/delete-messages.ipynb + - how-tos/memory/add-summary-conversation-history.ipynb + - Human-in-the-loop: + - how-tos/human_in_the_loop/breakpoints.ipynb + - how-tos/human_in_the_loop/dynamic_breakpoints.ipynb + - how-tos/human_in_the_loop/edit-graph-state.ipynb + - how-tos/human_in_the_loop/wait-user-input.ipynb + - how-tos/human_in_the_loop/time-travel.ipynb + - how-tos/human_in_the_loop/review-tool-calls.ipynb + - Streaming: + - how-tos/stream-values.ipynb + - how-tos/stream-updates.ipynb + - how-tos/streaming-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-events-from-within-tools-without-langchain.ipynb + - how-tos/streaming-from-final-node.ipynb + - how-tos/streaming-subgraphs.ipynb + - how-tos/disable-streaming.ipynb + - Tool calling: + - how-tos/tool-calling.ipynb + - how-tos/tool-calling-errors.ipynb + - how-tos/pass-run-time-values-to-tools.ipynb + - how-tos/pass-config-to-tools.ipynb + - how-tos/many-tools.ipynb + - Subgraphs: + - how-tos/subgraph.ipynb + - how-tos/subgraphs-manage-state.ipynb + - how-tos/subgraph-transform-state.ipynb + - State Management: + - how-tos/state-model.ipynb + - how-tos/input_output_schema.ipynb + - how-tos/pass_private_state.ipynb + - Other: + - how-tos/async.ipynb + - how-tos/visualization.ipynb + - how-tos/configuration.ipynb + - how-tos/node-retries.ipynb + - how-tos/react-agent-structured-output.ipynb + - how-tos/run-id-langsmith.ipynb + - how-tos/return-when-recursion-limit-hits.ipynb + - Prebuilt ReAct Agent: + - how-tos/create-react-agent.ipynb + - how-tos/create-react-agent-memory.ipynb + - how-tos/create-react-agent-system-prompt.ipynb + - how-tos/create-react-agent-hitl.ipynb + - how-tos/react-agent-from-scratch.ipynb + - LangGraph Platform: + - Application Structure: + - cloud/deployment/setup.md + - cloud/deployment/setup_pyproject.md + - cloud/deployment/setup_javascript.md + - cloud/deployment/custom_docker.md + - cloud/deployment/test_locally.md + - cloud/deployment/graph_rebuild.md + - Deployment: + - cloud/deployment/cloud.md + - how-tos/deploy-self-hosted.md + - how-tos/use-remote-graph.md + - Assistants: + - cloud/how-tos/configuration_cloud.md + - cloud/how-tos/assistant_versioning.md + - Threads: + - cloud/how-tos/copy_threads.md + - cloud/how-tos/check_thread_status.md + - Runs: + - cloud/how-tos/background_run.md + - cloud/how-tos/same-thread.md + - cloud/how-tos/cron_jobs.md + - cloud/how-tos/stateless_runs.md + - Streaming: + - cloud/how-tos/stream_values.md + - cloud/how-tos/stream_updates.md + - cloud/how-tos/stream_messages.md + - cloud/how-tos/stream_events.md + - cloud/how-tos/stream_debug.md + - cloud/how-tos/stream_multiple.md + - Human-in-the-loop: + - cloud/how-tos/human_in_the_loop_breakpoint.md + - cloud/how-tos/human_in_the_loop_user_input.md + - cloud/how-tos/human_in_the_loop_edit_state.md + - cloud/how-tos/human_in_the_loop_time_travel.md + - cloud/how-tos/human_in_the_loop_review_tool_calls.md + - Double-texting: + - cloud/how-tos/interrupt_concurrent.md + - cloud/how-tos/rollback_concurrent.md + - cloud/how-tos/reject_concurrent.md + - cloud/how-tos/enqueue_concurrent.md + - Webhooks: + - cloud/how-tos/webhooks.md + - Cron Jobs: + - cloud/how-tos/cron_jobs.md + - LangGraph Studio: + - cloud/how-tos/test_deployment.md + - cloud/how-tos/test_local_deployment.md + - cloud/how-tos/invoke_studio.md + - cloud/how-tos/threads_studio.md + - Troubleshooting: + - troubleshooting/errors/index.md + - troubleshooting/errors/GRAPH_RECURSION_LIMIT.md + - troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE.md + - troubleshooting/errors/INVALID_GRAPH_NODE_RETURN_VALUE.md + - troubleshooting/errors/MULTIPLE_SUBGRAPHS.md + + - Conceptual Guides: + - concepts/index.md + - 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: + - High Level: + - concepts/langgraph_platform.md + - concepts/deployment_options.md + - concepts/plans.md + - concepts/template_applications.md + - Components: + - concepts/langgraph_server.md + - concepts/langgraph_studio.md + - concepts/langgraph_cli.md + - concepts/sdk.md + - how-tos/use-remote-graph.md + - LangGraph Server: + - concepts/application_structure.md + - concepts/assistants.md + - concepts/double_texting.md + - Deployment Options: + - concepts/self_hosted.md + - concepts/langgraph_cloud.md + - concepts/bring_your_own_cloud.md + - Reference: - "reference/index.md" - Library: diff --git a/docs/overrides/main.html b/docs/overrides/main.html index 7616fba79..f1ab3991b 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -34,6 +34,10 @@ color: #1E88E5; } + .md-sidebar { + display: none; + } + .md-typeset a:hover { color: #1565C0; } diff --git a/poetry.lock b/poetry.lock index 80e87def8..64529d4aa 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "aiohappyeyeballs" -version = "2.4.2" +version = "2.4.3" description = "Happy Eyeballs for asyncio" optional = false python-versions = ">=3.8" files = [ - {file = "aiohappyeyeballs-2.4.2-py3-none-any.whl", hash = "sha256:8522691d9a154ba1145b157d6d5c15e5c692527ce6a53c5e5f9876977f6dab2f"}, - {file = "aiohappyeyeballs-2.4.2.tar.gz", hash = "sha256:4ca893e6c5c1f5bf3888b04cb5a3bee24995398efef6e0b9f747b5e89d84fd74"}, + {file = "aiohappyeyeballs-2.4.3-py3-none-any.whl", hash = "sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572"}, + {file = "aiohappyeyeballs-2.4.3.tar.gz", hash = "sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586"}, ] [[package]] @@ -7331,4 +7331,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "67675531a6c4cd218c9effe87061234fbc778ff1afbb61327239b20556aa63da" +content-hash = "738e69cf406b140217cc8c3c0f2ccb5c2027d4701bcf2a347ba4b107f700ab2a" diff --git a/pyproject.toml b/pyproject.toml index 3238a7a10..dc50e167f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.10" +aiohappyeyeballs = "2.4.3" [tool.poetry.group.docs.dependencies] langgraph = { path = "libs/langgraph/", develop = true }