Skip to content

feat: add automated LangChain docs update workflow - #819

Open
Facundo Santiago (santiagxf) wants to merge 2 commits into
mainfrom
santiagxf-azure-integration-docs-automation
Open

feat: add automated LangChain docs update workflow#819
Facundo Santiago (santiagxf) wants to merge 2 commits into
mainfrom
santiagxf-azure-integration-docs-automation

Conversation

@santiagxf

Copy link
Copy Markdown
Collaborator

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

File Purpose
.github/workflows/update_docs.yml\ \workflow_dispatch\ entry point
.github/scripts/update_docs.py\ AI agent driver script
.github/skills/azure-integration-docs/SKILL.md\ Skill moved to project scope

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

Input Required Description
\library\ Library path (\libs/azure-ai, etc.)
\path\ Specific module path within the library
\changelog\ Changelog / release-notes entry as context

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant