feat: add automated LangChain docs update workflow - #819
Open
Facundo Santiago (santiagxf) wants to merge 2 commits into
Open
feat: add automated LangChain docs update workflow#819Facundo Santiago (santiagxf) wants to merge 2 commits into
Facundo Santiago (santiagxf) wants to merge 2 commits into
Conversation
Adds a workflow_dispatch workflow that, on demand for any given library (or specific module path / changelog entry), clones the langchain-ai/docs repository, runs an AI agent that follows the azure-integration-docs skill instructions, and opens a PR with the generated documentation changes. Files added: - .github/workflows/update_docs.yml workflow entry point - .github/scripts/update_docs.py AI agent driver script - .github/skills/azure-integration-docs/SKILL.md project-scoped skill The agent uses the GitHub Models API (GPT-4o) via the built-in GITHUB_TOKEN (models:read permission). A DOCS_REPO_TOKEN secret (PAT with repo scope on langchain-ai/docs) is required for pushing the branch and creating the PR. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
langchain-ai/docs is a public repository — no authentication is needed to clone it. The DOCS_REPO_TOKEN is still required (and validated early) for the push + PR step since GITHUB_TOKEN is scoped to this repo only. Also added --depth 1 to speed up the clone. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an on-demand GitHub Actions workflow that automatically generates or updates LangChain documentation for any Azure integration library and opens a PR in \langchain-ai/docs.
What's included
How it works
\
workflow_dispatch
├── inputs: library (choice), path (optional), changelog (optional)
├── checkout langchain-azure
├── clone langchain-ai/docs ← DOCS_REPO_TOKEN secret
├── run update_docs.py
│ └── AI agent (GitHub Models / GPT-4o)
│ ├── reads TEMPLATE.mdx from docs repo
│ ├── reads source code from langchain-azure
│ ├── reads existing Azure pages
│ └── writes updated .mdx files
└── git commit + gh pr create → PR in langchain-ai/docs
\\
The agent uses the \�zure-integration-docs\ skill as its system prompt and is equipped with five tools (\list_langchain_azure_dir,
ead_langchain_azure_file, \list_docs_dir,
ead_docs_file, \write_docs_file) that let it replicate the interactive skill workflow autonomously.
One-time setup required
Add a *\DOCS_REPO_TOKEN* repository secret — a classic PAT with
epo\ scope on \langchain-ai/docs. This is needed to push the docs branch and open the PR.
The \GITHUB_TOKEN\ (with \models: read\ permission, granted by the workflow) is used for all LLM inference — no additional API keys needed.
Inputs