langchain-agent

langchain-agent is a command for Claude Code from HermeticOrmus/LibreUIUX-Claude-Code. It costs 0 tokens per session (1,661 once invoked), scanned A, original, MIT.

A coding assistant for building AI agents with LangChain and LangGraph, Python frameworks for connecting language models to tools, data, and multi-step workflows. It focuses on async code, error handling, monitoring, security, and deployment.

In plain words
What is it for?
Use it to build LangChain or LangGraph agents, connect models and tools, manage conversation state, add observability with LangSmith, and prepare systems for production.
Why use it?
It helps avoid piecing together agent architecture, state handling, fallbacks, and operational concerns from scratch.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to build LangChain or LangGraph agents, connect models and tools, manage conversation state, add observability with LangSmith, and prepare systems for production.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libreuiux-claude-code/langchain-agent
Install

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.

Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-Code

Made for: Claude Code.

Wrote 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.

agentmods badge for langchain-agent

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/langchain-agent/github.svg)](https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/langchain-agent)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/langchain-agent"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/langchain-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for langchain-agent

Your own site · 80×15
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/langchain-agent"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/langchain-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,661 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01661
Opus 5.5 $0.00000 $0.00664
Sonnet 5.5 $0.00000 $0.00332
Haiku 4.5 $0.00000 $0.00166

Measured 26d ago against content hash 1df51b4a7958, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 26d 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.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

plugins/llm-application-dev/commands/langchain-agent.md · 225 lines

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

  1. ReAct Agents: Multi-step reasoning with tool usage

    • Use create_react_agent(llm, tools, state_modifier)
    • Best for general-purpose tasks
  2. Plan-and-Execute: Complex tasks requiring upfront planning

    • Separate planning and execution nodes
    • Track progress through state
  3. Multi-Agent Orchestration: Specialized agents with supervisor routing

    • Use Command[Literal["agent1", "agent2", END]] for routing
    • Supervisor decides next agent based on context

Memory Systems

  • Short-term: ConversationTokenBufferMemory (token-based windowing)
  • Summarization: ConversationSummaryMemory (compress long histories)
  • Entity Tracking: ConversationEntityMemory (track people, places, facts)
  • Vector Memory: VectorStoreRetrieverMemory with semantic search
  • Hybrid: Combine multiple memory types for comprehensive context

Read the full file on GitHub · 225 lines

Changes

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.

  1. 26d ago First seen · 225 lines · 0 tokens per session scan A 1df51b4a7958

Subscribe to this mod's changes

langchain-agent is a command published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (115 stars, last pushed 11d 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-20.