Python agents & ai repository by @langchain-ai. AI agent rules & system prompts with 40k stars.
# AGENTS Instructions
This repository is a monorepo. Each library lives in a subdirectory under `libs/`.
<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>
When you modify code in any library, run the following commands in that library's directory before creating a pull request:
- `make format` โ run code formatters
- `make lint` โ run the linter
- `make test` โ execute the test suite
To run a particular test file or to pass additional pytest options you can specify the `TEST` variable:
```txt
TEST=path/to/test.py make test
```
Other pytest arguments can also be supplied inside the `TEST` variable.
## Libraries
The repository contains several Python and JavaScript/TypeScript libraries.
Below is a high-level overview:
- **checkpoint** โ base interfaces for LangGraph checkpointers.
- **checkpoint-postgres** โ Postgres implementation of the checkpoint saver.
- **checkpoint-sqlite** โ SQLite implementation of the checkpoint saver.
- **cli** โ official command-line interface for LangGraph.
- **langgraph** โ core framework for building stateful, multi-actor agents.
- **prebuilt** โ high-level APIs for creating and running agents and tools.
- **sdk-js** โ JS/TS SDK for interacting with the LangGraph REST API.
- **sdk-py** โ Python SDK for the LangGraph Server API.
### Dependency map
The diagram below lists downstream libraries for each production dependency as
declared in that library's `pyproject.toml` (or `package.json`).
```text
checkpoint
โโโ checkpoint-postgres
โโโ checkpoint-sqlite
โโโ prebuilt
โโโ langgraph
prebuilt
โโโ langgraph
sdk-py
โโโ langgraph
โโโ cli
sdk-js (standalone)
```
Changes to a library may impact all of its dependents shown above.
- Do NOT use Sphinx-style double backtick formatting (` ``code`` `). Use single backticks (`` `code` ``) for inline code references in docstrings and comments.