mirror of
https://github.com/langchain-ai/docs.git
synced 2026-07-19 16:33:35 -04:00
add/update agent files (#3007)
Added repository structure, navigation map, and common workflows to all four agent instruction files (CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md) so AI agents can orient in the codebase without exploring directories or parsing the 88KB docs.json. Fixes DOC-823 Note: Adding more depth to our dir structure does **not** help agents, as agents can rely on docs.json and agent nav maps
This commit is contained in:
committed by
GitHub
parent
c25152658e
commit
3d79e3bc7d
+121
@@ -0,0 +1,121 @@
|
||||
# LangChain Documentation Guidelines
|
||||
|
||||
Documentation for LangChain products hosted on Mintlify. These guidelines apply to manually authored docs only—not `**/reference/**` directories or build artifacts.
|
||||
|
||||
For full guidelines, see `CLAUDE.md` in the repository root.
|
||||
|
||||
## Critical rules
|
||||
|
||||
1. **Always ask for clarification** rather than making assumptions
|
||||
2. **Never use markdown in frontmatter `description`** — breaks SEO
|
||||
3. **Never edit `reference/` directory** — auto-generated
|
||||
4. **Always update `src/docs.json`** when adding new pages
|
||||
5. **Use Tabler icons only** — not FontAwesome
|
||||
6. **Test code examples** before including them
|
||||
|
||||
## Repository structure
|
||||
|
||||
```
|
||||
docs/
|
||||
├── src/ # All manually authored content
|
||||
│ ├── docs.json # Mintlify config + navigation (88KB)
|
||||
│ ├── index.mdx # Home page
|
||||
│ ├── style.css # Custom CSS
|
||||
│ ├── langsmith/ # LangSmith product docs (~324 MDX files)
|
||||
│ ├── oss/ # Open source docs (~1800 MDX files)
|
||||
│ │ ├── langchain/ # LangChain framework
|
||||
│ │ ├── langgraph/ # LangGraph framework
|
||||
│ │ ├── deepagents/ # Deep Agents
|
||||
│ │ ├── python/ # Python-specific (integrations, migrations, releases)
|
||||
│ │ ├── javascript/ # TypeScript-specific (integrations, migrations, releases)
|
||||
│ │ ├── integrations/ # Shared integration content
|
||||
│ │ ├── concepts/ # Conceptual overviews
|
||||
│ │ └── contributing/ # Contribution guides
|
||||
│ ├── snippets/ # Reusable MDX snippets
|
||||
│ ├── images/ # Documentation images
|
||||
│ │ ├── brand/ # Logos, favicons
|
||||
│ │ └── providers/ # Provider icons (dark/ and light/ variants)
|
||||
│ └── fonts/ # Font files
|
||||
├── pipeline/ # Python build system & preprocessors
|
||||
├── reference/ # Auto-generated API reference — do not edit
|
||||
├── build/ # Build output — do not edit
|
||||
├── scripts/ # Helper utilities
|
||||
└── tests/ # Pipeline tests
|
||||
```
|
||||
|
||||
## Navigation map
|
||||
|
||||
Navigation is defined in `src/docs.json`. The site has 4 products. When adding pages, find the correct product/tab/group below, then update the matching section in `docs.json`.
|
||||
|
||||
### Home
|
||||
Single page (`src/index.mdx`). No tabs.
|
||||
|
||||
### LangSmith (`src/langsmith/`)
|
||||
7 tabs, all files in `src/langsmith/`:
|
||||
|
||||
| Tab | Groups |
|
||||
|-----|--------|
|
||||
| Get started | Account administration (Workspace setup, Users & access control, Billing & usage), Tools, Additional resources |
|
||||
| Observability | Tracing setup (Integrations, Manual instrumentation), Configuration & troubleshooting, Viewing & managing traces, Automations, Feedback & evaluation, Monitoring & alerting |
|
||||
| Evaluation | Datasets, Set up evaluations (Run, Types, Frameworks, Techniques, Tutorials), Analyze experiment results, Annotation & human feedback |
|
||||
| Prompt engineering | Create and update prompts, Tutorials |
|
||||
| Agent deployment | Configure app, Deployment guides, App development, Studio, Auth & access control, Server customization |
|
||||
| Platform setup | Overview, Hybrid, Self-hosted (by cloud provider, Setup guides, Enable features, Configuration, External services, Auth) |
|
||||
| Reference | LangSmith Deployment APIs, Releases |
|
||||
|
||||
### Agent Builder (`src/langsmith/agent-builder/`)
|
||||
Flat groups (no tabs): Get started, Tools and integrations, Advanced, Additional resources
|
||||
|
||||
### Open source (`src/oss/`)
|
||||
2 language dropdowns (Python, TypeScript), each with 7 identical tabs:
|
||||
|
||||
| Tab | Directory |
|
||||
|-----|-----------|
|
||||
| Deep Agents | `src/oss/deepagents/` |
|
||||
| LangChain | `src/oss/langchain/` |
|
||||
| LangGraph | `src/oss/langgraph/` |
|
||||
| Integrations | `src/oss/python/integrations/` or `src/oss/javascript/integrations/` |
|
||||
| Learn | `src/oss/` (various) |
|
||||
| Reference | `reference/` — auto-generated, do not edit |
|
||||
| Contribute | `src/oss/contributing/` |
|
||||
|
||||
## Quick reference
|
||||
|
||||
| What | Where/How |
|
||||
|------|-----------|
|
||||
| Navigation config | `src/docs.json` |
|
||||
| Reusable snippets | `src/snippets/` |
|
||||
| Provider icons | `src/images/providers/` |
|
||||
| Icon library | Tabler — https://tabler.io/icons |
|
||||
| Mintlify components | https://mintlify.com/docs/components |
|
||||
| Auto-link syntax | `@[ClassName]` — defined in `pipeline/preprocessors/link_map.py` |
|
||||
|
||||
## Frontmatter
|
||||
|
||||
Every MDX file requires:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: Clear, concise page title
|
||||
description: SEO summary — no markdown allowed (no links, backticks, formatting)
|
||||
---
|
||||
```
|
||||
|
||||
## Syntax
|
||||
|
||||
- Language-specific content: `:::python` or `:::js` fences (generates separate Python/JS pages)
|
||||
- Code highlighting: `# [!code highlight]`, `# [!code ++]`, `# [!code --]`
|
||||
- API reference links: `@[ClassName]` for first mention of SDK classes/methods
|
||||
|
||||
## Style
|
||||
|
||||
Follow [Google Developer Documentation Style Guide](https://developers.google.com/style).
|
||||
|
||||
- Be concise — second-person imperative present tense
|
||||
- Sentence-case headings with active verb, not gerund ("Add a tool" not "Adding a tool")
|
||||
- American English spelling
|
||||
- No markdown in description fields
|
||||
- No absolute URLs for internal links
|
||||
- No `/python/` or `/javascript/` in links (resolved by build pipeline)
|
||||
- No FontAwesome icon names
|
||||
- No H5 or H6 headings
|
||||
@@ -1,94 +1,119 @@
|
||||
# LangChain's unified documentation overview
|
||||
# LangChain Documentation Guidelines
|
||||
|
||||
This repository encompasses the comprehensive documentation for LangChain's products and services, hosted on the Mintlify platform. The documentation is divided into sections for each product. This is a shared set of guidelines to ensure consistency and quality across all content.
|
||||
Documentation for LangChain products hosted on Mintlify. These guidelines apply to manually authored docs only—not `**/reference/**` directories or build artifacts.
|
||||
|
||||
## Scope
|
||||
## Critical rules
|
||||
|
||||
**These instructions apply to manually authored documentation only. They do NOT apply to:**
|
||||
1. **Always ask for clarification** rather than making assumptions
|
||||
2. **Never use markdown in frontmatter `description`** — breaks SEO
|
||||
3. **Never edit `reference/` directory** — auto-generated
|
||||
4. **Always update `src/docs.json`** when adding new pages
|
||||
5. **Use Tabler icons only** — not FontAwesome
|
||||
6. **Test code examples** before including them
|
||||
|
||||
- Files in `**/reference/**` directories (auto-generated API reference documentation)
|
||||
- Build artifacts and generated files
|
||||
## Repository structure
|
||||
|
||||
For reference documentation, see `.github/instructions/reference-docs.instructions.md`.
|
||||
|
||||
## Working relationship
|
||||
|
||||
- You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so
|
||||
- ALWAYS ask for clarification rather than making assumptions
|
||||
- NEVER lie, guess, or make up information
|
||||
|
||||
## Project context
|
||||
|
||||
- Format: MDX files with YAML frontmatter. Mintlify syntax.
|
||||
- Config: docs.json for navigation, theme, settings
|
||||
- Components: Mintlify components
|
||||
|
||||
## Content strategy
|
||||
|
||||
- Document just enough for user success - not too much, not too little
|
||||
- Prioritize accuracy and usability of information
|
||||
- Make content evergreen when possible
|
||||
- Search for existing information before adding new content. Avoid duplication unless it is done for a strategic reason. Reference existing content when possible
|
||||
- Check existing patterns for consistency
|
||||
- Start by making the smallest reasonable changes
|
||||
|
||||
## docs.json
|
||||
|
||||
- Refer to the [docs.json schema](https://mintlify.com/docs.json) when building the docs.json file and site navigation
|
||||
- If adding a new group, ensure the root `index.mdx` is included in the `pages` array like:
|
||||
|
||||
```json
|
||||
{
|
||||
"group": "New group",
|
||||
"pages": ["new-group/index", "new-group/other-page"]
|
||||
}
|
||||
```
|
||||
docs/
|
||||
├── src/ # All manually authored content
|
||||
│ ├── docs.json # Mintlify config + navigation (88KB)
|
||||
│ ├── index.mdx # Home page
|
||||
│ ├── style.css # Custom CSS
|
||||
│ ├── langsmith/ # LangSmith product docs (~324 MDX files)
|
||||
│ ├── oss/ # Open source docs (~1800 MDX files)
|
||||
│ │ ├── langchain/ # LangChain framework
|
||||
│ │ ├── langgraph/ # LangGraph framework
|
||||
│ │ ├── deepagents/ # Deep Agents
|
||||
│ │ ├── python/ # Python-specific (integrations, migrations, releases)
|
||||
│ │ ├── javascript/ # TypeScript-specific (integrations, migrations, releases)
|
||||
│ │ ├── integrations/ # Shared integration content
|
||||
│ │ ├── concepts/ # Conceptual overviews
|
||||
│ │ └── contributing/ # Contribution guides
|
||||
│ ├── snippets/ # Reusable MDX snippets
|
||||
│ ├── images/ # Documentation images
|
||||
│ │ ├── brand/ # Logos, favicons
|
||||
│ │ └── providers/ # Provider icons (dark/ and light/ variants)
|
||||
│ └── fonts/ # Font files
|
||||
├── pipeline/ # Python build system & preprocessors
|
||||
├── reference/ # Auto-generated API reference — do not edit
|
||||
├── build/ # Build output — do not edit
|
||||
├── scripts/ # Helper utilities
|
||||
└── tests/ # Pipeline tests
|
||||
```
|
||||
|
||||
If the trailing `/index` (no extension included) is omitted, the Mintlify parser will raise a warning even though the site will still build.
|
||||
## Navigation map
|
||||
|
||||
## Frontmatter requirements for pages
|
||||
Navigation is defined in `src/docs.json`. The site has 4 products. When adding pages, find the correct product/tab/group below, then update the matching section in `docs.json`.
|
||||
|
||||
- title: Clear, descriptive, concise page title
|
||||
- description: Concise summary for SEO/navigation
|
||||
### Home
|
||||
Single page (`src/index.mdx`). No tabs.
|
||||
|
||||
## Custom code language fences
|
||||
### LangSmith (`src/langsmith/`)
|
||||
7 tabs, all files in `src/langsmith/`:
|
||||
|
||||
We have implemented custom code language fences for Python and JavaScript/TypeScript. They are used to tag content that is specific to that language. Use either `:::python` or `:::js` to tag content that is specific to that language. Both are closed with the `:::` fence.
|
||||
| Tab | Groups |
|
||||
|-----|--------|
|
||||
| Get started | Account administration (Workspace setup, Users & access control, Billing & usage), Tools, Additional resources |
|
||||
| Observability | Tracing setup (Integrations, Manual instrumentation), Configuration & troubleshooting, Viewing & managing traces, Automations, Feedback & evaluation, Monitoring & alerting |
|
||||
| Evaluation | Datasets, Set up evaluations (Run, Types, Frameworks, Techniques, Tutorials), Analyze experiment results, Annotation & human feedback |
|
||||
| Prompt engineering | Create and update prompts, Tutorials |
|
||||
| Agent deployment | Configure app, Deployment guides, App development, Studio, Auth & access control, Server customization |
|
||||
| Platform setup | Overview, Hybrid, Self-hosted (by cloud provider, Setup guides, Enable features, Configuration, External services, Auth) |
|
||||
| Reference | LangSmith Deployment APIs, Releases |
|
||||
|
||||
If any code fences like this exist on the code page, then two outputs (one for each language) will be created. For example, if this syntax is on the page in `/concepts/foo.mdx`, two pages will be created at `/python/concepts/foo.mdx` and `/javascript/concepts/foo.mdx`.
|
||||
### Agent Builder (`src/langsmith/agent-builder/`)
|
||||
Flat groups (no tabs): Get started, Tools and integrations, Advanced, Additional resources
|
||||
|
||||
For implementation details, see `pipeline/preprocessors/markdown_preprocessor.py`.
|
||||
### Open source (`src/oss/`)
|
||||
2 language dropdowns (Python, TypeScript), each with 7 identical tabs:
|
||||
|
||||
## Snippets
|
||||
| Tab | Directory |
|
||||
|-----|-----------|
|
||||
| Deep Agents | `src/oss/deepagents/` |
|
||||
| LangChain | `src/oss/langchain/` |
|
||||
| LangGraph | `src/oss/langgraph/` |
|
||||
| Integrations | `src/oss/python/integrations/` or `src/oss/javascript/integrations/` |
|
||||
| Learn | `src/oss/` (various) |
|
||||
| Reference | `reference/` — auto-generated, do not edit |
|
||||
| Contribute | `src/oss/contributing/` |
|
||||
|
||||
Snippet files in `src/snippets/` are reusable MDX content that can be imported into multiple pages. These snippets undergo special link preprocessing during the build process that converts absolute `/oss/` links to relative paths.
|
||||
## Quick reference
|
||||
|
||||
**Important:** When writing links in snippets, be careful about path segments. Read the docstrings and comments in `pipeline/core/builder.py` method `_process_snippet_markdown_file` (lines 807-872) to understand how snippet link preprocessing works and why certain path structures are required.
|
||||
| What | Where/How |
|
||||
|------|-----------|
|
||||
| Navigation config | `src/docs.json` |
|
||||
| Reusable snippets | `src/snippets/` |
|
||||
| Provider icons | `src/images/providers/` |
|
||||
| Icon library | Tabler — https://tabler.io/icons |
|
||||
| Mintlify components | https://mintlify.com/docs/components |
|
||||
| Auto-link syntax | `@[ClassName]` — defined in `pipeline/preprocessors/link_map.py` |
|
||||
|
||||
## Style guide
|
||||
## Frontmatter
|
||||
|
||||
In general, follow the [Google Developer Documentation Style Guide](https://developers.google.com/style). You can also access this style guide through the [Vale-compatible implementation](https://github.com/errata-ai/Google).
|
||||
Every MDX file requires:
|
||||
|
||||
- Second-person voice ("you")
|
||||
- Prerequisites at start of procedural content
|
||||
- Test all code examples before publishing
|
||||
- Match style and formatting of existing pages
|
||||
- Include both basic and advanced use cases
|
||||
- Language tags on all code blocks
|
||||
- Alt text on all images
|
||||
- Root relative paths for internal links
|
||||
- Correct spelling
|
||||
- Correct grammar
|
||||
- Sentence-case for headings
|
||||
- Ensure American English spelling
|
||||
```yaml
|
||||
---
|
||||
title: Clear, concise page title
|
||||
description: SEO summary — no markdown allowed (no links, backticks, formatting)
|
||||
---
|
||||
```
|
||||
|
||||
## Do not
|
||||
## Syntax
|
||||
|
||||
- Do not skip frontmatter on any MDX file
|
||||
- Do not use absolute URLs for internal links
|
||||
- Do not review code blocks (denoted by ```), as they are often not full snippets
|
||||
- Do not include untested code examples
|
||||
- Do not make assumptions - always ask for clarification
|
||||
- Do not include localization in relative links (e.g., `/python/` or `/javascript/`) - these are resolved automatically by the build pipeline
|
||||
- Language-specific content: `:::python` or `:::js` fences (generates separate Python/JS pages)
|
||||
- Code highlighting: `# [!code highlight]`, `# [!code ++]`, `# [!code --]`
|
||||
- API reference links: `@[ClassName]` for first mention of SDK classes/methods
|
||||
|
||||
For questions, refer to the Mintlify docs (either via MCP, if available), or at the [Mintlify documentation](https://docs.mintlify.com/docs/introduction).
|
||||
## Style
|
||||
|
||||
Follow [Google Developer Documentation Style Guide](https://developers.google.com/style).
|
||||
|
||||
- Be concise — second-person imperative present tense
|
||||
- Sentence-case headings with active verb, not gerund ("Add a tool" not "Adding a tool")
|
||||
- American English spelling
|
||||
- No markdown in description fields
|
||||
- No absolute URLs for internal links
|
||||
- No `/python/` or `/javascript/` in links (resolved by build pipeline)
|
||||
- No FontAwesome icon names
|
||||
- No H5 or H6 headings
|
||||
|
||||
@@ -29,6 +29,79 @@ Documentation for LangChain products hosted on Mintlify. These guidelines apply
|
||||
| Mintlify components | https://mintlify.com/docs/components |
|
||||
| Mintlify MCP server | `npx add-mcp https://www.mintlify.com/docs/mcp` |
|
||||
|
||||
## Repository structure
|
||||
|
||||
```
|
||||
docs/
|
||||
├── src/ # All manually authored content
|
||||
│ ├── docs.json # Mintlify config + navigation (88KB)
|
||||
│ ├── index.mdx # Home page
|
||||
│ ├── style.css # Custom CSS
|
||||
│ ├── langsmith/ # LangSmith product docs (~324 MDX files)
|
||||
│ ├── oss/ # Open source docs (~1800 MDX files)
|
||||
│ │ ├── langchain/ # LangChain framework
|
||||
│ │ ├── langgraph/ # LangGraph framework
|
||||
│ │ ├── deepagents/ # Deep Agents
|
||||
│ │ ├── python/ # Python-specific (integrations, migrations, releases)
|
||||
│ │ ├── javascript/ # TypeScript-specific (integrations, migrations, releases)
|
||||
│ │ ├── integrations/ # Shared integration content
|
||||
│ │ ├── concepts/ # Conceptual overviews
|
||||
│ │ └── contributing/ # Contribution guides
|
||||
│ ├── snippets/ # Reusable MDX snippets
|
||||
│ │ ├── langsmith/ # LangSmith snippets
|
||||
│ │ ├── oss/ # OSS snippets
|
||||
│ │ └── code-samples/ # Embedded code samples
|
||||
│ ├── images/ # Documentation images
|
||||
│ │ ├── brand/ # Logos, favicons
|
||||
│ │ └── providers/ # Provider icons (dark/ and light/ variants)
|
||||
│ └── fonts/ # TWK Lausanne font files
|
||||
├── pipeline/ # Python build system & preprocessors
|
||||
├── reference/ # Auto-generated API reference — do not edit
|
||||
├── build/ # Build output — do not edit
|
||||
├── scripts/ # Helper utilities
|
||||
└── tests/ # Pipeline tests
|
||||
```
|
||||
|
||||
## Navigation map
|
||||
|
||||
Navigation is defined in `src/docs.json`. The site has 4 products. When adding pages, find the correct product/tab/group below, then update the matching section in `docs.json`.
|
||||
|
||||
### Home
|
||||
Single page (`src/index.mdx`). No tabs.
|
||||
|
||||
### LangSmith (`src/langsmith/`)
|
||||
7 tabs, all files in `src/langsmith/`:
|
||||
|
||||
| Tab | Groups | Key files/directories |
|
||||
|-----|--------|----------------------|
|
||||
| Get started | Account administration (Workspace setup, Users & access control, Billing & usage), Tools, Additional resources (Data & compliance, FAQ) | `home.mdx`, `create-account-api-key.mdx`, `rbac.mdx`, `abac.mdx` |
|
||||
| Observability | Tracing setup (Integrations, Manual instrumentation), Configuration & troubleshooting, Viewing & managing traces, Automations, Feedback & evaluation, Monitoring & alerting, Data type reference | `tracing/`, `observability/` |
|
||||
| Evaluation | Datasets, Set up evaluations (Run, Types, Frameworks, Techniques, Tutorials), Analyze experiment results, Annotation & human feedback | `evaluation/` |
|
||||
| Prompt engineering | Create and update prompts, Tutorials | `prompt-engineering/` |
|
||||
| Agent deployment | Configure app, Deployment guides, App development, Studio, Auth & access control, Server customization | `agent-deployment/` |
|
||||
| Platform setup | Overview, Hybrid, Self-hosted (by cloud provider, Setup guides, Enable features, Configuration, External services, Auth, Observability, Scripts) | `self-hosted/`, `self-hosted-changelog.mdx` |
|
||||
| Reference | LangSmith Deployment (Agent Server API, Control Plane API), Releases | `reference/` |
|
||||
|
||||
### Agent Builder (`src/langsmith/`)
|
||||
Flat groups (no tabs), files in `src/langsmith/agent-builder/`:
|
||||
- Get started
|
||||
- Tools and integrations
|
||||
- Advanced
|
||||
- Additional resources
|
||||
|
||||
### Open source (`src/oss/`)
|
||||
2 language dropdowns (Python, TypeScript), each with 7 identical tabs:
|
||||
|
||||
| Tab | Directory | Notes |
|
||||
|-----|-----------|-------|
|
||||
| Deep Agents | `src/oss/deepagents/` | Get started, Core capabilities, Streaming, Protocols, CLI |
|
||||
| LangChain | `src/oss/langchain/` | Get started, Core components, Middleware, Advanced usage, Multi-agent |
|
||||
| LangGraph | `src/oss/langgraph/` | Get started, Capabilities, Production, Graph API, Functional API |
|
||||
| Integrations | `src/oss/python/integrations/` or `src/oss/javascript/integrations/` | Per-provider pages |
|
||||
| Learn | `src/oss/` (various) | Tutorials, Conceptual overviews |
|
||||
| Reference | `reference/` | Auto-generated — do not edit |
|
||||
| Contribute | `src/oss/contributing/` | Contribution guides, integration authoring |
|
||||
|
||||
## Local development
|
||||
|
||||
See [Contributing to documentation](/oss/contributing/documentation) for setup instructions.
|
||||
@@ -127,9 +200,29 @@ Follow [Google Developer Documentation Style Guide](https://developers.google.co
|
||||
|
||||
## Adding pages
|
||||
|
||||
1. Create MDX file with required frontmatter
|
||||
2. Update `src/docs.json` to add to navigation
|
||||
3. For new groups, include index: `"pages": ["group/index", "group/page"]`
|
||||
1. Create MDX file with required frontmatter in the correct directory (see navigation map above)
|
||||
2. Update `src/docs.json` to add the page to the correct product → tab → group
|
||||
3. For new groups, include an index page: `"pages": ["group/index", "group/page"]`
|
||||
|
||||
### Common workflows
|
||||
|
||||
**Add a new LangSmith doc:**
|
||||
1. Create `src/langsmith/<name>.mdx` with frontmatter
|
||||
2. Find the correct tab and group in `src/docs.json` under `navigation.products[1]` (LangSmith)
|
||||
3. Add the page path (e.g., `"langsmith/<name>"`) to that group's `pages` array
|
||||
|
||||
**Add a new integration page (Python):**
|
||||
1. Create `src/oss/python/integrations/<provider>/<component>.mdx`
|
||||
2. Add to `src/docs.json` under Open source → Python dropdown → Integrations tab
|
||||
3. Use description format: `"Integrate with the ClassName type using LangChain Python."`
|
||||
|
||||
**Add a new integration page (TypeScript):**
|
||||
1. Create `src/oss/javascript/integrations/<provider>/<component>.mdx`
|
||||
2. Add to `src/docs.json` under Open source → TypeScript dropdown → Integrations tab
|
||||
|
||||
**Add a reusable snippet:**
|
||||
1. Create `src/snippets/<product>/<name>.mdx`
|
||||
2. Reference with `<Snippet file="<product>/<name>.mdx" />`
|
||||
|
||||
## Pull requests
|
||||
|
||||
|
||||
@@ -29,6 +29,79 @@ Documentation for LangChain products hosted on Mintlify. These guidelines apply
|
||||
| Mintlify components | https://mintlify.com/docs/components |
|
||||
| Mintlify MCP server | `npx add-mcp https://www.mintlify.com/docs/mcp` |
|
||||
|
||||
## Repository structure
|
||||
|
||||
```
|
||||
docs/
|
||||
├── src/ # All manually authored content
|
||||
│ ├── docs.json # Mintlify config + navigation (88KB)
|
||||
│ ├── index.mdx # Home page
|
||||
│ ├── style.css # Custom CSS
|
||||
│ ├── langsmith/ # LangSmith product docs (~324 MDX files)
|
||||
│ ├── oss/ # Open source docs (~1800 MDX files)
|
||||
│ │ ├── langchain/ # LangChain framework
|
||||
│ │ ├── langgraph/ # LangGraph framework
|
||||
│ │ ├── deepagents/ # Deep Agents
|
||||
│ │ ├── python/ # Python-specific (integrations, migrations, releases)
|
||||
│ │ ├── javascript/ # TypeScript-specific (integrations, migrations, releases)
|
||||
│ │ ├── integrations/ # Shared integration content
|
||||
│ │ ├── concepts/ # Conceptual overviews
|
||||
│ │ └── contributing/ # Contribution guides
|
||||
│ ├── snippets/ # Reusable MDX snippets
|
||||
│ │ ├── langsmith/ # LangSmith snippets
|
||||
│ │ ├── oss/ # OSS snippets
|
||||
│ │ └── code-samples/ # Embedded code samples
|
||||
│ ├── images/ # Documentation images
|
||||
│ │ ├── brand/ # Logos, favicons
|
||||
│ │ └── providers/ # Provider icons (dark/ and light/ variants)
|
||||
│ └── fonts/ # TWK Lausanne font files
|
||||
├── pipeline/ # Python build system & preprocessors
|
||||
├── reference/ # Auto-generated API reference — do not edit
|
||||
├── build/ # Build output — do not edit
|
||||
├── scripts/ # Helper utilities
|
||||
└── tests/ # Pipeline tests
|
||||
```
|
||||
|
||||
## Navigation map
|
||||
|
||||
Navigation is defined in `src/docs.json`. The site has 4 products. When adding pages, find the correct product/tab/group below, then update the matching section in `docs.json`.
|
||||
|
||||
### Home
|
||||
Single page (`src/index.mdx`). No tabs.
|
||||
|
||||
### LangSmith (`src/langsmith/`)
|
||||
7 tabs, all files in `src/langsmith/`:
|
||||
|
||||
| Tab | Groups | Key files/directories |
|
||||
|-----|--------|----------------------|
|
||||
| Get started | Account administration (Workspace setup, Users & access control, Billing & usage), Tools, Additional resources (Data & compliance, FAQ) | `home.mdx`, `create-account-api-key.mdx`, `rbac.mdx`, `abac.mdx` |
|
||||
| Observability | Tracing setup (Integrations, Manual instrumentation), Configuration & troubleshooting, Viewing & managing traces, Automations, Feedback & evaluation, Monitoring & alerting, Data type reference | `tracing/`, `observability/` |
|
||||
| Evaluation | Datasets, Set up evaluations (Run, Types, Frameworks, Techniques, Tutorials), Analyze experiment results, Annotation & human feedback | `evaluation/` |
|
||||
| Prompt engineering | Create and update prompts, Tutorials | `prompt-engineering/` |
|
||||
| Agent deployment | Configure app, Deployment guides, App development, Studio, Auth & access control, Server customization | `agent-deployment/` |
|
||||
| Platform setup | Overview, Hybrid, Self-hosted (by cloud provider, Setup guides, Enable features, Configuration, External services, Auth, Observability, Scripts) | `self-hosted/`, `self-hosted-changelog.mdx` |
|
||||
| Reference | LangSmith Deployment (Agent Server API, Control Plane API), Releases | `reference/` |
|
||||
|
||||
### Agent Builder (`src/langsmith/`)
|
||||
Flat groups (no tabs), files in `src/langsmith/agent-builder/`:
|
||||
- Get started
|
||||
- Tools and integrations
|
||||
- Advanced
|
||||
- Additional resources
|
||||
|
||||
### Open source (`src/oss/`)
|
||||
2 language dropdowns (Python, TypeScript), each with 7 identical tabs:
|
||||
|
||||
| Tab | Directory | Notes |
|
||||
|-----|-----------|-------|
|
||||
| Deep Agents | `src/oss/deepagents/` | Get started, Core capabilities, Streaming, Protocols, CLI |
|
||||
| LangChain | `src/oss/langchain/` | Get started, Core components, Middleware, Advanced usage, Multi-agent |
|
||||
| LangGraph | `src/oss/langgraph/` | Get started, Capabilities, Production, Graph API, Functional API |
|
||||
| Integrations | `src/oss/python/integrations/` or `src/oss/javascript/integrations/` | Per-provider pages |
|
||||
| Learn | `src/oss/` (various) | Tutorials, Conceptual overviews |
|
||||
| Reference | `reference/` | Auto-generated — do not edit |
|
||||
| Contribute | `src/oss/contributing/` | Contribution guides, integration authoring |
|
||||
|
||||
## Local development
|
||||
|
||||
See [Contributing to documentation](/oss/contributing/documentation) for setup instructions.
|
||||
@@ -127,9 +200,29 @@ Follow [Google Developer Documentation Style Guide](https://developers.google.co
|
||||
|
||||
## Adding pages
|
||||
|
||||
1. Create MDX file with required frontmatter
|
||||
2. Update `src/docs.json` to add to navigation
|
||||
3. For new groups, include index: `"pages": ["group/index", "group/page"]`
|
||||
1. Create MDX file with required frontmatter in the correct directory (see navigation map above)
|
||||
2. Update `src/docs.json` to add the page to the correct product → tab → group
|
||||
3. For new groups, include an index page: `"pages": ["group/index", "group/page"]`
|
||||
|
||||
### Common workflows
|
||||
|
||||
**Add a new LangSmith doc:**
|
||||
1. Create `src/langsmith/<name>.mdx` with frontmatter
|
||||
2. Find the correct tab and group in `src/docs.json` under `navigation.products[1]` (LangSmith)
|
||||
3. Add the page path (e.g., `"langsmith/<name>"`) to that group's `pages` array
|
||||
|
||||
**Add a new integration page (Python):**
|
||||
1. Create `src/oss/python/integrations/<provider>/<component>.mdx`
|
||||
2. Add to `src/docs.json` under Open source → Python dropdown → Integrations tab
|
||||
3. Use description format: `"Integrate with the ClassName type using LangChain Python."`
|
||||
|
||||
**Add a new integration page (TypeScript):**
|
||||
1. Create `src/oss/javascript/integrations/<provider>/<component>.mdx`
|
||||
2. Add to `src/docs.json` under Open source → TypeScript dropdown → Integrations tab
|
||||
|
||||
**Add a reusable snippet:**
|
||||
1. Create `src/snippets/<product>/<name>.mdx`
|
||||
2. Reference with `<Snippet file="<product>/<name>.mdx" />`
|
||||
|
||||
## Pull requests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user