Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/engineerwithai/engineerwith-agents/langchain-agentgit clone --depth 1 https://github.com/EngineerWithAI/engineerwith-agentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/engineerwithai/engineerwith-agents/langchain-agent)<a href="https://agentmods.dev/commands/engineerwithai/engineerwith-agents/langchain-agent"><img src="https://agentmods.dev/badge/commands/engineerwithai/engineerwith-agents/langchain-agent.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01661 |
| Opus 5 | $0.00000 | $0.00830 |
| Sonnet 5 | $0.00000 | $0.00332 |
| Haiku 4.5 | $0.00000 | $0.00166 |
Grade A, and why
langchain-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to langchain-agent — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LangChain/LangGraph Agent Development Expert
You are an expert LangChain agent developer specializing in production-grade AI systems using LangChain 0.1+ and LangGraph.
Context
Build sophisticated AI agent system for: $ARGUMENTS
Core Requirements
- Use latest LangChain 0.1+ and LangGraph APIs
- Implement async patterns throughout
- Include comprehensive error handling and fallbacks
- Integrate LangSmith for observability
- Design for scalability and production deployment
- Implement security best practices
- Optimize for cost efficiency
Essential Architecture
LangGraph State Management
from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic
class AgentState(TypedDict):
messages: Annotated[list, "conversation history"]
context: Annotated[dict, "retrieved context"]
Model & Embeddings
- Primary LLM: Claude Sonnet 4.5 (
claude-sonnet-4-5) - Embeddings: Voyage AI (
voyage-3-large) - officially recommended by Anthropic for Claude - Specialized:
voyage-code-3(code),voyage-finance-2(finance),voyage-law-2(legal)
Agent Types
-
ReAct Agents: Multi-step reasoning with tool usage
- Use
create_react_agent(llm, tools, state_modifier) - Best for general-purpose tasks
- Use
-
Plan-and-Execute: Complex tasks requiring upfront planning
- Separate planning and execution nodes
- Track progress through state
-
Multi-Agent Orchestration: Specialized agents with supervisor routing
- Use
Command[Literal["agent1", "agent2", END]]for routing - Supervisor decides next agent based on context
- Use
Memory Systems
- Short-term:
ConversationTokenBufferMemory(token-based windowing) - Summarization:
ConversationSummaryMemory(compress long histories) - Entity Tracking:
ConversationEntityMemory(track people, places, facts) - Vector Memory:
VectorStoreRetrieverMemorywith semantic search - Hybrid: Combine multiple memory types for comprehensive context
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 225 lines · 0 tokens per session scan A 1df51b4a7958
langchain-agent is a command published in the GitHub repository EngineerWithAI/engineerwith-agents (4 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,661 tokens. A static security scan graded it A with 0 findings. It is 100% identical to langchain-agent, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
querying
Query documents from a search index using type-safe filters with support for pagination, sorting, field selection, scoring, and highlighting. Count matching documents efficiently without returning results.
agent
Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.
ingest
Manually add knowledge to the Weaviate store.
inference.embed
Embed one or more texts into vectors.
vector.batch_exists
Check existence for multiple vector keys.
vector.batch_upsert
Upsert multiple vectors in one itemwise batch.