langchain
AGENTS.md150k starsChanged 2 months agoMITView on GitHub
This document provides context to understand the LangChain Python project and assist with development. When Corridor's analyzePlan tool is available, create a plan and use the tool to analyze it before generating or modifying code. Apply the resulting security guidance before writing code. This is a Python monorepo with multiple independently versioned packages that use uv. This monorepo uses uv for dependency management. Local development uses editable installs declared under each package's [tool.uv.sources] table in pyproject.toml, so path dependencies resolve…
- Reads credentials
Trending
Quiet since August.about the whole repository
Who's talking about langchain-ai/langchain
- A Hacker News story“New: LangChain templates – fastest way to build a production-ready LLM app”Hacker News · Nov 1, 2023 · 137 points
- pydantic/pydantic-ai“Support gpt-oss directly via Harmony format”GitHub · Aug 6, 2025 · 16 reactions
- langchain-ai/langchain-postgres“Add support to specify custom table schema”GitHub · Nov 10, 2024 · 12 reactions
- langchain-ai/langchain-google“feat(genai)!: migration to `google-genai`”GitHub · Nov 13, 2025 · 8 reactions
- langchain-ai/langchain-mcp-adapters“Summary of issues (internal)”GitHub · Sep 10, 2025 · 8 reactions
The biggest 5 of 29 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 29
Talked about on Bluesky, GitHub and Hacker News (29 times).
On Bluesky · 14
- May 17, 2024📦 langchain-ai / langchain ⭐ 85,044 (+97) 🗒 Python 🦜🔗 Build context-aware reasoning applications — @github-trending.bsky.social3 likes and reposts
- Oct 19, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 65,170 (+117) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Aug 18, 2026Хватит писать велосипеды для ИИ-агентов. LangChain закрывает всю боль интеграции LLM, RAG и мультиагентных систем в один клик. 144k+ звезд… — @toolhunt.bsky.social1 likes and repost
- Mar 2, 2026https://github.com/langchain-ai/langchain — @tom-doerr.bsky.social1 likes and repost
- Dec 25, 2024📦 langchain-ai / langchain ⭐ 96,702 (+75) 🗒 Jupyter Notebook 🦜🔗 Build context-aware reasoning applications — @github-trending.bsky.social1 likes and repost
9 more on Bluesky
- Nov 21, 2024it was github.com/langchain-ai... — @matthewbub.com1 likes and repost
- Jan 25, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 74,950 (+102) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social1 likes and repost · 1 reply
- Oct 12, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 64,327 (+103) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social1 likes and repost · 1 reply
- Sep 7, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 61,248 (+116) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social1 likes and repost · 1 reply
- May 4, 20252️⃣ LangChain 🔹 Best for: Multi-step reasoning & tool use 🔹 Why? 200+ integrations (Google, Twitter, etc.) 🔹 Use Case: AI sales… — @lfb-labs.bsky.social0 likes and reposts · 1 reply
- Mar 25, 2025🧠 ¿Por qué importa?** Un buen prompt puede ahorrarte horas de ajustes. Ej: En medicina, un prompt claro reduce errores de diagnóstico en… — @promptmaestro.bsky.social0 likes and reposts · 1 reply
- Nov 24, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 69,131 (+122) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Nov 1, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 66,387 (+114) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Sep 20, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 langchain-ai / langchain ⭐ 62,566 (+134) 🗒 Python ⚡ Building applications with LLMs through… — @github-trending.bsky.social0 likes and reposts · 1 reply
On GitHub · 11
- Aug 6, 2025Support gpt-oss directly via Harmony format — pydantic/pydantic-ai16 reactions · 5 comments
- Nov 10, 2024Add support to specify custom table schema — langchain-ai/langchain-postgres12 reactions · 6 comments
- Nov 13, 2025feat(genai)!: migration to `google-genai` — langchain-ai/langchain-google8 reactions · 4 comments
- Sep 10, 2025Summary of issues (internal) — langchain-ai/langchain-mcp-adapters8 reactions · 3 comments
- Nov 12, 2025python3Packages.{langchain,langgraph}-*: updates and build fixes — NixOS/nixpkgs4 reactions · 6 comments
6 more on GitHub
- Aug 18, 2025fix: support pydantic v2 for the FastAPI docs page (compatible with v1) — langchain-ai/langserve4 reactions · 2 comments
- Dec 19, 2024genai: Fixed nested pydantic structures recursion — langchain-ai/langchain-google4 reactions · 7 comments
- Oct 2, 2024feat: add multi vector support — langchain-ai/langchain-milvus4 reactions · 3 comments
- Jan 26, 2026Bump the pip group across 2 directories with 2 updates — cbwinslow/opendiscourse.net---supacontainer3 reactions · 2 comments
- Jan 16, 2026Bump the uv group across 3 directories with 7 updates — cbwinslow/OpenLegislation-local-dev3 reactions · 12 comments
- Aug 27, 2025Fix cosine relevance score normalization in FAISS — langchain-ai/langchain-community3 reactions · 1 comment
On Hacker News · 4
- Nov 1, 2023New: LangChain templates – fastest way to build a production-ready LLM app137 points · 69 comments
- Jan 4, 2024Use WASM as a cross-platform LLM backend for LangChain: Any LLMs on any device3 points · 1 comment
- Sep 18, 2023ReAct – Implemented in Ruby (wink) – English is the new programming language2 points · 2 comments
- Nov 2, 2023Computation resources that help you build AI applications with LLM1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
36 rules. About 0 are common, 27 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
When Corridor's analyzePlan tool is available, create a plan and use the tool to analyze it before generating or modifying code.
- Distinctive: line 56
Before running your tests, set up all packages by running:
- Very specific: line 87
Use uv for all environment and dependency operations in this monorepo.
- Distinctive: line 92
Don't mix environments within a session, and don't add new dependencies unless strictly required — when you do, justify them (recent …
- Very specific: line 106
Follow Conventional Commits.
- Very specific: line 108
Start the text after type(scope): with a lowercase letter, unless the first word is a proper noun (e.g.
- Distinctive: line 110
Keep titles short and descriptive — save detail for the body.
- Distinctive: line 142
When the PR closes an issue, lead with the closing keyword on its own line at the very top, followed by a horizontal rule and then the body:
- Very specific: line 152
Only Closes, Fixes, and Resolves auto-close the referenced issue on merge.
- Distinctive: line 155
Write for readers who may be unfamiliar with this area of the codebase.
- Distinctive: line 156
Do not cite line numbers; they go stale as soon as the file changes.
- Distinctive: line 161
Call out areas of the change that require careful review.
- Distinctive: line 162
Add a brief disclaimer noting AI-agent involvement in the contribution.
- Very specific: line 173
Check if the function/class is exported in __init__.py
- Distinctive: line 174
Look for existing usage patterns in tests and examples
- Very specific: line 175
Use keyword-only arguments for new parameters: *, new_param: str = "default"
- Distinctive: line 178
Ask: "Would this change break someone's code if they used it last week?"
- Distinctive: line 182
All Python code MUST include type hints and return types.
- Distinctive: line 199
Use descriptive, self-explanatory variable names.
- Distinctive: line 200
Follow existing patterns in the codebase you're modifying
- Distinctive: line 205
Every new feature or bugfix MUST be covered by unit tests.
- Distinctive: line 225
Remove unreachable/commented code before committing
- Distinctive: line 227
Ensure proper resource cleanup (file handles, connections)
- Distinctive: line 231
Use Google-style docstrings with Args section for all public functions.
- Distinctive: line 254
If a default is present, DO NOT repeat it in the docstring unless there is post-processing or it is set conditionally.
- Distinctive: line 256
Document all parameters, return values, and exceptions
- Distinctive: line 257
Keep descriptions concise but clear
- Distinctive: line 258
Ensure American English spelling (e.g., "behavior", not "behaviour")
- Very specific: line 259
Do NOT use Sphinx-style double backtick formatting ( code ).
- Distinctive: line 263
Always use the latest generally available (GA) models when referencing LLMs in docstrings and illustrative code snippets.
- Distinctive: line 265
Before writing or updating model references, verify current model IDs against the provider's official docs.
- Distinctive: line 300
Version bump PR: Create a PR that bumps three files by one line each:
- Very specific: line 311
Trigger the release workflow: Run gh workflow run against the "🚀 Package Release" workflow (_release.yml, file ID 63880841):
- Distinctive: line 359
When adding a new partner package, update these files:
- Distinctive: line 385
Treat source code and tests as authoritative.
- Distinctive: line 386
Prefer the narrowest quiet validation that proves the changed behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Global development guidelines for the LangChain monorepo
This document provides context to understand the LangChain Python project and assist with development.
<corridor>Corridor security analysis
When Corridor's analyzePlan tool is available, create a plan and use the tool to analyze it before generating or modifying code. Apply the resulting security guidance before writing code.
</corridor>Project architecture and context
Monorepo structure
This is a Python monorepo with multiple independently versioned packages that use uv.
langchain/
├── libs/
│ ├── core/ # `langchain-core` primitives and base abstractions
│ ├── langchain/ # `langchain-classic` (legacy, no new features)
│ ├── langchain_v1/ # Actively maintained `langchain` package
│ ├── partners/ # Third-party integrations
│ │ ├── openai/ # OpenAI models and embeddings
│ │ ├── anthropic/ # Anthropic (Claude) integration
│ │ ├── ollama/ # Local model support
│ │ └── ... (other integrations maintained by the LangChain team)
│ ├── text-splitters/ # Document chunking utilities
│ ├── standard-tests/ # Shared test suite for integrations
│ └── model-profiles/ # Model configuration profiles
├── .github/ # CI/CD workflows and templates
├── .vscode/ # VSCode IDE standard settings and recommended extensions
├── openwiki/ # Generated just-in-time evidence index (optional reading)
└── README.md # Information about LangChain- Core layer (
langchain-core): Base abstractions, interfaces, and protocols. Users should not need to know about this layer directly. - Implementation layer (
langchain): Concrete implementations and high-level public utilities - Integration layer (
partners/): Third-party service integrations. Note that this monorepo is not exhaustive of all LangChain integrations; some are maintained in separate repos, such aslangchain-ai/langchain-googleandlangchain-ai/langchain-aws. Usually these repos are cloned at the same level as this monorepo, so if needed, you can refer to their code directly by navigating to../langchain-google/from this monorepo. - Testing layer (
standard-tests/): Standardized integration tests for partner integrations
Development tools & commands
uv– Fast Python package installer and resolver (replaces pip/poetry)make– Task runner for common development commands. Each package underlibs/has its ownMakefile; feel free to look at it for available commands and usage patterns.ruff– Fast Python linter and formattermypy– Static type checkingpytest– Testing framework
This monorepo uses uv for dependency management. Local development uses editable installs declared under each package's [tool.uv.sources] table in pyproject.toml, so path dependencies resolve to your working tree instead of PyPI.
Each package in libs/ has its own pyproject.toml, uv.lock, and Makefile. There is no workspace-level pyproject.toml or Makefile at the repo root — always cd into the package you are working on before running the commands below (for example cd libs/langchain_v1 or cd libs/core).
Before running your tests, set up all packages by running:
# For all groups
uv sync --all-groups
# or, to install a specific group only:
uv sync --group test# Run unit tests (no network)
make test
# Run specific test file
uv run --group test pytest tests/unit_tests/test_specific.py# Lint code
make lint
# Format code
make format
# Type checking
uv run --group lint mypy .Environment and dependency management
Use uv for all environment and dependency operations in this monorepo. Do not invoke pip, poetry, or conda directly.
- Let
uvmanage the interpreter and virtual environments —uv syncanduv runoperate without manualsource .venv/bin/activate. Do not create ad-hoc virtual environments outside the package directory. - Each package targets its own supported Python range via its
pyproject.toml; do not pin a global Python version. If you need an interpreter explicitly, defer to the package'srequires-pythonrather than assuming system Python. - Install dependencies explicitly through
uv sync(optionally--group <name>/--all-groups); never let them install implicitly. - Don't mix environments within a session, and don't add new dependencies unless strictly required — when you do, justify them (recent releases/commits, adoption).
Key config files
There is no single workspace config at the repository root. Configuration lives per package:
libs/<package>/pyproject.toml: Package metadata and dependency groups (test,lint,typing,dev, …)libs/<package>/uv.lock: Locked dependencies for reproducible buildslibs/<package>/Makefile: Development tasks for that package (test,lint,format,type, …)libs/Makefile: Cross-packagelock/check-lockonly.pre-commit-config.yaml(repo root): Git hooks that run per-package format/lint
PR and commit titles
Follow Conventional Commits. See .github/workflows/pr_lint.yml for allowed types and scopes. All titles must include a scope with no exceptions — even for the main langchain package.
- Start the text after
type(scope):with a lowercase letter, unless the first word is a proper noun (e.g.Azure,GitHub,OpenAI) or a named entity (class, function, method, parameter, or variable name). - Wrap named entities in backticks so they render as code. Proper nouns are left unadorned.
- Keep titles short and descriptive — save detail for the body.
Examples:
feat(langchain): add new chat completion feature
fix(core): resolve type hinting issue in vector store
chore(anthropic): update infrastructure dependencies
feat(langchain): `ls_agent_type` tag on `create_agent` calls
fix(openai): infer Azure chat profiles from model nameBranch naming
Branches should be prefixed <github-username>/<scope>/<short-description>:
<github-username>— the author's GitHub login (e.g.mdrxy).<scope>— the same scope used in the Conventional Commit title (core,langchain, partner name,infra,docs, etc.).<short-description>— kebab-case, brief, no trailing slash.
Examples:
mdrxy/anthropic/normalize-tool-call-ids
mdrxy/core/vector-store-type-hints
mdrxy/infra/agents-md-branchPR descriptions
The description is the summary — do not add a # Summary header.
When the PR closes an issue, lead with the closing keyword on its own line at the very top, followed by a horizontal rule and then the body:
Closes #123 --- <rest of description>Only
Closes,Fixes, andResolvesauto-close the referenced issue on merge.Related:or similar labels are informational and do not close anything.- Explain the why: who benefits, what problem they had, and how this solves it. Prefer a simple user story over a long summary.
- Write for readers who may be unfamiliar with this area of the codebase. Avoid insider shorthand and prefer language that is friendly to public viewers — this aids interpretability.
- Do not cite line numbers; they go stale as soon as the file changes.
- Rarely include full file paths or filenames. Reference the affected symbol, class, or subsystem by name instead.
- Wrap class, function, method, parameter, and variable names in backticks.
- For net new features or behavior-changing bugfixes, PR descriptions should include a
## Release notesection that states the user-visible change in release-note-ready language. - Skip dedicated "Test plan" or "Testing" sections in most cases. Mention tests only when coverage is non-obvious, risky, or otherwise notable.
- Call out areas of the change that require careful review.
- Add a brief disclaimer noting AI-agent involvement in the contribution.
Core development principles
Maintain stable public interfaces
CRITICAL: Always attempt to preserve function signatures, argument positions, and names for exported/public methods. Do not make breaking changes. You should warn the developer for any function signature changes, regardless of whether they look breaking or not.
Before making ANY changes to public APIs:
- Check if the function/class is exported in
__init__.py - Look for existing usage patterns in tests and examples
- Use keyword-only arguments for new parameters:
*, new_param: str = "default" - Mark experimental features clearly with docstring warnings (using MkDocs Material admonitions, like
!!! warning)
Ask: "Would this change break someone's code if they used it last week?"
Code quality standards
All Python code MUST include type hints and return types.
def filter_unknown_users(users: list[str], known_users: set[str]) -> list[str]:
"""Single line description of the function.
Any additional context about the function can go here.
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.
"""- Use descriptive, self-explanatory variable names.
- Follow existing patterns in the codebase you're modifying
- Attempt to break up complex functions (>20 lines) into smaller, focused functions where it makes sense
Testing requirements
Every new feature or bugfix MUST be covered by unit tests.
- Unit tests:
tests/unit_tests/(no network calls allowed) - Integration tests:
tests/integration_tests/(network calls permitted) - We use
pytestas the testing framework; if in doubt, check other existing tests for examples. - The testing file structure should mirror the source code structure.
Checklist:
- Tests fail when your new logic is broken
- Happy path is covered
- Edge cases and error conditions are tested
- Use fixtures/mocks for external dependencies
- Tests are deterministic (no flaky tests)
- Does the test suite fail if your new logic is broken?
Security and risk assessment
- No
eval(),exec(), orpickleon user-controlled input - Proper exception handling (no bare
except:) and use amsgvariable for error messages - Remove unreachable/commented code before committing
- Race conditions or resource leaks (file handles, sockets, threads).
- Ensure proper resource cleanup (file handles, connections)
Documentation standards
Use Google-style docstrings with Args section for all public functions.
def send_email(to: str, msg: str, *, priority: str = "normal") -> bool:
"""Send an email to a recipient with specified priority.
Any additional context about the function can go here.
Args:
to: The email address of the recipient.
msg: The message body to send.
priority: Email priority level.
Returns:
`True` if email was sent successfully, `False` otherwise.
Raises:
InvalidEmailError: If the email address format is invalid.
SMTPConnectionError: If unable to connect to email server.
"""- Types go in function signatures, NOT in docstrings
- If a default is present, DO NOT repeat it in the docstring unless there is post-processing or it is set conditionally.
- Focus on "why" rather than "what" in descriptions
- Document all parameters, return values, and exceptions
- Keep descriptions concise but clear
- Ensure American English spelling (e.g., "behavior", not "behaviour")
- Do NOT use Sphinx-style double backtick formatting (
``code``). Use single backticks (`code`) for inline code references in docstrings and comments.
Model references in docs and examples
Always use the latest generally available (GA) models when referencing LLMs in docstrings and illustrative code snippets. Avoid preview or beta identifiers unless the model has no GA equivalent. Outdated model names signal stale code and confuse users.
Before writing or updating model references, verify current model IDs against the provider's official docs. Do not rely on memorized or cached model names — they go stale quickly.
Changing shipped default parameter values in code (e.g., a model= kwarg default in a class constructor) may constitute a breaking change — see "Maintain stable public interfaces" above. This guidance applies to documentation and examples, not code defaults.
For model profile data (capability flags, context windows), use the langchain-profiles CLI described below.
Model profiles
Model profiles are generated using the langchain-profiles CLI in libs/model-profiles. The --data-dir must point to the directory containing profile_augmentations.toml, not the top-level package directory.
# Run from libs/model-profiles
cd libs/model-profiles
# Refresh profiles for a partner in this repo
uv run langchain-profiles refresh --provider openai --data-dir ../partners/openai/langchain_openai/data
# Refresh profiles for a partner in an external repo (requires echo y to confirm)
echo y | uv run langchain-profiles refresh --provider google --data-dir /path/to/langchain-google/libs/genai/langchain_google_genai/dataExample partners with profiles in this repo:
libs/partners/openai/langchain_openai/data/(provider:openai)libs/partners/anthropic/langchain_anthropic/data/(provider:anthropic)libs/partners/perplexity/langchain_perplexity/data/(provider:perplexity)
The echo y | pipe is required when --data-dir is outside the libs/model-profiles working directory.
CI/CD infrastructure
Release process
Each partner package is released independently. The full flow is:
Version bump PR. Create a PR that bumps three files by one line each:
langchain_<partner>/_version.py—__version__pyproject.toml—versionuv.lock— runuv lockfrom the package directory. If the diff includes unrelated changes (e.g. environment-dependent marker lines from a different local Python version), revert them and keep only theversion = "..."line for the package being released
Title follows Conventional Commits:
release(<partner>): <version>(e.g.release(openrouter): 0.2.6). Use the branch namerelease/<partner>-<version>.Patch vs. minor bump follows in-repo precedent: within a
0.xseries, fixes and additive features get a patch bump (e.g.session_idfield → 0.2.1→0.2.2,parallel_tool_calls→ 0.2.3→0.2.4).- Merge the PR to
master. Trigger the release workflow. Run
gh workflow runagainst the "🚀 Package Release" workflow (_release.yml, file ID63880841):gh workflow run 63880841 --repo langchain-ai/langchain \ -f working-directory=<partner> -f release-version=<version>working-directoryis the short partner name from the workflow's dropdown (e.g.openrouter, notlibs/partners/openrouter).The workflow handles everything else automatically — do not create a GitHub release or tag manually. The
mark-releasejob (usingncipollo/release-action) creates the GitHub release, tag, and release notes after PyPI publish succeeds. The release notes body is auto-generated from commit history between the previous tag and HEAD.Monitor the run:
gh run view <run-id> --repo langchain-ai/langchainThe full job chain is: build → release-notes → pre-release-checks → TestPyPI publish → PyPI publish → tag GitHub release.
PR labeling and linting
Title linting (.github/workflows/pr_lint.yml)
Auto-labeling:
.github/workflows/pr_labeler.yml– Unified PR labeler (size, file, title, external/internal, contributor tier).github/workflows/pr_labeler_backfill.yml– Manual backfill of PR labels on open PRs.github/workflows/auto-label-by-package.yml– Issue labeling by package.github/workflows/tag-external-issues.yml– Issue external/internal classification
Integration test tracing (LangSmith)
Scheduled and manually dispatched integration tests (integration_tests.yml) trace every run to LangSmith so failures link back to the originating Actions run. (_release.yml runs integration tests too, but does not currently configure LangSmith tracing.)
Env vars set by CI:
LANGSMITH_API_KEY— authenticates to LangSmith (repo secret, scoped to the "Scheduled testing" GitHub environment inintegration_tests.yml).LANGSMITH_TRACING: "true"— enables tracing for the test process.LANGSMITH_PROJECT— the project traces are sent to. Defaults toscheduled-testing-pyvia a repo variable override:${{ vars.LANGSMITH_PROJECT || 'scheduled-testing-py' }}. To change the project, set theLANGSMITH_PROJECTrepository variable in GitHub settings — do not hardcode it in the workflow.LANGSMITH_TAGS— comma-separated tags identifying the run:github-actions, the matrix working directory (e.g.libs/partners/openai), the Python version, and the commit SHA.LANGSMITH_METADATA— a JSON object built by the "Build LangSmith Metadata" step, containinggithub_sha,github_run_id,github_run_attempt,github_run_url,github_workflow,github_event,github_ref,working_directory, andpython_version.
The tracing bridge plugin: The LangSmith SDK does not natively read LANGSMITH_TAGS or LANGSMITH_METADATA from the environment. The pytest plugin at libs/standard-tests/langchain_tests/_langsmith_plugin.py bridges that gap by entering langsmith.run_helpers.tracing_context for the duration of the test session. It only activates when GITHUB_ACTIONS=true, so local development is unaffected. Auto-discovered via the pytest11 entry point in any package that depends on langchain-tests.
Unit test isolation: Unit tests must never make network calls or send traces. The make test target in the libs/core Makefile uses env -u to unset the tracing vars (LANGCHAIN_TRACING_V2, LANGCHAIN_API_KEY, LANGSMITH_API_KEY, LANGSMITH_TRACING, LANGCHAIN_PROJECT) before running pytest. Additionally, libs/core/tests/unit_tests/runnables/conftest.py has a session-scoped autouse fixture that explicitly disables tracing for runnable unit tests, restoring the original environment afterward.
Adding a new partner to CI
When adding a new partner package, update these files:
.github/ISSUE_TEMPLATE/*.yml– Add to package dropdown.github/dependabot.yml– Add dependency update entry.github/scripts/pr-labeler-config.json– Add file rule and scope-to-label mapping.github/workflows/_release.yml– Add API key secrets if needed.github/workflows/auto-label-by-package.yml– Add package label.github/workflows/check_diffs.yml– Add to change detection.github/workflows/integration_tests.yml– Add integration test config.github/workflows/pr_lint.yml– Add to allowed scopes
GitHub Actions & Workflows
This repository requires actions to be pinned to a full-length commit SHA. Attempting to use a tag will fail. Use the gh cli to query. Verify tags are not annotated tag objects (which would need dereferencing).
Additional resources
- Documentation: https://docs.langchain.com/oss/python/langchain/overview and source at https://github.com/langchain-ai/docs or
../docs/. Prefer the local install and use file search tools for best results. If needed, use the docs MCP server as defined in.mcp.jsonfor programmatic access. - Contributing Guide: Contributing Guide
<!-- OPENWIKI:START -->OpenWiki
This repository has a generated openwiki/ evidence index. It is optional just-in-time context, not required startup reading.
- Treat source code and tests as authoritative. A brief's unknowns and review items are verification gaps, not automatic requirements.
- Prefer the narrowest quiet validation that proves the changed behavior. Preserve complete failure output.
The scheduled OpenWiki GitHub Actions workflow refreshes the repository wiki. Do not hand-edit generated OpenWiki pages unless explicitly asked; prefer updating source code/docs and letting OpenWiki regenerate.
<!-- OPENWIKI:END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

