diff --git a/README.md b/README.md index ee2cb29e63..ebfd22b602 100644 --- a/README.md +++ b/README.md @@ -13,23 +13,17 @@ > * [`HTTP API Reference`](https://api.smith.langchain.com/redoc) > * [`JavaScript/TypeScript SDK reference`](https://docs.smith.langchain.com/reference/js) +--- + **Table of contents:** - [LangChain Docs](#langchain-docs) - - [Repository structure](#repository-structure) - - [`docs.langchain.com`](#docslangchaincom) - - [`reference.langchain.com`](#referencelangchaincom) - - [Contributing](#contributing) - - [Set up a local dev environment](#set-up-a-local-dev-environment) - - [Workflow](#workflow) - - [Co-locate Python and JavaScript/TypeScript OSS content](#co-locate-python-and-javascripttypescript-oss-content) - - [Localized content](#localized-content) - - [Create a preview build](#create-a-preview-build) - - [Quality checks](#quality-checks) - - [Publish to prod](#publish-to-prod) + - [Contribute](#contribute) - [Reference](#reference) + - [Repository structure](#repository-structure) + - [`docs.langchain.com`](#docslangchaincom) + - [`reference.langchain.com`](#referencelangchaincom) - [File formats](#file-formats) - - [Documentation syntax](#documentation-syntax) - [Available commands](#available-commands) - [Troubleshooting](#troubleshooting) - [`docs dev` not working / running](#docs-dev-not-working--running) @@ -39,7 +33,16 @@ --- -## Repository structure +## Contribute + +To contribute to LangChain documentation, follow the steps outlined in the [contributing guide](/oss/contributing/documentation). The contributing guide also explains our documentation types and their writing and quality standards. + +> [!IMPORTANT] +> For contributing to reference docs, see the `README.md` file in the `/reference/python` and `/reference/javascript` directories. + +## Reference + +### Repository structure ```text # --- docs.langchain.com ---------------------------------------------- @@ -63,7 +66,7 @@ reference/ # Reference docs build pipelines vercel.json # Vercel configuration/redirects ``` -### `docs.langchain.com` +#### `docs.langchain.com` The Mintlify docs pipeline is structured with `.mdx` source files in `/src` and build artifacts in `/build`. Mintlify deploys from the `/build` folder, which is generated by preprocessing logic. @@ -72,181 +75,14 @@ The Mintlify docs pipeline is structured with `.mdx` source files in `/src` and The `/src/docs.json` file is used to configure the Mintlify site navigation and settings. Refer to the [Mintlify documentation](https://www.mintlify.com/docs/organize/navigation) for detailed syntax and component usage. -Documentation changes follow a PR [workflow](#workflow) where all tests must pass before merging. +Documentation changes follow a PR workflow where all tests must pass before merging. See the [contributing guidelines](/oss/contributing/documentation) for more details. -### `reference.langchain.com` +#### `reference.langchain.com` Each language has its own build pipeline in `/reference/`. Reference docs are built with a combination of automated docstring extraction and manually written content. Refer to the `README.md` in each folder for details on how to build and contribute. Built files are stored in `/reference/dist/{LANGUAGE}`, which is then deployed to Vercel. The build process is triggered automatically on pushes to `main` and can also be triggered manually via the Vercel dashboard. ---- - -## Contributing - -Before making any changes, we encourage you to read the LangChain [contributing guide](https://docs.langchain.com/oss/python/contributing/documentation) to understand our documentation types and their writing and quality standards. - -> [!IMPORTANT] -> The following steps refer to the [`docs.langchain.com`](https://docs.langchain.com) Mintlify documentation site. For contributing to reference docs, see the `README.md` file in the `/reference/python` and `/reference/javascript` directories. - -### Set up a local dev environment - -1. Clone this repo. Follow the steps outlined in [IDE_SETUP.md](./IDE_SETUP.md). -2. Install `uv` from (if not already installed) -3. Install `npm` from (if not already installed) -4. Create and activate a virtual environment: - - ```bash - cd docs - uv venv - source .venv/bin/activate - ``` - -5. Install dependencies: - - ```bash - uv sync --all-groups - ``` - - ```bash - npm i -g mint - ``` - -After install, you'll have access to the `docs` command: - -```bash -docs --help -``` - -Common commands: - -* `docs dev` - Start development mode with file watching and hot reload -* `docs build` - Build documentation - -See [Available commands](#available-commands) for more details. - -### Workflow - -> [!IMPORTANT] -> * **Only edit files in `src/`** - The `build/` directory is automatically generated -> * **Use Mintlify syntax** - See [Mintlify documentation](https://mintlify.com/docs) for formatting guidelines - -1. Ensure your [dev environment is set up](#set-up-local-dev-environment) and that you have followed the steps in [IDE_SETUP.md](./IDE_SETUP.md) to configure your IDE/editor to automatically apply the correct settings. - -2. Start development mode: - - ```bash - docs dev - ``` - - This starts a development server with hot reload at . - -3. Edit files in `src/`: - * Make changes to markdown files, notebooks, or other documentation - * The build system automatically detects changes and rebuilds affected files - * If OSS content varies between Python and JavaScript/TypeScript, add content for [both in the same file](#co-locate-python-and-javascripttypescript-oss-content). Otherwise, content will be identical for both languages. - * If [adding localized content](#localized-content), add content in the specific language directory (e.g.,`src/ko/` for Korean). - -4. Use `docs dev` to [preview changes](#create-a-preview-build) locally with hot reload. Changes automatically appear in your browser at . - -5. Iterate: - * Continue editing and see changes reflected immediately. - * The development server rebuilds only changed files for faster feedback. - -6. Run the [quality checks](#quality-checks) to ensure your changes are valid. - -7. [Publish to production](#publish-to-prod) (internal team members only). - -### Co-locate Python and JavaScript/TypeScript OSS content - -In the `/oss` directory, we have a custom syntax for co-locating Python and JavaScript/TypeScript content in the same file. Use the `:::python` and `:::js` code language fences to tag the content that is specific to that language and will generate two outputs (one for each language). These are closed with the `:::` fence. - -For example, if you have a file in `/oss/concepts/foo.mdx`, you can use the following syntax to co-locate Python and JavaScript/TypeScript content: - -```mdx -:::python -This is Python-specific content. -::: - -:::js -This is JavaScript/TypeScript-specific content. -::: -``` - -This will generate two outputs (one for each language) at `/oss/python/concepts/foo.mdx` and `/oss/javascript/concepts/foo.mdx`. Each outputted page will need to be added to the `/src/docs.json` file to be included in the navigation. - -### Localized content - -> [!IMPORTANT] -> Currently, the LangChain documentation is only available in English, but we are working to add support for other languages, thanks to our LangChain Ambassadors! - -To add localized content (content in a specific language), place it in the corresponding language directory. Each language has its own directory named after its language code. For more information, refer to the [Mintlify documentation](https://www.mintlify.com/docs/organize/navigation#languages) for more details on localized content. - -```text -src/ - langsmith/ # English - LangSmith docs - oss/ # English - LangChain, LangGraph, Deep Agents, and integrations docs - ... - cn/ # Chinese (Simplified) - No content yet - es/ # Spanish - No content yet - ko/ # Korean - No content yet - zh-Hant/ # Chinese (Traditional) - No content yet -``` - -### Create a preview build - -When you create or update a PR, a [preview branch/ID](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) is automatically generated for you. A comment will be left on the PR with the ID, which you can then use to generate a preview. You can also run this workflow manually if needed. Previews are useful for sharing work-in-progress changes with others. - -1. Copy the preview branch's ID from the comment. -2. In the [Mintlify dashboard](https://dashboard.mintlify.com/langchain-5e9cc07a/langchain-5e9cc07a?section=previews), click **Create preview deployment**. -3. Enter the preview branch's ID. -4. Click **Create deployment**. - A **Manual update** will display in the **Previews** table. -5. Select the preview and click **Visit** to view the preview build. - -To redeploy the preview build, click **Redeploy** on the Mintlify dashboard. - - -### Quality checks - -Before submitting changes, ensure your code passes formatting and linting checks: - -```bash -# Check broken links -make mint-broken-links - -# Format code automatically -make format - -# Check for linting issues -make lint - -# Fix markdown issues -make lint_md_fix - -# Run tests to ensure your changes don't break existing functionality -make test -``` - -> [!IMPORTANT] -> All pull requests are automatically checked by CI/CD. -> -> The same linting and formatting standards will be enforced, and PRs cannot be merged if these checks fail. - -### Publish to prod - -> [!IMPORTANT] -> Only internal team members can publish to production. - -Once your branch has been merged into `main`, you need to push the changes to `prod` for them to render on the live docs site. Use the [Publish documentation GH action](https://github.com/langchain-ai/docs/actions/workflows/publish.yml): - -1. Go to [Publish documentation](https://github.com/langchain-ai/docs/actions/workflows/publish.yml). -2. Click the **Run workflow** button. -3. Select the **main** branch to deploy. -4. Click **Run workflow**. - -## Reference - ### File formats * **Markdown files** (`.md`, `.mdx`) - Standard documentation content @@ -254,18 +90,6 @@ Once your branch has been merged into `main`, you need to push the changes to `p * **Jupyter notebooks** (`.ipynb`) - Converted to markdown during build, though **these are not recommended for new content!** Your PR will likely be rejected if you attempt to add a Jupyter notebook unless asked to by a maintainer. * **Assets** - Images and other files are copied to the build directory -### Documentation syntax - -Our primary docs the [Mintlify](https://mintlify.com/docs) platform for docs generation. Key features include: - -* **Frontmatter** - YAML metadata at the top of files -* **Components** - Special Mintlify components for enhanced formatting -* **Code blocks** - Syntax highlighting and copy functionality -* **Navigation** - Automatic sidebar generation from file structure -* **Code language fences** (only used in `/oss`) - Custom code language fences for Python and Javascript (`:::python` and `:::js`). Both are closed with the `:::` fence. These are used to tag content that is specific to that language and will generate two outputs (one for each language). - -Refer to the [Mintlify documentation](https://mintlify.com/docs) for detailed syntax and component usage. - ### Available commands **Make commands:** @@ -314,9 +138,6 @@ These can be used directly using the `Makefile` or via the `docs` CLI tool: * **`docs build`** - Build documentation files * `--watch` - Watch for file changes after building - ---- - ## Troubleshooting ### `docs dev` not working / running diff --git a/reference/python/README.md b/reference/python/README.md index da7042ed52..20704dd68e 100644 --- a/reference/python/README.md +++ b/reference/python/README.md @@ -546,3 +546,49 @@ title: Chat models (Classic) ``` --- + +## In-code documentation + +### Language and style + +> [!NOTE] +> Use [Google-style docstrings](https://google.github.io/styleguide/pyguide.html) with complete type hints for all public functions. + +Follow these standards for all documentation: + +- **Voice**: Use second person ("you") for instructions +- **Tense**: Use active voice and present tense +- **Clarity**: Write clear, direct language for technical audiences +- **Consistency**: Use consistent terminology throughout +- **Conciseness**: Keep sentences concise while providing necessary context + +### Code examples + +> [!WARNING] +> Always test code examples before publishing. Never include real API keys or secrets. + +Requirements for code examples: + +- **Completeness**: Include complete, runnable examples that users can copy and execute without errors +- **Realism**: Use realistic data instead of placeholder values like "foo" or "example" +- **Error handling**: Show proper error handling and edge case management +- **Documentation**: Add explanatory comments for complex logic + +Example of a well-documented function: + +```python +def filter_unknown_users(users: list[str], known_users: set[str]) -> list[str]: + """Filter out users that are not in the known users set. + + Args: + users: List of user identifiers to filter. + known_users: Set of known/valid user identifiers. + + Returns: + List of users that are not in the known_users set. + + Raises: + ValueError: If users list contains invalid identifiers. + """ + return [user for user in users if user not in known_users] +``` diff --git a/src/docs.json b/src/docs.json index 59926be579..301e804c9e 100644 --- a/src/docs.json +++ b/src/docs.json @@ -120,1289 +120,1286 @@ } }, "navigation": { - "languages": [ - { - "language": "en", - "products": [ - { - "product": "Home", - "icon": "house", - "pages": [ - "index" - ] - }, - { - "product": "LangChain + LangGraph", - "icon": "link", - "description": "Open source frameworks", - "dropdowns": [ - { - "dropdown": "Python", - "icon": "python", - "tabs": [ - { - "tab": "LangChain", - "pages": [ - "oss/python/langchain/overview", - { - "group": "LangChain v1.0", - "pages": [ - "oss/python/releases/langchain-v1", - "oss/python/migrate/langchain-v1" - ] - }, - { - "group": "Get started", - "pages": [ - "oss/python/langchain/install", - "oss/python/langchain/quickstart", - "oss/python/langchain/philosophy" - ] - }, - { - "group": "Core components", - "pages": [ - "oss/python/langchain/agents", - "oss/python/langchain/models", - "oss/python/langchain/messages", - "oss/python/langchain/tools", - "oss/python/langchain/short-term-memory", - "oss/python/langchain/streaming", - "oss/python/langchain/middleware", - "oss/python/langchain/structured-output" - ] - }, - { - "group": "Advanced usage", - "pages": [ - "oss/python/langchain/guardrails", - "oss/python/langchain/runtime", - "oss/python/langchain/context-engineering", - "oss/python/langchain/mcp", - "oss/python/langchain/human-in-the-loop", - "oss/python/langchain/multi-agent", - "oss/python/langchain/retrieval", - "oss/python/langchain/long-term-memory" - ] - }, - { - "group": "Use in production", - "pages": [ - "oss/python/langchain/studio", - "oss/python/langchain/test", - "oss/python/langchain/deploy", - "oss/python/langchain/ui", - "oss/python/langchain/observability" - ] - } - ] - }, - { - "tab": "LangGraph", - "pages": [ - "oss/python/langgraph/overview", - { - "group": "LangGraph v1.0", - "pages": [ - "oss/python/releases/langgraph-v1", - "oss/python/migrate/langgraph-v1" - ] - }, - { - "group": "Get started", - "pages": [ - "oss/python/langgraph/install", - "oss/python/langgraph/quickstart", - "oss/python/langgraph/local-server", - "oss/python/langgraph/thinking-in-langgraph", - "oss/python/langgraph/workflows-agents" - ] - }, - { - "group": "Capabilities", - "pages": [ - "oss/python/langgraph/persistence", - "oss/python/langgraph/durable-execution", - "oss/python/langgraph/streaming", - "oss/python/langgraph/interrupts", - "oss/python/langgraph/use-time-travel", - "oss/python/langgraph/add-memory", - "oss/python/langgraph/use-subgraphs" - ] - }, - { - "group": "Production", - "pages": [ - "oss/python/langgraph/application-structure", - "oss/python/langgraph/studio", - "oss/python/langgraph/test", - "oss/python/langgraph/deploy", - "oss/python/langgraph/ui", - "oss/python/langgraph/observability" - ] - }, - { - "group": "LangGraph APIs", - "pages": [ - { - "group": "Graph API", - "pages": [ - "oss/python/langgraph/graph-api", - "oss/python/langgraph/use-graph-api" - ] - }, - { - "group": "Functional API", - "pages": [ - "oss/python/langgraph/functional-api", - "oss/python/langgraph/use-functional-api" - ] - }, - "oss/python/langgraph/pregel" - ] - } - ] - }, - { - "tab": "Deep Agents", - "pages": [ - "oss/python/deepagents/overview", - { - "group": "Get started", - "pages": [ - "oss/python/deepagents/quickstart", - "oss/python/deepagents/customization" - ] - }, - { - "group": "Core capabilities", - "pages": [ - "oss/python/deepagents/harness", - "oss/python/deepagents/backends", - "oss/python/deepagents/subagents", - "oss/python/deepagents/human-in-the-loop", - "oss/python/deepagents/long-term-memory", - "oss/python/deepagents/middleware" - ] - } - ] - }, - { - "tab": "Integrations", - "pages": [ - "oss/python/integrations/providers/overview", - "oss/python/integrations/providers/all_providers", - { - "group": "Popular Providers", - "icon": "user-group", - "pages": [ - "oss/python/integrations/providers/openai", - "oss/python/integrations/providers/anthropic", - "oss/python/integrations/providers/google", - "oss/python/integrations/providers/aws", - "oss/python/integrations/providers/huggingface", - "oss/python/integrations/providers/microsoft", - "oss/python/integrations/providers/ollama", - "oss/python/integrations/providers/groq" - ] - }, - { - "group": "Integrations by component", - "icon": "plug", - "pages": [ - "oss/python/integrations/chat/index", - "oss/python/integrations/tools/index", - "oss/python/integrations/retrievers/index", - "oss/python/integrations/splitters/index", - "oss/python/integrations/text_embedding/index", - "oss/python/integrations/vectorstores/index", - "oss/python/integrations/document_loaders/index", - "oss/python/integrations/stores/index" - ] - } - ] - }, - { - "tab": "Learn", - "pages": [ - "oss/python/learn", - { - "group": "Tutorials", - "icon": "code", - "pages": [ - { - "group": "LangChain", - "expanded": true, - "pages": [ - "oss/python/langchain/knowledge-base", - "oss/python/langchain/rag", - "oss/python/langchain/sql-agent", - "oss/python/langchain/supervisor" - ] - }, - { - "group": "LangGraph", - "expanded": true, - "pages": [ - "oss/python/langgraph/agentic-rag", - "oss/python/langgraph/sql-agent" - ] - } - ] - }, - { - "group": "Conceptual overviews", - "icon": "book", - "pages": [ - "oss/python/concepts/memory", - "oss/python/concepts/context", - "oss/python/langgraph/graph-api", - "oss/python/langgraph/functional-api" - ] - }, - { - "group": "Additional resources", - "icon": "list", - "pages": [ - "oss/python/langchain/academy", - "oss/python/langgraph/case-studies" - ] - } - ] - }, - { - "tab": "Reference", - "pages": [ - "oss/python/reference/overview", - { - "group": "Reference", - "pages": [ - "oss/python/reference/langchain-python", - "oss/python/reference/langgraph-python", - "oss/python/reference/integrations-python", - "oss/python/reference/deepagents-python" - ] - }, - { - "group": "Errors", - "pages": [ - "oss/python/common-errors" - ] - }, - { - "group": "Releases", - "pages": [ - "oss/python/versioning", - { - "group": "Releases", - "pages": [ - "oss/python/releases/langchain-v1" - ] - }, - { - "group": "Migration guides", - "pages": [ - "oss/python/migrate/langchain-v1" - ] - } - ] - }, - { - "group": "Policies", - "pages": [ - "oss/python/release-policy", - "oss/python/security-policy" - ] - } - ] - }, - { - "tab": "Contribute", - "pages": [ - "oss/python/contributing/overview", - { - "group": "Contribute", - "icon": "heart-circle-plus", - "pages": [ - "oss/python/contributing/documentation", - "oss/python/contributing/code" - ] - }, - { - "group": "Integrations", - "icon": "plug", - "pages": [ - { - "group": "LangChain", - "pages": [ - "oss/python/contributing/integrations-langchain", - "oss/python/contributing/implement-langchain", - "oss/python/contributing/standard-tests-langchain", - "oss/python/contributing/publish-langchain" - ] - }, - { - "group": "LangGraph", - "pages": [ - "oss/python/contributing/integrations-langgraph", - "oss/python/contributing/implement-langgraph", - "oss/python/contributing/standard-tests-langgraph", - "oss/python/contributing/publish-langgraph" - ] - }, - "oss/python/contributing/comarketing" - ] - } - ] - } - ] - }, - { - "dropdown": "TypeScript", - "icon": "square-js", - "tabs": [ - { - "tab": "LangChain", - "pages": [ - "oss/javascript/langchain/overview", - { - "group": "LangChain v1.0", - "pages": [ - "oss/javascript/releases/langchain-v1", - "oss/javascript/migrate/langchain-v1" - ] - }, - { - "group": "Get started", - "pages": [ - "oss/javascript/langchain/install", - "oss/javascript/langchain/quickstart", - "oss/javascript/langchain/philosophy" - ] - }, - { - "group": "Core components", - "pages": [ - "oss/javascript/langchain/agents", - "oss/javascript/langchain/models", - "oss/javascript/langchain/messages", - "oss/javascript/langchain/tools", - "oss/javascript/langchain/short-term-memory", - "oss/javascript/langchain/streaming", - "oss/javascript/langchain/middleware", - "oss/javascript/langchain/structured-output" - ] - }, - { - "group": "Advanced usage", - "pages": [ - "oss/javascript/langchain/guardrails", - "oss/javascript/langchain/runtime", - "oss/javascript/langchain/context-engineering", - "oss/javascript/langchain/mcp", - "oss/javascript/langchain/human-in-the-loop", - "oss/javascript/langchain/multi-agent", - "oss/javascript/langchain/retrieval", - "oss/javascript/langchain/long-term-memory" - ] - }, - { - "group": "Use in production", - "pages": [ - "oss/javascript/langchain/studio", - "oss/javascript/langchain/test", - "oss/javascript/langchain/deploy", - "oss/javascript/langchain/ui", - "oss/javascript/langchain/observability" - ] - } - ] - }, - { - "tab": "LangGraph", - "pages": [ - "oss/javascript/langgraph/overview", - { - "group": "LangGraph v1.0", - "pages": [ - "oss/javascript/releases/langgraph-v1", - "oss/javascript/migrate/langgraph-v1" - ] - }, - { - "group": "Get started", - "pages": [ - "oss/javascript/langgraph/install", - "oss/javascript/langgraph/quickstart", - "oss/javascript/langgraph/local-server", - "oss/javascript/langgraph/thinking-in-langgraph", - "oss/javascript/langgraph/workflows-agents" - ] - }, - { - "group": "Capabilities", - "pages": [ - "oss/javascript/langgraph/persistence", - "oss/javascript/langgraph/durable-execution", - "oss/javascript/langgraph/streaming", - "oss/javascript/langgraph/interrupts", - "oss/javascript/langgraph/use-time-travel", - "oss/javascript/langgraph/add-memory", - "oss/javascript/langgraph/use-subgraphs" - ] - }, - { - "group": "Production", - "pages": [ - "oss/javascript/langgraph/application-structure", - "oss/javascript/langgraph/studio", - "oss/javascript/langgraph/test", - "oss/javascript/langgraph/deploy", - "oss/javascript/langgraph/ui", - "oss/javascript/langgraph/observability" - ] - }, - { - "group": "LangGraph APIs", - "pages": [ - { - "group": "Graph API", - "pages": [ - "oss/javascript/langgraph/graph-api", - "oss/javascript/langgraph/use-graph-api" - ] - }, - { - "group": "Functional API", - "pages": [ - "oss/javascript/langgraph/functional-api", - "oss/javascript/langgraph/use-functional-api" - ] - }, - "oss/javascript/langgraph/pregel" - ] - } - ] - }, - { - "tab": "Deep Agents", - "pages": [ - "oss/javascript/deepagents/overview", - { - "group": "Get started", - "pages": [ - "oss/javascript/deepagents/quickstart", - "oss/javascript/deepagents/customization" - ] - }, - { - "group": "Core capabilities", - "pages": [ - "oss/javascript/deepagents/harness", - "oss/javascript/deepagents/backends", - "oss/javascript/deepagents/subagents", - "oss/javascript/deepagents/human-in-the-loop", - "oss/javascript/deepagents/long-term-memory", - "oss/javascript/deepagents/middleware" - ] - } - ] - }, - { - "tab": "Integrations", - "pages": [ - "oss/javascript/integrations/providers/overview", - "oss/javascript/integrations/providers/all_providers", - { - "group": "Popular Providers", - "icon": "user-group", - "pages": [ - { - "group": "OpenAI", - "pages": [ - "oss/javascript/integrations/providers/openai", - "oss/javascript/integrations/chat/openai", - "oss/javascript/integrations/text_embedding/openai" - ] - }, - { - "group": "Anthropic", - "pages": [ - "oss/javascript/integrations/providers/anthropic", - "oss/javascript/integrations/chat/anthropic" - ] - }, - { - "group": "Google", - "pages": [ - "oss/javascript/integrations/providers/google", - "oss/javascript/integrations/chat/google_generative_ai", - "oss/javascript/integrations/text_embedding/google_generativeai" - ] - }, - { - "group": "AWS", - "pages": [ - "oss/javascript/integrations/providers/aws", - "oss/javascript/integrations/chat/bedrock", - "oss/javascript/integrations/text_embedding/bedrock" - ] - }, - { - "group": "Microsoft", - "pages": [ - "oss/javascript/integrations/providers/microsoft", - "oss/javascript/integrations/chat/azure", - "oss/javascript/integrations/text_embedding/azure_openai" - ] - } - ] - }, - { - "group": "General integrations", - "icon": "plug", - "pages": [ - "oss/javascript/integrations/chat/index", - "oss/javascript/integrations/tools/index", - "oss/javascript/integrations/llms/index", - "oss/javascript/integrations/stores/index", - "oss/javascript/integrations/document_transformers/index", - "oss/javascript/integrations/llm_caching/index", - "oss/javascript/integrations/callbacks/index" - ] - }, - { - "group": "RAG integrations", - "icon": "database", - "pages": [ - "oss/javascript/integrations/retrievers/index", - "oss/javascript/integrations/splitters/index", - "oss/javascript/integrations/text_embedding/index", - "oss/javascript/integrations/vectorstores/index", - "oss/javascript/integrations/document_loaders/index", - "oss/javascript/integrations/stores/index" - ] - } - ] - }, - { - "tab": "Learn", - "pages": [ - "oss/javascript/learn", - { - "group": "Tutorials", - "icon": "code", - "pages": [ - "oss/javascript/langchain/knowledge-base", - "oss/javascript/langchain/rag", - "oss/javascript/langchain/sql-agent", - "oss/javascript/langchain/supervisor", - "oss/javascript/langgraph/agentic-rag" - ] - }, - { - "group": "Conceptual overviews", - "icon": "book", - "pages": [ - "oss/javascript/concepts/memory", - "oss/javascript/concepts/context", - "oss/javascript/langgraph/graph-api", - "oss/javascript/langgraph/functional-api" - ] - }, - { - "group": "LangChain Academy", - "icon": "graduation-cap", - "pages": [ - "oss/javascript/langchain/academy" - ] - }, - { - "group": "Additional resources", - "icon": "list", - "pages": [ - "oss/javascript/langgraph/case-studies" - ] - } - ] - }, - { - "tab": "Reference", - "pages": [ - "oss/javascript/reference/overview", - { - "group": "Reference", - "pages": [ - "oss/javascript/reference/langchain-javascript", - "oss/javascript/reference/langgraph-javascript", - "oss/javascript/reference/deepagents-javascript" - ] - }, - { - "group": "Errors", - "pages": [ - "oss/javascript/common-errors" - ] - }, - { - "group": "Releases", - "pages": [ - "oss/javascript/versioning", - { - "group": "Releases", - "pages": [ - "oss/javascript/releases/langchain-v1" - ] - }, - { - "group": "Migration guides", - "pages": [ - "oss/javascript/migrate/langchain-v1" - ] - } - ] - }, - { - "group": "Policies", - "pages": [ - "oss/javascript/release-policy", - "oss/javascript/security-policy" - ] - } - ] - }, - { - "tab": "Contribute", - "pages": [ - "oss/javascript/contributing/overview", - { - "group": "Contribute", - "icon": "heart-circle-plus", - "pages": [ - "oss/javascript/contributing/documentation", - "oss/javascript/contributing/code" - ] - }, - { - "group": "Integrations", - "icon": "plug", - "pages": [ - { - "group": "LangChain", - "pages": [ - "oss/javascript/contributing/integrations-langchain", - "oss/javascript/contributing/implement-langchain", - "oss/javascript/contributing/standard-tests-langchain", - "oss/javascript/contributing/publish-langchain" - ] - }, - { - "group": "LangGraph", - "pages": [ - "oss/javascript/contributing/integrations-langgraph", - "oss/javascript/contributing/implement-langgraph", - "oss/javascript/contributing/standard-tests-langgraph", - "oss/javascript/contributing/publish-langgraph" - ] - }, - "oss/javascript/contributing/comarketing" - ] - } - ] - } - ] - } - ] - }, - { - "product": "LangSmith", - "icon": "screwdriver-wrench", - "description": "LLM observability, evaluation, and deployment", - "tabs": [ - { - "tab": "Get started", - "pages": [ - "langsmith/home", - "langsmith/pricing-plans", - "langsmith/create-account-api-key", - { - "group": "Account administration", - "pages": [ - "langsmith/administration-overview", - "langsmith/set-up-a-workspace", - "langsmith/manage-organization-by-api", - "langsmith/billing", - "langsmith/set-up-resource-tags", - "langsmith/user-management" - ] - }, - { - "group": "Reference", - "pages": [ - "langsmith/smith-python-sdk", - "langsmith/smith-js-ts-sdk", - "langsmith/langgraph-python-sdk", - "langsmith/langgraph-js-ts-sdk", - "langsmith/smith-api-ref", - { - "group": "API reference for LangSmith Deployment", - "pages": [ - "langsmith/server-api-ref", - "langsmith/api-ref-control-plane" - ] - } - ] - }, - { - "group": "Additional resources", - "pages": [ - { - "group": "Releases & changelogs", - "pages": [ - "langsmith/agent-server-changelog", - "langsmith/release-versions" - ] - }, - { - "group": "Data management", - "pages": [ - "langsmith/data-storage-and-privacy", - "langsmith/data-purging-compliance" - ] - }, - "langsmith/scalability-and-resilience", - "langsmith/authentication-methods", - "langsmith/faq", - "langsmith/regions-faq", - "langsmith/pricing-faq" - ] - } - ] - }, - { - "tab": "Observability", - "pages": [ - "langsmith/observability", - "langsmith/observability-quickstart", - "langsmith/observability-concepts", - "langsmith/observability-llm-tutorial", - { - "group": "Tracing setup", - "pages": [ - { - "group": "Integrations", - "pages": [ - "langsmith/integrations", - "langsmith/trace-with-langchain", - "langsmith/trace-with-langgraph", - "langsmith/trace-anthropic", - "langsmith/trace-openai", - "langsmith/trace-with-autogen", - "langsmith/trace-claude-agent-sdk", - "langsmith/trace-claude-code", - "langsmith/trace-with-crewai", - "langsmith/trace-with-google-adk", - "langsmith/trace-with-instructor", - "langsmith/trace-with-openai-agents-sdk", - "langsmith/trace-with-opentelemetry", - "langsmith/trace-with-semantic-kernel", - "langsmith/trace-with-vercel-ai-sdk" - ] - }, - { - "group": "Manual instrumentation", - "pages": [ - "langsmith/annotate-code", - "langsmith/trace-with-api", - "langsmith/log-llm-trace", - "langsmith/log-retriever-trace" - ] - }, - "langsmith/threads" - ] - }, - { - "group":"Configuration & troubleshooting", - "pages": [ - { - "group": "Project & environment settings", - "pages": [ - "langsmith/log-traces-to-project", - "langsmith/trace-without-env-vars", - "langsmith/sample-traces" - ] - }, - { - "group": "Advanced tracing techniques", - "pages": [ - "langsmith/distributed-tracing", - "langsmith/serverless-environments", - "langsmith/log-multimodal-traces", - "langsmith/trace-generator-functions" - ] - }, - { - "group": "Data & privacy", - "pages": [ - "langsmith/add-metadata-tags", - "langsmith/mask-inputs-outputs", - "langsmith/upload-files-with-traces" - ] - }, - { - "group": "Troubleshooting guides", - "pages": [ - "langsmith/nest-traces", - "langsmith/troubleshooting-variable-caching", - "langsmith/collector-proxy" - ] - } - ] - }, - { - "group": "Viewing & managing traces", - "pages": [ - "langsmith/filter-traces-in-application", - "langsmith/export-traces", - "langsmith/compare-traces", - "langsmith/share-trace", - "langsmith/platform-logs", - "langsmith/data-export" - ] - }, - { - "group": "Automations", - "pages": [ - "langsmith/rules", - "langsmith/webhooks" - ] - }, - { - "group": "Feedback & evaluation", - "pages": [ - "langsmith/attach-user-feedback", - "langsmith/online-evaluations" - ] - }, - { - "group": "Monitoring & alerting", - "pages": [ - "langsmith/dashboards", - "langsmith/alerts", - "langsmith/alerts-webhook", - "langsmith/insights" - ] - }, - { - "group": "Data type reference", - "pages": [ - "langsmith/run-data-format", - "langsmith/feedback-data-format", - "langsmith/trace-query-syntax" - ] - } - ] - }, - { - "tab": "Evaluation", - "pages": [ - "langsmith/evaluation", - "langsmith/evaluation-quickstart", - "langsmith/evaluation-concepts", - "langsmith/evaluation-approaches", - { - "group": "Datasets", - "pages": [ - { - "group": "Create a dataset", - "pages": [ - "langsmith/manage-datasets-in-application", - "langsmith/manage-datasets-programmatically" - ] - }, - "langsmith/manage-datasets", - "langsmith/custom-output-rendering" - ] - }, - { - "group": "Set up evaluations", - "pages": [ - { - "group": "Run an evaluation", - "pages": [ - "langsmith/evaluate-llm-application", - "langsmith/run-evaluation-from-prompt-playground", - "langsmith/prebuilt-evaluators" - ] - }, - { - "group": "Evaluation types", - "pages": [ - "langsmith/code-evaluator", - "langsmith/llm-as-judge", - "langsmith/composite-evaluators", - "langsmith/summary", - "langsmith/evaluate-pairwise" - ] - }, - { - "group": "Frameworks & integrations", - "pages": [ - "langsmith/evaluation-async", - "langsmith/pytest", - "langsmith/vitest-jest", - "langsmith/run-evals-api-only" - ] - }, - { - "group": "Evaluation techniques", - "pages": [ - "langsmith/define-target-function", - "langsmith/evaluate-on-intermediate-steps", - "langsmith/multiple-scores", - "langsmith/metric-type", - "langsmith/bind-evaluator-to-dataset", - "langsmith/repetition", - "langsmith/rate-limiting", - "langsmith/local", - "langsmith/langchain-runnable", - "langsmith/evaluate-graph", - "langsmith/evaluate-existing-experiment", - "langsmith/evaluate-with-attachments", - "langsmith/multi-turn-simulation", - "langsmith/trajectory-evals" - ] - }, - { - "group": "Improve evaluators", - "pages": [ - "langsmith/improve-judge-evaluator-feedback", - "langsmith/create-few-shot-evaluators", - "langsmith/index-datasets-for-dynamic-few-shot-example-selection" - ] - }, - { - "group": "Tutorials", - "pages": [ - "langsmith/evaluate-chatbot-tutorial", - "langsmith/evaluate-rag-tutorial", - "langsmith/test-react-agent-pytest", - "langsmith/evaluate-complex-agent", - "langsmith/run-backtests-new-agent" - ] - } - ] - }, - { - "group": "Analyze experiment results", - "pages": [ - "langsmith/analyze-an-experiment", - "langsmith/compare-experiment-results", - "langsmith/filter-experiments-ui", - "langsmith/fetch-perf-metrics-experiment", - "langsmith/upload-existing-experiments" - ] - }, - { - "group": "Annotation & human feedback", - "pages": [ - "langsmith/annotation-queues", - "langsmith/set-up-feedback-criteria", - "langsmith/annotate-traces-inline", - "langsmith/audit-evaluator-scores" - ] - }, - { - "group": "Common data types", - "pages": [ - "langsmith/example-data-format", - "langsmith/dataset-json-types", - "langsmith/dataset-transformations" - ] - } - ] - }, - { - "tab": "Prompt engineering", - "pages": [ - "langsmith/prompt-engineering", - "langsmith/prompt-engineering-quickstart", - "langsmith/prompt-engineering-concepts", - { - "group": "Create and update prompts", - "pages": [ - "langsmith/create-a-prompt", - "langsmith/manage-prompts", - "langsmith/manage-prompts-programmatically", - "langsmith/managing-model-configurations", - "langsmith/use-tools", - "langsmith/multimodal-content", - "langsmith/write-prompt-with-ai", - { - "group": "Connect to models", - "pages": [ - "langsmith/custom-openai-compliant-model", - "langsmith/custom-endpoint" - ] - } - ] - }, - { - "group": "Tutorials", - "pages": [ - "langsmith/optimize-classifier", - "langsmith/prompt-commit", - "langsmith/multiple-messages" - ] - } - ] - }, - { - "tab": "Deployment", - "pages": [ - "langsmith/deployments", - "langsmith/local-server", - "langsmith/app-development", - "langsmith/deployment-quickstart", - { - "group": "Configure app for deployment", - "pages": [ - "langsmith/application-structure", - { - "group": "Setup", - "pages": [ - "langsmith/setup-app-requirements-txt", - "langsmith/setup-pyproject", - "langsmith/setup-javascript", - "langsmith/monorepo-support" + "products": [ + { + "product": "Home", + "icon": "house", + "pages": [ + "index" + ] + }, + { + "product": "LangChain + LangGraph", + "icon": "link", + "description": "Open source frameworks", + "dropdowns": [ + { + "dropdown": "Python", + "icon": "python", + "tabs": [ + { + "tab": "LangChain", + "pages": [ + "oss/python/langchain/overview", + { + "group": "LangChain v1.0", + "pages": [ + "oss/python/releases/langchain-v1", + "oss/python/migrate/langchain-v1" + ] + }, + { + "group": "Get started", + "pages": [ + "oss/python/langchain/install", + "oss/python/langchain/quickstart", + "oss/python/langchain/philosophy" + ] + }, + { + "group": "Core components", + "pages": [ + "oss/python/langchain/agents", + "oss/python/langchain/models", + "oss/python/langchain/messages", + "oss/python/langchain/tools", + "oss/python/langchain/short-term-memory", + "oss/python/langchain/streaming", + "oss/python/langchain/middleware", + "oss/python/langchain/structured-output" + ] + }, + { + "group": "Advanced usage", + "pages": [ + "oss/python/langchain/guardrails", + "oss/python/langchain/runtime", + "oss/python/langchain/context-engineering", + "oss/python/langchain/mcp", + "oss/python/langchain/human-in-the-loop", + "oss/python/langchain/multi-agent", + "oss/python/langchain/retrieval", + "oss/python/langchain/long-term-memory" + ] + }, + { + "group": "Use in production", + "pages": [ + "oss/python/langchain/studio", + "oss/python/langchain/test", + "oss/python/langchain/deploy", + "oss/python/langchain/ui", + "oss/python/langchain/observability" + ] + } + ] + }, + { + "tab": "LangGraph", + "pages": [ + "oss/python/langgraph/overview", + { + "group": "LangGraph v1.0", + "pages": [ + "oss/python/releases/langgraph-v1", + "oss/python/migrate/langgraph-v1" + ] + }, + { + "group": "Get started", + "pages": [ + "oss/python/langgraph/install", + "oss/python/langgraph/quickstart", + "oss/python/langgraph/local-server", + "oss/python/langgraph/thinking-in-langgraph", + "oss/python/langgraph/workflows-agents" + ] + }, + { + "group": "Capabilities", + "pages": [ + "oss/python/langgraph/persistence", + "oss/python/langgraph/durable-execution", + "oss/python/langgraph/streaming", + "oss/python/langgraph/interrupts", + "oss/python/langgraph/use-time-travel", + "oss/python/langgraph/add-memory", + "oss/python/langgraph/use-subgraphs" + ] + }, + { + "group": "Production", + "pages": [ + "oss/python/langgraph/application-structure", + "oss/python/langgraph/studio", + "oss/python/langgraph/test", + "oss/python/langgraph/deploy", + "oss/python/langgraph/ui", + "oss/python/langgraph/observability" + ] + }, + { + "group": "LangGraph APIs", + "pages": [ + { + "group": "Graph API", + "pages": [ + "oss/python/langgraph/graph-api", + "oss/python/langgraph/use-graph-api" + ] + }, + { + "group": "Functional API", + "pages": [ + "oss/python/langgraph/functional-api", + "oss/python/langgraph/use-functional-api" ] }, + "oss/python/langgraph/pregel" + ] + } + ] + }, + { + "tab": "Deep Agents", + "pages": [ + "oss/python/deepagents/overview", + { + "group": "Get started", + "pages": [ + "oss/python/deepagents/quickstart", + "oss/python/deepagents/customization" + ] + }, + { + "group": "Core capabilities", + "pages": [ + "oss/python/deepagents/harness", + "oss/python/deepagents/backends", + "oss/python/deepagents/subagents", + "oss/python/deepagents/human-in-the-loop", + "oss/python/deepagents/long-term-memory", + "oss/python/deepagents/middleware" + ] + } + ] + }, + { + "tab": "Integrations", + "pages": [ + "oss/python/integrations/providers/overview", + "oss/python/integrations/providers/all_providers", + { + "group": "Popular Providers", + "icon": "user-group", + "pages": [ + "oss/python/integrations/providers/openai", + "oss/python/integrations/providers/anthropic", + "oss/python/integrations/providers/google", + "oss/python/integrations/providers/aws", + "oss/python/integrations/providers/huggingface", + "oss/python/integrations/providers/microsoft", + "oss/python/integrations/providers/ollama", + "oss/python/integrations/providers/groq" + ] + }, + { + "group": "Integrations by component", + "icon": "plug", + "pages": [ + "oss/python/integrations/chat/index", + "oss/python/integrations/tools/index", + "oss/python/integrations/retrievers/index", + "oss/python/integrations/splitters/index", + "oss/python/integrations/text_embedding/index", + "oss/python/integrations/vectorstores/index", + "oss/python/integrations/document_loaders/index", + "oss/python/integrations/stores/index" + ] + } + ] + }, + { + "tab": "Learn", + "pages": [ + "oss/python/learn", + { + "group": "Tutorials", + "icon": "code", + "pages": [ { - "group": "Deployment components", + "group": "LangChain", + "expanded": true, "pages": [ - "langsmith/components", - "langsmith/agent-server", - "langsmith/data-plane", - "langsmith/control-plane" + "oss/python/langchain/knowledge-base", + "oss/python/langchain/rag", + "oss/python/langchain/sql-agent", + "oss/python/langchain/supervisor" ] }, - "langsmith/graph-rebuild", - "langsmith/use-remote-graph", - "langsmith/semantic-search", - "langsmith/configure-ttl", - "langsmith/cicd-pipeline-example" - ] - }, - { - "group": "Deployment guides", - "pages": [ - "langsmith/deploy-to-cloud", - "langsmith/deploy-with-control-plane", - "langsmith/deploy-standalone-server" - ] - }, - { - "group": "App development", - "pages": [ - { - "group": "Data models", - "pages": [ - { - "group": "Assistants", - "pages": [ - "langsmith/assistants", - "langsmith/configuration-cloud", - "langsmith/use-threads" - ] - }, - { - "group": "Runs", - "pages": [ - "langsmith/background-run", - "langsmith/same-thread", - "langsmith/cron-jobs", - "langsmith/stateless-runs", - "langsmith/configurable-headers" - ] - } + { + "group": "LangGraph", + "expanded": true, + "pages": [ + "oss/python/langgraph/agentic-rag", + "oss/python/langgraph/sql-agent" + ] + } + ] + }, + { + "group": "Conceptual overviews", + "icon": "book", + "pages": [ + "oss/python/concepts/memory", + "oss/python/concepts/context", + "oss/python/langgraph/graph-api", + "oss/python/langgraph/functional-api" + ] + }, + { + "group": "Additional resources", + "icon": "list", + "pages": [ + "oss/python/langchain/academy", + "oss/python/langgraph/case-studies" + ] + } + ] + }, + { + "tab": "Reference", + "pages": [ + "oss/python/reference/overview", + { + "group": "Reference", + "pages": [ + "oss/python/reference/langchain-python", + "oss/python/reference/langgraph-python", + "oss/python/reference/integrations-python", + "oss/python/reference/deepagents-python" + ] + }, + { + "group": "Errors", + "pages": [ + "oss/python/common-errors" + ] + }, + { + "group": "Releases", + "pages": [ + "oss/python/versioning", + { + "group": "Releases", + "pages": [ + "oss/python/releases/langchain-v1" + ] + }, + { + "group": "Migration guides", + "pages": [ + "oss/python/migrate/langchain-v1" + ] + } + ] + }, + { + "group": "Policies", + "pages": [ + "oss/python/release-policy", + "oss/python/security-policy" + ] + } + ] + }, + { + "tab": "Contribute", + "pages": [ + "oss/python/contributing/overview", + { + "group": "Contribute", + "icon": "heart-circle-plus", + "pages": [ + "oss/python/contributing/documentation", + "oss/python/contributing/code" + ] + }, + { + "group": "Integrations", + "icon": "plug", + "pages": [ + { + "group": "LangChain", + "pages": [ + "oss/python/contributing/integrations-langchain", + "oss/python/contributing/implement-langchain", + "oss/python/contributing/standard-tests-langchain", + "oss/python/contributing/publish-langchain" + ] + }, + { + "group": "LangGraph", + "pages": [ + "oss/python/contributing/integrations-langgraph", + "oss/python/contributing/implement-langgraph", + "oss/python/contributing/standard-tests-langgraph", + "oss/python/contributing/publish-langgraph" + ] + }, + "oss/python/contributing/comarketing" + ] + } + ] + } + ] + }, + { + "dropdown": "TypeScript", + "icon": "square-js", + "tabs": [ + { + "tab": "LangChain", + "pages": [ + "oss/javascript/langchain/overview", + { + "group": "LangChain v1.0", + "pages": [ + "oss/javascript/releases/langchain-v1", + "oss/javascript/migrate/langchain-v1" + ] + }, + { + "group": "Get started", + "pages": [ + "oss/javascript/langchain/install", + "oss/javascript/langchain/quickstart", + "oss/javascript/langchain/philosophy" + ] + }, + { + "group": "Core components", + "pages": [ + "oss/javascript/langchain/agents", + "oss/javascript/langchain/models", + "oss/javascript/langchain/messages", + "oss/javascript/langchain/tools", + "oss/javascript/langchain/short-term-memory", + "oss/javascript/langchain/streaming", + "oss/javascript/langchain/middleware", + "oss/javascript/langchain/structured-output" + ] + }, + { + "group": "Advanced usage", + "pages": [ + "oss/javascript/langchain/guardrails", + "oss/javascript/langchain/runtime", + "oss/javascript/langchain/context-engineering", + "oss/javascript/langchain/mcp", + "oss/javascript/langchain/human-in-the-loop", + "oss/javascript/langchain/multi-agent", + "oss/javascript/langchain/retrieval", + "oss/javascript/langchain/long-term-memory" + ] + }, + { + "group": "Use in production", + "pages": [ + "oss/javascript/langchain/studio", + "oss/javascript/langchain/test", + "oss/javascript/langchain/deploy", + "oss/javascript/langchain/ui", + "oss/javascript/langchain/observability" + ] + } + ] + }, + { + "tab": "LangGraph", + "pages": [ + "oss/javascript/langgraph/overview", + { + "group": "LangGraph v1.0", + "pages": [ + "oss/javascript/releases/langgraph-v1", + "oss/javascript/migrate/langgraph-v1" + ] + }, + { + "group": "Get started", + "pages": [ + "oss/javascript/langgraph/install", + "oss/javascript/langgraph/quickstart", + "oss/javascript/langgraph/local-server", + "oss/javascript/langgraph/thinking-in-langgraph", + "oss/javascript/langgraph/workflows-agents" + ] + }, + { + "group": "Capabilities", + "pages": [ + "oss/javascript/langgraph/persistence", + "oss/javascript/langgraph/durable-execution", + "oss/javascript/langgraph/streaming", + "oss/javascript/langgraph/interrupts", + "oss/javascript/langgraph/use-time-travel", + "oss/javascript/langgraph/add-memory", + "oss/javascript/langgraph/use-subgraphs" + ] + }, + { + "group": "Production", + "pages": [ + "oss/javascript/langgraph/application-structure", + "oss/javascript/langgraph/studio", + "oss/javascript/langgraph/test", + "oss/javascript/langgraph/deploy", + "oss/javascript/langgraph/ui", + "oss/javascript/langgraph/observability" + ] + }, + { + "group": "LangGraph APIs", + "pages": [ + { + "group": "Graph API", + "pages": [ + "oss/javascript/langgraph/graph-api", + "oss/javascript/langgraph/use-graph-api" + ] + }, + { + "group": "Functional API", + "pages": [ + "oss/javascript/langgraph/functional-api", + "oss/javascript/langgraph/use-functional-api" + ] + }, + "oss/javascript/langgraph/pregel" + ] + } + ] + }, + { + "tab": "Deep Agents", + "pages": [ + "oss/javascript/deepagents/overview", + { + "group": "Get started", + "pages": [ + "oss/javascript/deepagents/quickstart", + "oss/javascript/deepagents/customization" + ] + }, + { + "group": "Core capabilities", + "pages": [ + "oss/javascript/deepagents/harness", + "oss/javascript/deepagents/backends", + "oss/javascript/deepagents/subagents", + "oss/javascript/deepagents/human-in-the-loop", + "oss/javascript/deepagents/long-term-memory", + "oss/javascript/deepagents/middleware" + ] + } + ] + }, + { + "tab": "Integrations", + "pages": [ + "oss/javascript/integrations/providers/overview", + "oss/javascript/integrations/providers/all_providers", + { + "group": "Popular Providers", + "icon": "user-group", + "pages": [ + { + "group": "OpenAI", + "pages": [ + "oss/javascript/integrations/providers/openai", + "oss/javascript/integrations/chat/openai", + "oss/javascript/integrations/text_embedding/openai" + ] + }, + { + "group": "Anthropic", + "pages": [ + "oss/javascript/integrations/providers/anthropic", + "oss/javascript/integrations/chat/anthropic" + ] + }, + { + "group": "Google", + "pages": [ + "oss/javascript/integrations/providers/google", + "oss/javascript/integrations/chat/google_generative_ai", + "oss/javascript/integrations/text_embedding/google_generativeai" + ] + }, + { + "group": "AWS", + "pages": [ + "oss/javascript/integrations/providers/aws", + "oss/javascript/integrations/chat/bedrock", + "oss/javascript/integrations/text_embedding/bedrock" + ] + }, + { + "group": "Microsoft", + "pages": [ + "oss/javascript/integrations/providers/microsoft", + "oss/javascript/integrations/chat/azure", + "oss/javascript/integrations/text_embedding/azure_openai" + ] + } + ] + }, + { + "group": "General integrations", + "icon": "plug", + "pages": [ + "oss/javascript/integrations/chat/index", + "oss/javascript/integrations/tools/index", + "oss/javascript/integrations/llms/index", + "oss/javascript/integrations/stores/index", + "oss/javascript/integrations/document_transformers/index", + "oss/javascript/integrations/llm_caching/index", + "oss/javascript/integrations/callbacks/index" + ] + }, + { + "group": "RAG integrations", + "icon": "database", + "pages": [ + "oss/javascript/integrations/retrievers/index", + "oss/javascript/integrations/splitters/index", + "oss/javascript/integrations/text_embedding/index", + "oss/javascript/integrations/vectorstores/index", + "oss/javascript/integrations/document_loaders/index", + "oss/javascript/integrations/stores/index" + ] + } + ] + }, + { + "tab": "Learn", + "pages": [ + "oss/javascript/learn", + { + "group": "Tutorials", + "icon": "code", + "pages": [ + "oss/javascript/langchain/knowledge-base", + "oss/javascript/langchain/rag", + "oss/javascript/langchain/sql-agent", + "oss/javascript/langchain/supervisor", + "oss/javascript/langgraph/agentic-rag" + ] + }, + { + "group": "Conceptual overviews", + "icon": "book", + "pages": [ + "oss/javascript/concepts/memory", + "oss/javascript/concepts/context", + "oss/javascript/langgraph/graph-api", + "oss/javascript/langgraph/functional-api" + ] + }, + { + "group": "LangChain Academy", + "icon": "graduation-cap", + "pages": [ + "oss/javascript/langchain/academy" + ] + }, + { + "group": "Additional resources", + "icon": "list", + "pages": [ + "oss/javascript/langgraph/case-studies" + ] + } + ] + }, + { + "tab": "Reference", + "pages": [ + "oss/javascript/reference/overview", + { + "group": "Reference", + "pages": [ + "oss/javascript/reference/langchain-javascript", + "oss/javascript/reference/langgraph-javascript", + "oss/javascript/reference/deepagents-javascript" + ] + }, + { + "group": "Errors", + "pages": [ + "oss/javascript/common-errors" + ] + }, + { + "group": "Releases", + "pages": [ + "oss/javascript/versioning", + { + "group": "Releases", + "pages": [ + "oss/javascript/releases/langchain-v1" + ] + }, + { + "group": "Migration guides", + "pages": [ + "oss/javascript/migrate/langchain-v1" + ] + } + ] + }, + { + "group": "Policies", + "pages": [ + "oss/javascript/release-policy", + "oss/javascript/security-policy" + ] + } + ] + }, + { + "tab": "Contribute", + "pages": [ + "oss/javascript/contributing/overview", + { + "group": "Contribute", + "icon": "heart-circle-plus", + "pages": [ + "oss/javascript/contributing/documentation", + "oss/javascript/contributing/code" + ] + }, + { + "group": "Integrations", + "icon": "plug", + "pages": [ + { + "group": "LangChain", + "pages": [ + "oss/javascript/contributing/integrations-langchain", + "oss/javascript/contributing/implement-langchain", + "oss/javascript/contributing/standard-tests-langchain", + "oss/javascript/contributing/publish-langchain" + ] + }, + { + "group": "LangGraph", + "pages": [ + "oss/javascript/contributing/integrations-langgraph", + "oss/javascript/contributing/implement-langgraph", + "oss/javascript/contributing/standard-tests-langgraph", + "oss/javascript/contributing/publish-langgraph" + ] + }, + "oss/javascript/contributing/comarketing" + ] + } + ] + } + ] + } + ] + }, + { + "product": "LangSmith", + "icon": "screwdriver-wrench", + "description": "LLM observability, evaluation, and deployment", + "tabs": [ + { + "tab": "Get started", + "pages": [ + "langsmith/home", + "langsmith/pricing-plans", + "langsmith/create-account-api-key", + { + "group": "Account administration", + "pages": [ + "langsmith/administration-overview", + "langsmith/set-up-a-workspace", + "langsmith/manage-organization-by-api", + "langsmith/billing", + "langsmith/set-up-resource-tags", + "langsmith/user-management" + ] + }, + { + "group": "Reference", + "pages": [ + "langsmith/smith-python-sdk", + "langsmith/smith-js-ts-sdk", + "langsmith/langgraph-python-sdk", + "langsmith/langgraph-js-ts-sdk", + "langsmith/smith-api-ref", + { + "group": "API reference for LangSmith Deployment", + "pages": [ + "langsmith/server-api-ref", + "langsmith/api-ref-control-plane" + ] + } + ] + }, + { + "group": "Additional resources", + "pages": [ + { + "group": "Releases & changelogs", + "pages": [ + "langsmith/agent-server-changelog", + "langsmith/release-versions" + ] + }, + { + "group": "Data management", + "pages": [ + "langsmith/data-storage-and-privacy", + "langsmith/data-purging-compliance" + ] + }, + "langsmith/scalability-and-resilience", + "langsmith/authentication-methods", + "langsmith/faq", + "langsmith/regions-faq", + "langsmith/pricing-faq" + ] + } + ] + }, + { + "tab": "Observability", + "pages": [ + "langsmith/observability", + "langsmith/observability-quickstart", + "langsmith/observability-concepts", + "langsmith/observability-llm-tutorial", + { + "group": "Tracing setup", + "pages": [ + { + "group": "Integrations", + "pages": [ + "langsmith/integrations", + "langsmith/trace-with-langchain", + "langsmith/trace-with-langgraph", + "langsmith/trace-anthropic", + "langsmith/trace-openai", + "langsmith/trace-with-autogen", + "langsmith/trace-claude-agent-sdk", + "langsmith/trace-claude-code", + "langsmith/trace-with-crewai", + "langsmith/trace-with-google-adk", + "langsmith/trace-with-instructor", + "langsmith/trace-with-openai-agents-sdk", + "langsmith/trace-with-opentelemetry", + "langsmith/trace-with-semantic-kernel", + "langsmith/trace-with-vercel-ai-sdk" + ] + }, + { + "group": "Manual instrumentation", + "pages": [ + "langsmith/annotate-code", + "langsmith/trace-with-api", + "langsmith/log-llm-trace", + "langsmith/log-retriever-trace" + ] + }, + "langsmith/threads" + ] + }, + { + "group":"Configuration & troubleshooting", + "pages": [ + { + "group": "Project & environment settings", + "pages": [ + "langsmith/log-traces-to-project", + "langsmith/trace-without-env-vars", + "langsmith/sample-traces" + ] + }, + { + "group": "Advanced tracing techniques", + "pages": [ + "langsmith/distributed-tracing", + "langsmith/serverless-environments", + "langsmith/log-multimodal-traces", + "langsmith/trace-generator-functions" + ] + }, + { + "group": "Data & privacy", + "pages": [ + "langsmith/add-metadata-tags", + "langsmith/mask-inputs-outputs", + "langsmith/upload-files-with-traces" + ] + }, + { + "group": "Troubleshooting guides", + "pages": [ + "langsmith/nest-traces", + "langsmith/troubleshooting-variable-caching", + "langsmith/collector-proxy" + ] + } + ] + }, + { + "group": "Viewing & managing traces", + "pages": [ + "langsmith/filter-traces-in-application", + "langsmith/export-traces", + "langsmith/compare-traces", + "langsmith/share-trace", + "langsmith/platform-logs", + "langsmith/data-export" + ] + }, + { + "group": "Automations", + "pages": [ + "langsmith/rules", + "langsmith/webhooks" + ] + }, + { + "group": "Feedback & evaluation", + "pages": [ + "langsmith/attach-user-feedback", + "langsmith/online-evaluations" + ] + }, + { + "group": "Monitoring & alerting", + "pages": [ + "langsmith/dashboards", + "langsmith/alerts", + "langsmith/alerts-webhook", + "langsmith/insights" + ] + }, + { + "group": "Data type reference", + "pages": [ + "langsmith/run-data-format", + "langsmith/feedback-data-format", + "langsmith/trace-query-syntax" + ] + } + ] + }, + { + "tab": "Evaluation", + "pages": [ + "langsmith/evaluation", + "langsmith/evaluation-quickstart", + "langsmith/evaluation-concepts", + "langsmith/evaluation-approaches", + { + "group": "Datasets", + "pages": [ + { + "group": "Create a dataset", + "pages": [ + "langsmith/manage-datasets-in-application", + "langsmith/manage-datasets-programmatically" + ] + }, + "langsmith/manage-datasets", + "langsmith/custom-output-rendering" + ] + }, + { + "group": "Set up evaluations", + "pages": [ + { + "group": "Run an evaluation", + "pages": [ + "langsmith/evaluate-llm-application", + "langsmith/run-evaluation-from-prompt-playground", + "langsmith/prebuilt-evaluators" + ] + }, + { + "group": "Evaluation types", + "pages": [ + "langsmith/code-evaluator", + "langsmith/llm-as-judge", + "langsmith/composite-evaluators", + "langsmith/summary", + "langsmith/evaluate-pairwise" + ] + }, + { + "group": "Frameworks & integrations", + "pages": [ + "langsmith/evaluation-async", + "langsmith/pytest", + "langsmith/vitest-jest", + "langsmith/run-evals-api-only" + ] + }, + { + "group": "Evaluation techniques", + "pages": [ + "langsmith/define-target-function", + "langsmith/evaluate-on-intermediate-steps", + "langsmith/multiple-scores", + "langsmith/metric-type", + "langsmith/bind-evaluator-to-dataset", + "langsmith/repetition", + "langsmith/rate-limiting", + "langsmith/local", + "langsmith/langchain-runnable", + "langsmith/evaluate-graph", + "langsmith/evaluate-existing-experiment", + "langsmith/evaluate-with-attachments", + "langsmith/multi-turn-simulation", + "langsmith/trajectory-evals" + ] + }, + { + "group": "Improve evaluators", + "pages": [ + "langsmith/improve-judge-evaluator-feedback", + "langsmith/create-few-shot-evaluators", + "langsmith/index-datasets-for-dynamic-few-shot-example-selection" + ] + }, + { + "group": "Tutorials", + "pages": [ + "langsmith/evaluate-chatbot-tutorial", + "langsmith/evaluate-rag-tutorial", + "langsmith/test-react-agent-pytest", + "langsmith/evaluate-complex-agent", + "langsmith/run-backtests-new-agent" + ] + } + ] + }, + { + "group": "Analyze experiment results", + "pages": [ + "langsmith/analyze-an-experiment", + "langsmith/compare-experiment-results", + "langsmith/filter-experiments-ui", + "langsmith/fetch-perf-metrics-experiment", + "langsmith/upload-existing-experiments" + ] + }, + { + "group": "Annotation & human feedback", + "pages": [ + "langsmith/annotation-queues", + "langsmith/set-up-feedback-criteria", + "langsmith/annotate-traces-inline", + "langsmith/audit-evaluator-scores" + ] + }, + { + "group": "Common data types", + "pages": [ + "langsmith/example-data-format", + "langsmith/dataset-json-types", + "langsmith/dataset-transformations" + ] + } + ] + }, + { + "tab": "Prompt engineering", + "pages": [ + "langsmith/prompt-engineering", + "langsmith/prompt-engineering-quickstart", + "langsmith/prompt-engineering-concepts", + { + "group": "Create and update prompts", + "pages": [ + "langsmith/create-a-prompt", + "langsmith/manage-prompts", + "langsmith/manage-prompts-programmatically", + "langsmith/managing-model-configurations", + "langsmith/use-tools", + "langsmith/multimodal-content", + "langsmith/write-prompt-with-ai", + { + "group": "Connect to models", + "pages": [ + "langsmith/custom-openai-compliant-model", + "langsmith/custom-endpoint" + ] + } + ] + }, + { + "group": "Tutorials", + "pages": [ + "langsmith/optimize-classifier", + "langsmith/prompt-commit", + "langsmith/multiple-messages" + ] + } + ] + }, + { + "tab": "Deployment", + "pages": [ + "langsmith/deployments", + "langsmith/local-server", + "langsmith/app-development", + "langsmith/deployment-quickstart", + { + "group": "Configure app for deployment", + "pages": [ + "langsmith/application-structure", + { + "group": "Setup", + "pages": [ + "langsmith/setup-app-requirements-txt", + "langsmith/setup-pyproject", + "langsmith/setup-javascript", + "langsmith/monorepo-support" ] }, { - "group": "Core capabilities", + "group": "Deployment components", "pages": [ - "langsmith/streaming", - "langsmith/add-human-in-the-loop", - "langsmith/human-in-the-loop-time-travel", - "langsmith/server-mcp", - "langsmith/server-a2a", - "langsmith/use-webhooks", - { - "group": "Double-texting", - "pages": [ - "langsmith/double-texting", - "langsmith/interrupt-concurrent", - "langsmith/rollback-concurrent", - "langsmith/reject-concurrent", - "langsmith/enqueue-concurrent" - ] - } + "langsmith/components", + "langsmith/agent-server", + "langsmith/data-plane", + "langsmith/control-plane" ] }, - { - "group": "Tutorials", - "pages": [ - "langsmith/autogen-integration", - "langsmith/use-stream-react", - "langsmith/generative-ui-react" - ] - } - ] - }, - { - "group": "Studio", - "pages": [ - "langsmith/studio", - "langsmith/quick-start-studio", - "langsmith/use-studio", - "langsmith/observability-studio", - "langsmith/troubleshooting-studio" - ] - }, - { - "group": "Auth & access control", - "pages": [ - "langsmith/auth", - "langsmith/custom-auth", - "langsmith/set-up-custom-auth", - "langsmith/resource-auth", - "langsmith/add-auth-server", - "langsmith/openapi-security", - "langsmith/agent-auth" - ] - }, - { - "group": "Server customization", - "pages": [ - "langsmith/custom-lifespan", - "langsmith/custom-middleware", - "langsmith/custom-routes" + "langsmith/graph-rebuild", + "langsmith/use-remote-graph", + "langsmith/semantic-search", + "langsmith/configure-ttl", + "langsmith/cicd-pipeline-example" ] - }, - { - "group": "Reference", - "pages": [ - "langsmith/remote-graph", - "langsmith/cli", - "langsmith/env-var" - ] - } - ] - }, - { - "tab": "Agent Builder", - "pages": [ - "langsmith/agent-builder", - "langsmith/agent-builder-setup", - "langsmith/agent-builder-tools", - "langsmith/agent-builder-slack-app" - ] - }, - { - "tab": "Platform setup", - "groups": [ - { - "group": "Overview", - "pages": [ - "langsmith/platform-setup", - "langsmith/cloud" - ] - }, - { - "group": "Hybrid", - "pages": [ - "langsmith/hybrid", - "langsmith/deploy-hybrid" - ] - }, - { - "group": "Self-hosted", - "pages": [ - "langsmith/self-hosted", - { - "group": "Setup guides", - "pages": [ - { - "group": "LangSmith", - "icon": "server", - "pages": [ - "langsmith/kubernetes", - "langsmith/docker" - ] - }, - "langsmith/deploy-self-hosted-full-platform", - { - "group": "Manage an installation", - "pages": [ - "langsmith/self-host-usage", - "langsmith/self-host-upgrades", - "langsmith/self-host-egress", - "langsmith/self-host-organization-charts", - "langsmith/langsmith-managed-clickhouse", - "langsmith/self-host-ingress", - "langsmith/self-host-mirroring-images" - ] - } - ] - }, - { - "group": "Configuration", - "pages": [ - "langsmith/self-host-scale", - "langsmith/self-host-ttl", - "langsmith/custom-docker", - "langsmith/self-host-playground-environment-settings", - "langsmith/troubleshooting" - ] - }, - { - "group": "Connect external services", - "pages": [ - "langsmith/self-host-blob-storage", - "langsmith/self-host-external-clickhouse", - "langsmith/self-host-external-postgres", - "langsmith/self-host-external-redis" - ] - }, - { - "group": "Platform auth & access control", - "pages": [ - "langsmith/self-host-basic-auth", - "langsmith/self-host-sso", - "langsmith/self-host-user-management", - "langsmith/self-host-custom-tls-certificates", - "langsmith/self-host-using-an-existing-secret" - ] - }, - { - "group": "Self-hosted observability", - "pages": [ - "langsmith/export-backend", - "langsmith/langsmith-collector", - "langsmith/observability-stack" - ] - }, - { - "group": "Scripts for management tasks", - "pages": [ - "langsmith/script-delete-a-workspace", - "langsmith/script-delete-an-organization", - "langsmith/script-delete-traces", - "langsmith/script-generate-clickhouse-stats", - "langsmith/script-generate-query-stats", - "langsmith/script-running-pg-support-queries", - "langsmith/script-running-ch-support-queries" - ] - } + }, + { + "group": "Deployment guides", + "pages": [ + "langsmith/deploy-to-cloud", + "langsmith/deploy-with-control-plane", + "langsmith/deploy-standalone-server" + ] + }, + { + "group": "App development", + "pages": [ + { + "group": "Data models", + "pages": [ + { + "group": "Assistants", + "pages": [ + "langsmith/assistants", + "langsmith/configuration-cloud", + "langsmith/use-threads" + ] + }, + { + "group": "Runs", + "pages": [ + "langsmith/background-run", + "langsmith/same-thread", + "langsmith/cron-jobs", + "langsmith/stateless-runs", + "langsmith/configurable-headers" + ] + } + ] + }, + { + "group": "Core capabilities", + "pages": [ + "langsmith/streaming", + "langsmith/add-human-in-the-loop", + "langsmith/human-in-the-loop-time-travel", + "langsmith/server-mcp", + "langsmith/server-a2a", + "langsmith/use-webhooks", + { + "group": "Double-texting", + "pages": [ + "langsmith/double-texting", + "langsmith/interrupt-concurrent", + "langsmith/rollback-concurrent", + "langsmith/reject-concurrent", + "langsmith/enqueue-concurrent" + ] + } + ] + }, + { + "group": "Tutorials", + "pages": [ + "langsmith/autogen-integration", + "langsmith/use-stream-react", + "langsmith/generative-ui-react" + ] + } + ] + }, + { + "group": "Studio", + "pages": [ + "langsmith/studio", + "langsmith/quick-start-studio", + "langsmith/use-studio", + "langsmith/observability-studio", + "langsmith/troubleshooting-studio" + ] + }, + { + "group": "Auth & access control", + "pages": [ + "langsmith/auth", + "langsmith/custom-auth", + "langsmith/set-up-custom-auth", + "langsmith/resource-auth", + "langsmith/add-auth-server", + "langsmith/openapi-security", + "langsmith/agent-auth" + ] + }, + { + "group": "Server customization", + "pages": [ + "langsmith/custom-lifespan", + "langsmith/custom-middleware", + "langsmith/custom-routes" + ] + }, + { + "group": "Reference", + "pages": [ + "langsmith/remote-graph", + "langsmith/cli", + "langsmith/env-var" + ] + } + ] + }, + { + "tab": "Agent Builder", + "pages": [ + "langsmith/agent-builder", + "langsmith/agent-builder-setup", + "langsmith/agent-builder-tools", + "langsmith/agent-builder-slack-app" + ] + }, + { + "tab": "Platform setup", + "groups": [ + { + "group": "Overview", + "pages": [ + "langsmith/platform-setup", + "langsmith/cloud" + ] + }, + { + "group": "Hybrid", + "pages": [ + "langsmith/hybrid", + "langsmith/deploy-hybrid" + ] + }, + { + "group": "Self-hosted", + "pages": [ + "langsmith/self-hosted", + { + "group": "Setup guides", + "pages": [ + { + "group": "LangSmith", + "icon": "server", + "pages": [ + "langsmith/kubernetes", + "langsmith/docker" + ] + }, + "langsmith/deploy-self-hosted-full-platform", + { + "group": "Manage an installation", + "pages": [ + "langsmith/self-host-usage", + "langsmith/self-host-upgrades", + "langsmith/self-host-egress", + "langsmith/self-host-organization-charts", + "langsmith/langsmith-managed-clickhouse", + "langsmith/self-host-ingress", + "langsmith/self-host-mirroring-images" + ] + } + ] + }, + { + "group": "Configuration", + "pages": [ + "langsmith/self-host-scale", + "langsmith/self-host-ttl", + "langsmith/custom-docker", + "langsmith/self-host-playground-environment-settings", + "langsmith/troubleshooting" + ] + }, + { + "group": "Connect external services", + "pages": [ + "langsmith/self-host-blob-storage", + "langsmith/self-host-external-clickhouse", + "langsmith/self-host-external-postgres", + "langsmith/self-host-external-redis" + ] + }, + { + "group": "Platform auth & access control", + "pages": [ + "langsmith/self-host-basic-auth", + "langsmith/self-host-sso", + "langsmith/self-host-user-management", + "langsmith/self-host-custom-tls-certificates", + "langsmith/self-host-using-an-existing-secret" + ] + }, + { + "group": "Self-hosted observability", + "pages": [ + "langsmith/export-backend", + "langsmith/langsmith-collector", + "langsmith/observability-stack" + ] + }, + { + "group": "Scripts for management tasks", + "pages": [ + "langsmith/script-delete-a-workspace", + "langsmith/script-delete-an-organization", + "langsmith/script-delete-traces", + "langsmith/script-generate-clickhouse-stats", + "langsmith/script-generate-query-stats", + "langsmith/script-running-pg-support-queries", + "langsmith/script-running-ch-support-queries" + ] + } ] } ] @@ -1410,8 +1407,6 @@ ] } ] - } - ] }, "interaction": { "drilldown": true diff --git a/src/oss/contributing/documentation.mdx b/src/oss/contributing/documentation.mdx index 9963433852..d80a86d817 100644 --- a/src/oss/contributing/documentation.mdx +++ b/src/oss/contributing/documentation.mdx @@ -3,86 +3,216 @@ title: Contributing to documentation sidebarTitle: Documentation --- -Accessible documentation is a vital part of LangChain. We welcome both documentation for new features/[integrations](/oss/contributing/publish-langchain#adding-documentation), as well as community improvements to existing docs. +Accessible documentation is a vital part of LangChain. We welcome both documentation for new features and [integrations](/oss/contributing/publish-langchain#adding-documentation), as well as community improvements to existing docs. - We generally do not merge new tutorials from outside contributors without an acute need. If you feel that a certain topic is missing from docs or is not sufficiently covered, please [open a new issue](https://github.com/langchain-ai/docs/issues). + These are contribution guidelines for our open source documentation, but they also apply to the [LangSmith documentation](/langsmith/home). -All documentation falls under one of four categories: +## Contribute - - - Explanations that provide deeper understanding and insights - +### Quick edits - - Technical descriptions of APIs and implementation details - +For quick changes like fixing typos or changing a link, you can edit directly on GitHub without setting up a local development environment: - - Lessons that guide users through practical activities to build understanding - + + **Prerequisites:** + - A [GitHub](https://github.com/) account + - Basic familiarity of the [fork-and-pull workflow](https://graphite.dev/guides/understanding-git-fork-pull-request-workflow) for contributing + - - Task-oriented instructions for users who know what they want to accomplish - - +1. At the bottom of the page you want to edit, click the link **Edit the source of this page on GitHub**. +1. GitHub will prompt you to fork the repository to your account. Make sure to fork into your personal account. +1. Make the changes directly in GitHub's web editor. +1. Click **Commit changes...** and give your commit a descriptive title like `fix(docs): summary of change`. If applicable, add an [extended description](https://www.gitkraken.com/learn/git/best-practices/git-commit-message#git-commit-message-structure). +1. GitHub will redirect you to create a pull request. Give it a title (often the same as the commit) and follow the PR template checklist, if present. ---- + + Docs PRs are typically reviewed within a few days. Keep an eye on your PR to address any feedback from maintainers. Do not bump the PR unless you have new information to provide - maintainers will address it as their availability permits. + -## Getting started +### Larger edits and additions -### Quick edit: fix a typo +For larger changes, additions, or ongoing contributions, it's important to set up a local development environment on your machine. Our documentation build pipeline offers local preview and live reload as you edit, important for ensuring your changes appear as intended before submitting. -For simple changes like fixing typos, you can edit directly on GitHub without setting up a local development environment: +#### Set up local environment - - **Prerequisites:** - - A [GitHub](https://github.com/) account - - Basic familiarity of the [fork-and-pull workflow](https://graphite.dev/guides/understanding-git-fork-pull-request-workflow) for contributing - +1. Clone this repo. Follow the steps outlined in [IDE_SETUP.md](https://github.com/langchain-ai/docs/blob/main/IDE_SETUP.md). +2. [Install `uv`](https://docs.astral.sh/uv/) (if not already installed) +3. [Install `npm`](https://nodejs.org/en/download/) (if not already installed) +4. Create and activate a virtual environment: + + ```bash + cd docs + uv venv + source .venv/bin/activate + ``` + +5. Install dependencies: + + ```bash + uv sync --all-groups + ``` + + ```bash + npm i -g mint + ``` + +After install, you'll have access to the `docs` command: - - - Navigate to any documentation page, scroll to the bottom of the page, and click the link "Edit the source of this page on GitHub" - +```bash +docs --help +``` - - GitHub will prompt you to fork the repository to your account. Make sure to fork into your personal account - +Common commands: - - Correct the typo directly in GitHub's web editor - +* `docs dev` - Start development mode with file watching and hot reload +* `docs build` - Build documentation - - Click `Commit changes...` and give your commit a descriptive title like `fix(docs): summary of change`. If applicable, add an [extended description](https://www.gitkraken.com/learn/git/best-practices/git-commit-message#git-commit-message-structure) - +See [Available commands](#available-commands) for more details. - - GitHub will redirect you to create a pull request. Give it a title (often the same as the commit) and follow the PR template checklist, if present - - +#### Edit documentation - Docs PRs are typically reviewed within a few days. Keep an eye on your PR to address any feedback from maintainers. Do not bump the PR unless you have new information to provide - maintainers will address it as their availability permits. +**Only edit files in `src/`** - The `build/` directory is automatically generated. -### Full development IDE setup +1. Ensure your [dev environment is set up](#set-up-local-environment) and that you have followed the steps in [IDE_SETUP.md](https://github.com/langchain-ai/docs/blob/main/IDE_SETUP.md) to configure your IDE/editor to automatically apply the correct settings. -For larger changes or ongoing contributions, it's important to set up a local development environment on your machine. Our documentation build pipeline offers local preview and live reload as you edit, important for ensuring your changes appear as intended before submitting. +1. Edit files in `src/`: + * Make changes to markdown files and the build system will automatically detect changes and rebuild affected files. + * If OSS content varies between Python and JavaScript/TypeScript, add content for [both in the same file](#co-locate-python-and-javascripttypescript-oss-content). Otherwise, content will be identical for both languages. + * Use [Mintlify syntax](https://mintlify.com/docs) for formatting. -Please review the steps to set up your environment outlined in the docs repo [`README.md`](https://github.com/langchain-ai/docs?tab=readme-ov-file#contributing). +1. Start development mode to preview changes locally: ---- + ```bash + docs dev + ``` + + This starts a development server with hot reload at `http://localhost:3000`. + +1. Iterate: + * Continue editing and see changes reflected immediately. + * The development server rebuilds only changed files for faster feedback. + +1. Run the [quality checks](#run-quality-checks) to ensure your changes are valid. +1. Get approval from the relevant reviewers. + + To generate a preview build, [create a sharable preview build](#create-a-sharable-preview-build) (internal team members only). + +1. [Publish to production](#publish-to-prod) (internal team members only). + +#### Create a sharable preview build + + +Only internal team members can create sharable preview builds. + + +When you create or update a PR, a [preview branch/ID](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) is automatically generated for you. A comment will be left on the PR with the ID, which you can then use to generate a preview. You can also run this workflow manually if needed. Previews are useful for sharing work-in-progress changes with others. + +1. Copy the preview branch's ID from the comment. +1. In the [Mintlify dashboard](https://dashboard.mintlify.com/langchain-5e9cc07a/langchain-5e9cc07a?section=previews), click **Create preview deployment**. +1. Enter the preview branch's ID. +1. Click **Create deployment**. + A **Manual update** will display in the **Previews** table. +1. Select the preview and click **Visit** to view the preview build. + +To redeploy the preview build, click **Redeploy** on the Mintlify dashboard. + +#### Run quality checks + +Before submitting changes, ensure your code passes formatting and linting checks: + +```bash +# Check broken links +make mint-broken-links + +# Format code automatically +make format + +# Check for linting issues +make lint + +# Fix markdown issues +make lint_md_fix + +# Run tests to ensure your changes don't break existing functionality +make test +``` + +For more details, see the [available commands](https://github.com/langchain-ai/docs?tab=readme-ov-file#available-commands) section in the README. + + +All pull requests are automatically checked by CI/CD. The same linting and formatting standards will be enforced, and PRs cannot be merged if these checks fail. + + +#### Publish to prod + + +Only internal team members can publish to production. + + +Once your branch has been merged into `main`, you need to push the changes to `prod` for them to render on the live docs site. Use the [Publish documentation GH action](https://github.com/langchain-ai/docs/actions/workflows/publish.yml): + +1. Go to [Publish documentation](https://github.com/langchain-ai/docs/actions/workflows/publish.yml). +2. Click the **Run workflow** button. +3. Select the **main** branch to deploy. +4. Click **Run workflow**. ## Documentation types +All documentation falls under one of four categories: + + + + + Task-oriented instructions for users who know what they want to accomplish. + + + + Explanations that provide deeper understanding and insights. + + + + Technical descriptions of APIs and implementation details. + + + + Lessons that guide users through practical activities to build understanding. + + + + - Where applicable, all documentation must have translations in both Python and JavaScript/TypeScript. See [our localization guide](#localization) for details. + Where applicable, all documentation must have both Python and JavaScript/TypeScript content. For more details, see the [co-locate Python and JavaScript/TypeScript content](#co-locate-python-and-javascripttypescript-content) section. +### How-to guides + +How-to guides are task-oriented instructions for users who know what they want to accomplish. Examples of how-to guides are on the [LangChain](/oss/langchain/overview) and [LangGraph](/oss/langgraph/overview) tabs. + + + + - **Task-focused**: Focus on a specific task or problem + - **Step-by-step**: Break down the task into smaller steps + - **Hands-on**: Provide concrete examples and code snippets + + + + - Focus on the **how** rather than the **why** + - Use concrete examples and code snippets + - Break down the task into smaller steps + - Link to related conceptual guides and references + + + + - [Messages](/oss/langchain/messages) + - [Tools](/oss/langchain/tools) + - [Streaming](/oss/langgraph/streaming) + + + ### Conceptual guides Conceptual guide cover core concepts abstractly, providing deep understanding. @@ -96,32 +226,29 @@ Conceptual guide cover core concepts abstractly, providing deep understanding. - - Explain design decisions - *"why does concept X exist?"* - - Use analogies and reference alternatives + - Focus on the **"why"** rather than the "how" + - Provides supplementary information not necessarily required for feature usage + - Can use analogies and reference alternatives - Avoid blending in too much reference content - Link to related tutorials and how-to guides - - Focus on the **"why"** rather than the "how" - - - - + - [Memory](/oss/concepts/memory) + - [Context](/oss/concepts/context) + - [Graph API](/oss/langgraph/graph-api) + - [Functional API](/oss/langgraph/functional-api) -### References +### Reference Reference documentation contains detailed, low-level information describing exactly what functionality exists and how to use it. -:::python - -::: - -:::js - -::: + + + + A good reference should: - Describe what exists (all parameters, options, return values) @@ -152,22 +279,47 @@ A good reference should: ---- +### Tutorials -## Writing standard +Tutorials are longer form step-by-step guides that builds upon itself and takes users through a specific practical activity to build understanding. Tutorials are typically found on the [Learn](/oss/learn) tab. - + + We generally do not merge new tutorials from outside contributors without an acute need. If you feel that a certain topic is missing from docs or is not sufficiently covered, please [open a new issue](https://github.com/langchain-ai/docs/issues). + + + + + - **Practical**: Focus on practical activities to build understanding. + - **Step-by-step**: Break down the activity into smaller steps. + - **Hands-on**: Provide sequential, working code snippets. + - **Supplementary**: Provide additional context and information not necessarily required for feature usage. + + + + - Code snippets should be sequential and working if the user follows the steps in order. + - Provide some context for the activity, but link to related conceptual guides and references for more detailed information. + + + + - [Semantic search](/oss/langchain/knowledge-base) + - [RAG agent](/oss/langchain/rag) + + + +## Writing standards + + :::python Reference documentation has different standards - see the [reference docs contributing guide](https://github.com/langchain-ai/docs/blob/main/reference/python/README.md) for details. ::: :::js Reference documentation has different standards - see the [reference docs contributing guide](https://github.com/langchain-ai/docs/blob/main/reference/javascript/README.md) for details. ::: - + ### Mintlify components -Use appropriate [Mintlify components](https://mintlify.com/docs/text) to enhance readability: +Use [Mintlify components](https://mintlify.com/docs/text) to enhance readability: @@ -179,15 +331,15 @@ Use appropriate [Mintlify components](https://mintlify.com/docs/text) to enhance - - `` for sequential procedures - - `` for platform-specific content - - `` and `` for progressive disclosure - - `` and `` for highlighting content + - `` for an overview of sequential procedures. **Not** for long lists of steps or tutorials. + - `` for platform-specific content. + - `` and `` for nice-to-have information that can be collapsed by default (e.g., full code examples). + - `` and `` for highlighting content. - - `` for multiple language examples - - Always specify language tags on code blocks + - `` for multiple language examples. + - Always specify language tags on code blocks (e.g., ` ```python`, ` ```javascript`). - Titles for code blocks (e.g. `Success`, `Error Response`) @@ -199,6 +351,7 @@ Every documentation page must begin with YAML frontmatter: ```yaml --- title: "Clear, specific title" +sidebarTitle: "Short title for the sidebar (optional)" --- ``` @@ -218,19 +371,14 @@ JavaScript/TypeScript-specific content. In real docs, the preceding backslash (b Content for both languages (not wrapped) ``` +This will generate two outputs (one for each language) at `/oss/python/concepts/foo.mdx` and `/oss/javascript/concepts/foo.mdx`. Each outputted page will need to be added to the `/src/docs.json` file to be included in the navigation. + We don't want a lack of parity to block contributions. If a feature is only available in one language, it's okay to have documentation only in that language until the other language catches up. In such cases, please include a note indicating that the feature is not yet available in the other language. - - + If you need help translating content between Python and JavaScript/TypeScript, please ask in the [community slack](https://www.langchain.com/join-community) or tag a maintainer in your PR. -### Localization - -We are working to add support for other languages, thanks to our LangChain Ambassadors! - ---- - ## Quality standards ### General guidelines @@ -257,101 +405,6 @@ Ensure documentation is accessible to all users: - Use specific, actionable link text instead of "click here" - Include descriptive alt text for all images and diagrams -### Testing and validation - -Before submitting documentation: - - - - Run all code examples to ensure they work correctly - - - - ```bash - make lint - make format - ``` - - - - ```bash - docs build - ``` - Verify the build completes without errors - - - - Check that all internal links work correctly - - - ---- - -## In-code documentation - -### Language and style - - - Use [Google-style docstrings](https://google.github.io/styleguide/pyguide.html) with complete type hints for all public functions. - - -Follow these standards for all documentation: - -- **Voice**: Use second person ("you") for instructions -- **Tense**: Use active voice and present tense -- **Clarity**: Write clear, direct language for technical audiences -- **Consistency**: Use consistent terminology throughout -- **Conciseness**: Keep sentences concise while providing necessary context - -### Code examples - - - Always test code examples before publishing. Never include real API keys or secrets. - - -Requirements for code examples: - - - - Include complete, runnable examples that users can copy and execute without errors - - - - Use realistic data instead of placeholder values like "foo" or "example" - - - - Show proper error handling and edge case management - - - - Add explanatory comments for complex logic - - - -Example of a well-documented function: - -```python -def filter_unknown_users(users: list[str], known_users: set[str]) -> list[str]: - """Filter out users that are not in the known users set. - - Args: - users: List of user identifiers to filter. - known_users: Set of known/valid user identifiers. - - Returns: - List of users that are not in the known_users set. - - Raises: - ValueError: If users list contains invalid identifiers. - """ - return [user for user in users if user not in known_users] -``` - -## Getting help - -Our goal is to have the simplest developer setup possible. Should you experience any difficulty getting setup, please ask in the [community slack](https://www.langchain.com/join-community) or open a [forum post](https://forum.langchain.com/). +## Get help - - You now have everything you need to contribute high-quality documentation to LangChain! 🎤🦜 - +Our goal is to have the simplest developer setup possible. Should you experience any difficulty getting setup, please ask in the [community slack](https://www.langchain.com/join-community) or open a [forum post](https://forum.langchain.com/). Internal team members can reach out in the [#documentation](https://langchain.slack.com/archives/C04GWPE38LV) Slack channel. diff --git a/src/oss/javascript/integrations/chat/openai.mdx b/src/oss/javascript/integrations/chat/openai.mdx index b1fbb56681..fd295adbe5 100644 --- a/src/oss/javascript/integrations/chat/openai.mdx +++ b/src/oss/javascript/integrations/chat/openai.mdx @@ -15,7 +15,7 @@ This guide will help you getting started with ChatOpenAI [chat models](/oss/lang **OpenAI models hosted on Azure** - Note that certain OpenAI models can also be accessed via the [Microsoft Azure platform](https://azure.microsoft.com/en-us/products/ai-foundry/models/openai/). To use the Azure OpenAI service use the [`AzureChatOpenAI`](/oss/integrations/chat/azure_chat_openai) integration. + Note that certain OpenAI models can also be accessed via the [Microsoft Azure platform](https://azure.microsoft.com/en-us/products/ai-foundry/models/openai/). ## Overview diff --git a/src/oss/python/integrations/chat/groq.mdx b/src/oss/python/integrations/chat/groq.mdx index acdc9a8657..80b976282a 100644 --- a/src/oss/python/integrations/chat/groq.mdx +++ b/src/oss/python/integrations/chat/groq.mdx @@ -2,9 +2,9 @@ title: ChatGroq --- -import GroqGrok from '/snippets/oss/groq-grok.mdx'; - - + + This page makes reference to [Groq](https://console.groq.com/docs/overview), an AI hardware and software company. For information on how to use Grok models (provided by [xAI](https://docs.x.ai/docs/overview)), see the [xAI provider page](/oss/python/integrations/providers/xai). + This will help you get started with Groq [chat models](/oss/langchain/models). For detailed documentation of all ChatGroq features and configurations head to the [API reference](https://python.langchain.com/api_reference/groq/chat_models/langchain_groq.chat_models.ChatGroq.html). For a list of all Groq models, visit this [link](https://console.groq.com/docs/models?utm_source=langchain). diff --git a/src/oss/python/integrations/chat/xai.mdx b/src/oss/python/integrations/chat/xai.mdx index 56ed3e6433..3df372bb36 100644 --- a/src/oss/python/integrations/chat/xai.mdx +++ b/src/oss/python/integrations/chat/xai.mdx @@ -2,9 +2,9 @@ title: ChatXAI --- -import GrokGroq from '/snippets/oss/grok-groq.mdx'; - - + + This page makes reference to Grok models provided by [xAI](https://docs.x.ai/docs/overview) - not to be confused with [Groq](https://console.groq.com/docs/overview), a separate AI hardware and software company. See the [Groq provider page](/oss/python/integrations/providers/groq). + This page will help you get started with xAI [chat models](/oss/langchain/models). For detailed documentation of all `ChatXAI` features and configurations, head to the [API reference](https://reference.langchain.com/python/integrations/langchain_xai/). diff --git a/src/oss/python/integrations/providers/groq.mdx b/src/oss/python/integrations/providers/groq.mdx index 63685f1722..f98acb92bc 100644 --- a/src/oss/python/integrations/providers/groq.mdx +++ b/src/oss/python/integrations/providers/groq.mdx @@ -2,9 +2,9 @@ title: Groq --- -import GroqGrok from '/snippets/oss/groq-grok.mdx'; - - + + This page makes reference to [Groq](https://console.groq.com/docs/overview), an AI hardware and software company. For information on how to use Grok models (provided by [xAI](https://docs.x.ai/docs/overview)), see the [xAI provider page](/oss/python/integrations/providers/xai). + >[Groq](https://groq.com) developed the world's first Language Processing Unit™, or `LPU`. > The `Groq LPU` has a deterministic, single core streaming architecture that sets the standard diff --git a/src/oss/python/integrations/providers/xai.mdx b/src/oss/python/integrations/providers/xai.mdx index aa2fbd5851..2866e20046 100644 --- a/src/oss/python/integrations/providers/xai.mdx +++ b/src/oss/python/integrations/providers/xai.mdx @@ -2,9 +2,9 @@ title: xAI --- -import GrokGroq from '/snippets/oss/grok-groq.mdx'; - - + + This page makes reference to Grok models provided by [xAI](https://docs.x.ai/docs/overview) - not to be confused with [Groq](https://console.groq.com/docs/overview), a separate AI hardware and software company. See the [Groq provider page](/oss/python/integrations/providers/groq). + [xAI](https://console.x.ai) offers an API to interact with Grok models. This example goes over how to use LangChain to interact with xAI models. diff --git a/src/oss/python/integrations/text_embedding/sambanova.mdx b/src/oss/python/integrations/text_embedding/sambanova.mdx index 31c395e010..967993e7a6 100644 --- a/src/oss/python/integrations/text_embedding/sambanova.mdx +++ b/src/oss/python/integrations/text_embedding/sambanova.mdx @@ -12,7 +12,7 @@ This will help you get started with SambaNova embedding models using LangChain. | Provider | Package | |:--------:|:-------:| -| [SambaNova](/providers/sambanova/) | [langchain-sambanova](/oss/integrations/providers/sambanova/) | +| [SambaNova](/oss/integrations/providers/sambanova/) | [langchain-sambanova](/oss/integrations/providers/sambanova/) | ## Setup diff --git a/src/snippets/oss/grok-groq.mdx b/src/snippets/oss/grok-groq.mdx deleted file mode 100644 index 8e033629c9..0000000000 --- a/src/snippets/oss/grok-groq.mdx +++ /dev/null @@ -1,3 +0,0 @@ - - This page makes reference to Grok models provided by [xAI](https://docs.x.ai/docs/overview) - not to be confused with [Groq](https://console.groq.com/docs/overview), a separate AI hardware and software company. See the [Groq provider page](/oss/providers/groq). - diff --git a/src/snippets/oss/groq-grok.mdx b/src/snippets/oss/groq-grok.mdx deleted file mode 100644 index df5d00011d..0000000000 --- a/src/snippets/oss/groq-grok.mdx +++ /dev/null @@ -1,3 +0,0 @@ - - This page makes reference to [Groq](https://console.groq.com/docs/overview), an AI hardware and software company. For information on how to use Grok models (provided by [xAI](https://docs.x.ai/docs/overview)), see the [xAI provider page](/oss/providers/xai). -