langchain-claude-code
AGENTS.md1 starsChanged 12 months agoMITView on GitHub
- Installs packages
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.
In this repository15 other files it gives its agents.
- .cursor/rules/claude-sdk/agents.mdcCursor rule
- .cursor/rules/claude-sdk/client.mdcCursor rule
- .cursor/rules/claude-sdk/hooks.mdcCursor rule
- .cursor/rules/claude-sdk/index.mdcCursor rule
- .cursor/rules/claude-sdk/permissions.mdcCursor rule
- .cursor/rules/claude-sdk/query.mdcCursor rule
- .cursor/rules/claude-sdk/tools.mdcCursor rule
- .cursor/rules/claude-sdk/types.mdcCursor rule
- .cursor/rules/index.mdcCursor rule
- .cursor/rules/langchain/callbacks.mdcCursor rule
- .cursor/rules/langchain-claude-code.mdcCursor rule
- .cursor/rules/langchain/custom-chat-model.mdcCursor rule
- .cursor/rules/langchain/langgraph-integration.mdcCursor rule
- .cursor/rules/langchain/streaming.mdcCursor rule
- .cursor/rules/langchain/tool-calling.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Prefer uv (uses uv.lock) for reproducible environments.
- Very specific: line 17
Use normalize_tools and ClaudeTool enums when handling allowlists.
- Very specific: line 22
Every new feature or bugfix must ship with a test (policy captured in .cursor/rules/langchain-claude-code.mdc).
- Distinctive: line 26
Write concise commits summarizing the change and its scope.
- Very specific: line 31
When binding LangChain tools, use bind_tools([...]) or enable_tools([...]).
- Distinctive: line 33
Always enable tests for new agent flows.
≈ “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
Repository Guidelines
Project Structure & Module Organization
- Source code lives in
src/langchain_claude_code/(chat model, tool catalog, examples likemain.pyanddeep.py). - Tests are in
tests/and must accompany any new behavior. - Repository rules live in
.cursor/rules/(project conventions and agent notes).
Build, Test, and Development Commands
python -m unittest discover -v tests— run the full test suite.uv run src/langchain_claude_code/main.py— example invocation with DuckDuckGo tool.uv run src/langchain_claude_code/deep.py— DeepAgent demo.- Prefer
uv(usesuv.lock) for reproducible environments;pip install -e .works for local edits.
Coding Style & Naming Conventions
- Python 3.12+, async-first APIs; keep sync shims minimal.
- Pydantic models/fields for config; prefer
model_copy(update=...)over mutating state. - Use
normalize_toolsandClaudeToolenums when handling allowlists; avoid raw strings. - Comments should be short and purposeful; keep files ASCII.
Testing Guidelines
- Framework:
unittest; locate tests undertests/withtest_*.pynaming. - Every new feature or bugfix must ship with a test (policy captured in
.cursor/rules/langchain-claude-code.mdc). - For tool/agent behavior, add assertions for response metadata (
tool_results,internal_tool_calls) and streamed chunks when relevant.
Commit & Pull Request Guidelines
- Write concise commits summarizing the change and its scope; use present tense (e.g., "Add tool result capture to metadata").
- PRs should include: what changed, why, testing performed (
python -m unittest ...), and any new docs or examples touched. - Link issues or tickets when available; include screenshots/log snippets for user-visible changes (CLI output is sufficient).
Agent-Specific Instructions
- When binding LangChain tools, use
bind_tools([...])orenable_tools([...]); tool outputs should surface inresponse_metadata.tool_results. - To align LangGraph threads with provider sessions, use
resume_from_thread(thread_id); keepallowed_toolsexplicit for safety. - Always enable tests for new agent flows; an untested feature is treated as broken by default.
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.

