From 28a7ca03a9510e233df100ed22b6dd38c41d0343 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 4 Feb 2025 13:26:25 -0500 Subject: [PATCH] docs: publish prebuilt page (#3305) Publish prebuilt page --- .../create_third_party_page.py | 37 ++++++++++++++++--- docs/docs/prebuilt.md | 34 +++++++++++++++++ docs/mkdocs.yml | 3 +- 3 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 docs/docs/prebuilt.md diff --git a/docs/_scripts/third_party_page/create_third_party_page.py b/docs/_scripts/third_party_page/create_third_party_page.py index 15038f5a3..d75383ab1 100755 --- a/docs/_scripts/third_party_page/create_third_party_page.py +++ b/docs/_scripts/third_party_page/create_third_party_page.py @@ -8,9 +8,14 @@ from typing import TypedDict import yaml MARKDOWN = """\ -# πŸš€ Third-party Libraries +[//]: # (This file is automatically generated using a script in docs/_scripts. Do not edit this file directly!) +# πŸš€ Prebuilt Libraries -A collection of third-party libraries that extend LangGraph's functionality. +LangGraph includes a prebuilt React agent. For more information on how to use it, +check out our [how-to guide](https://langchain-ai.github.io/langgraph/how-tos/#prebuilt-react-agent). + +If you’re looking for other prebuilt libraries, explore the community-built options +below. These libraries can extend LangGraph's functionality in various ways. ## πŸ“š Available Libraries @@ -18,7 +23,21 @@ A collection of third-party libraries that extend LangGraph's functionality. ## ✨ Contributing Your Library -If you'd like to add your library to this list, please open a pull request on the {langgraph_url}. +Have you built an awesome open-source library using LangGraph? We'd love to feature +your project on the official LangGraph documentation pages! πŸ† + +To share your project, simply open a Pull Request adding an entry for your package in our [packages.yml]({langgraph_url}) file. + +**Guidelines** + +- Your repo must be distributed as an installable package (e.g., PyPI for Python, npm + for JavaScript/TypeScript, etc.) πŸ“¦ +- The repo should either use the Graph API (exposing a `StateGraph` instance) or + the Functional API (exposing an `entrypoint`). +- The package must include documentation (e.g., a `README.md` or docs site) + explaining how to use it. + +We'll review your contribution and merge it in! Thanks for contributing! πŸš€ """ @@ -47,9 +66,15 @@ def generate_markdown(resolved_packages: List[ResolvedPackage], language: str) - """ # Update the URL to the actual file once the initial version is merged if language == "python": - langgraph_url = "https://github.com/langchain-ai/langgraph/pulls" + langgraph_url = ( + "https://github.com/langchain-ai/langgraph/blob/main/docs" + "/_scripts/third_party_page/packages.yml" + ) elif language == "js": - langgraph_url = "https://github.com/langchain-ai/langgraphjs/pulls" + langgraph_url = ( + "https://github.com/langchain-ai/langgraphjs/blob/main/docs" + "/_scripts/third_party/packages.yml" + ) else: raise ValueError(f"Invalid language '{language}'. Expected 'python' or 'js'.") @@ -57,7 +82,7 @@ def generate_markdown(resolved_packages: List[ResolvedPackage], language: str) - resolved_packages, key=lambda p: p["weekly_downloads"] or 0, reverse=True ) rows = [ - "| Name | GitHub URL | Description | Downloads |", + "| Name | GitHub URL | Description | Weekly Downloads |", "| --- | --- | --- | --- |", ] for package in sorted_packages: diff --git a/docs/docs/prebuilt.md b/docs/docs/prebuilt.md new file mode 100644 index 000000000..13d0cee6a --- /dev/null +++ b/docs/docs/prebuilt.md @@ -0,0 +1,34 @@ +[//]: # (This file is automatically generated using a script in docs/_scripts. Do not edit this file directly!) +# πŸš€ Prebuilt Libraries + +LangGraph includes a prebuilt React agent. For more information on how to use it, +check out our [how-to guide](https://langchain-ai.github.io/langgraph/how-tos/#prebuilt-react-agent). + +If you’re looking for other prebuilt libraries, explore the community-built options +below. These libraries can extend LangGraph's functionality in various ways. + +## πŸ“š Available Libraries + +| Name | GitHub URL | Description | Weekly Downloads | +| --- | --- | --- | --- | +| **trustcall** | [hinthornw/trustcall](https://github.com/hinthornw/trustcall) | Tenacious tool calling built on LangGraph | 7081 | + +## ✨ Contributing Your Library + +Have you built an awesome open-source library using LangGraph? We'd love to feature +your project on the official LangGraph documentation pages! πŸ† + +To share your project, simply open a Pull Request adding an entry for your package in our [packages.yml](https://github.com/langchain-ai/langgraph/blob/main/docs/_scripts/third_party_page/packages.yml) file. + +**Guidelines** + +- Your repo must be distributed as an installable package (e.g., PyPI for Python, npm + for JavaScript/TypeScript, etc.) πŸ“¦ +- The repo should either use the Graph API (exposing a `StateGraph` instance) or + the Functional API (exposing an `entrypoint`). +- The package must include documentation (e.g., a `README.md` or docs site) + explaining how to use it. + +We'll review your contribution and merge it in! + +Thanks for contributing! πŸš€ diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index be663e709..dc459e053 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -353,6 +353,7 @@ nav: - tutorials/auth/resource_auth.md - tutorials/auth/add_auth_server.md - Resources: + - Prebuilt: prebuilt.md - FAQ: concepts/faq.md - Troubleshooting: - Troubleshooting: troubleshooting/errors/index.md @@ -364,7 +365,7 @@ nav: - troubleshooting/errors/INVALID_CHAT_HISTORY.md - troubleshooting/errors/INVALID_LICENSE.md - LangGraph Academy Course: https://academy.langchain.com/courses/intro-to-langgraph - + - API reference: - Library: - Graphs: reference/graphs.md