AGENTS.md · langchain-ai/langchainjs
AGENTS.md from langchain-ai/langchainjs: 449 lines covering Corridor security analysis, Project Overview, Repository Structure, Development Setup and more.
Template by langchain-ai
Chalk Labs
Need help deploying AGENTS.md · langchain-ai/langchainjs?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/langchain-ai/langchainjs/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: code-generation, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 449 lines
- File
AGENTS.md
Sections
- Corridor security analysis
- Project Overview
- Repository Structure
- Development Setup
- Common Commands
- Coding Standards
- File Naming Conventions
- Core Abstractions
- Writing Tests
- Creating New Integrations
- Best Practices
- Pull Request Checklist
- Debugging Tips
- Resources
First lines (shown under the repo's MIT license)
# AGENTS.md - AI Agent Guidelines for LangChain.js
This document provides guidance for AI coding agents working with the LangChain.js codebase.
<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 Overview
LangChain.js is a TypeScript framework for building LLM-powered applications. It provides standard interfaces for agents, models, embeddings, vector stores, and more, enabling developers to chain together interoperable components and third-party integrations.
### Supported Environments
- Node.js (ESM and CommonJS) - 20.x, 22.x, 24.x
- Cloudflare Workers
- Vercel / Next.js (Browser, Serverless and Edge functions)
- Supabase Edge Functions
- Browser
- Deno
- Bun
## Repository Structure
This is a **monorepo** managed with [pnpm workspaces](https://pnpm.io/) (v10.14.0) and [Turborepo](https://turbo.build/).
### Key Packages
| Package | Path | Description |
| -------------------------- | ------------------------------------- | ---------------------------------------------------------------- |
| `langchain` | `libs/langchain/` | Main LangChain package with agents, prompts, and orchestration |
| `@langchain/core` | `libs/langchain-core/` | Core abstractions and interfaces (base classes, runnables, etc.) |
| `@langchain/textsplitters` | `libs/langchain-textsplitters/` | Text splitting utilities |
| `@langchain/openai` | `libs/providers/langchain-openai/` | OpenAI integration |
| `@langchain/anthropic` | `libs/providers/langchain-anthropic/` | Anthropic integration |
| Other providers | `libs/providers/langchain-*/` | First-party provider integrations |
### Internal Packages
| Package | Path | Description |
| --------------------------- | -------------------------------- | ------------------------------------ |
| `@langchain/build` | `internal/build/` | Build utilities |
| `@langchain/tsconfig` | `internal/tsconfig/` | Shared TypeScript configuration |
| `@langchain/standard-tests` | `libs/langchain-standard-tests/` | Standard test suite for integrations |
## Development Setup
### Prerequisites
- **Node.js v24.x** (check with `node -v`)
- **pnpm v10.14.0** (package manager)
### Initial Setup
```bash
# Install dependencies from root
pnpm install
# Build the core package first (required before other packages)
pnpm --filter @langchain/core build
```
## Common Commands
All commands can be run from the project root using `pnpm --filter <package>` to target specific workspaces.
### Package Filters
- `--filter langchain` - the main `langchain` package
- `--filter @langchain/core` - the core package
- `--filter @langchain/openai` - OpenAI integration (and similarly for other providers)
### Building
```bash
pnpm --filter langchain build
pnpm --filter @langchain/core build
```
### Linting
```bash
pnpm lint
```
### Formatting
```bash
pnpm format # Fix formatting
pnpm format:check # Check only
```
### Testing
```bash
# Unit tests
pnpm --filter langchain test
pnpm --filter @langchain/core test
# Integration tests (requires API keys)
pnpm --filter langchain test:integration
# Single test file
pnpm --filter <package> test:single <path-to-test>
```
## Coding Standards
### TypeScript Configuration
The project uses a shared TypeScript configuration from `internal/tsconfig/base.json`:
- Target: ES2022
- Module: ESNext with bundler resolution
- Strict mode enabled
- Source maps and declaration maps enabled
### Lint Rules
Lint rules are defined in `.oxlintrc.json`. Key rules to follow:
1. **No `process.env`** - Except in test files (`node/no-process-env: error`)
2. **No explicit `any`** - Use proper types (`typescript/no-explicit-any: error`)
3. **Prefer template literals** - Over string concatenation (`prefer-template: error`)
4. **File extensions required** - In imports (`import/extensions: error`)
### Import Conventions
```typescript
// Always include .js extension for local imports (ESM)
import { Something } from "./something.js";
// Use named exports, not default exports
export { MyClass, myFunction };
```
### Zod Schema Support
The codebase supports both Zod v3 and v4:
```typescript
import { z } from "zod/v3";
import { z as z4 } from "zod/v4";
```
## File Naming Conventions
### Source Files
- Regular modules: `my_module.ts` (snake_case)
- Index files: `index.ts`
- Type definitions: `types.ts`
### Test Files
- **Unit tests**: `*.test.ts` - Tests that don't require external APIsSignals
- Stars
- 18,292
- Forks
- 3,455
- Open issues
- 271
- Last commit (this folder)
- Aug 24, 2026 (2 months ago)
- Last release
- Oct 22, 2026 (8 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/langchain-ai/langchainjs
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from langchain-ai
- 0.875score
deepagents-thread-inspector
langchain-aiOfficial
Inspect and explain conversations in the local Deep Agents Code SQLite session store.
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.872score
configuration-hardening
langchain-aiOfficial
Review Talon tool placement and defensive prompts when requested or when adding or changing tools or subagents; apply confirmed changes and verify active…
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.870score
skill-creator
langchain-aiOfficial
Guide for creating effective skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations.
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.869score
social-media
langchain-aiOfficial
Drafts engaging social media posts, writes hooks, suggests hashtags, creates thread structures, and generates companion images.
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.869score
schema-exploration
langchain-aiOfficial
Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database.
SkillAFreshness: A★ 30.6KClaude Code +9 - 0.869score
web-research
langchain-aiOfficial
Searches multiple web sources, synthesizes findings, and produces cited research reports using delegated subagents.
SkillAFreshness: A★ 30.6KClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get AGENTS.md · langchain-ai/langchainjs running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
AGENTS.md · langchain-ai/langchainjs. Agent Mart. https://agentmart.dev/templates/langchain-ai-langchainjs-agents-md (last updated 2026-10-24)