langchain-use-skill_skill

This skill provides a concise LangChain 1.0 quick reference for building agents, tools, memory, and middleware workflows.
  • Python

36

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill nanmicoder/claude-code-skills --skill langchain-use-skill

  • SKILL.md7.7 KB

Overview

This skill is a compact LangChain 1.0 usage guide for building LLM-driven agents and applications. It provides quick references for Agent creation, Tools, Memory, Middleware, Runtime context, and structured output patterns. Use it when you need practical, copy-paste examples and patterns to integrate LangChain into Python projects.

How this skill works

The guide explains core workflows: create_agent -> ReAct loop -> Tool invocation -> result return. It shows how to define @tool functions, access ToolRuntime and context, and wire in short-term and long-term memory via checkpointers and stores. It also covers middleware decorators for intercepting model and tool calls and how to enable structured outputs and streaming.

When to use it

  • When you need a minimal working Agent example in Python.
  • When integrating model providers (OpenAI, Anthropic) with LangChain.
  • When adding Tools that access runtime context or external services.
  • When you must persist conversation memory (in-memory or Postgres).
  • When implementing middleware to preprocess messages or wrap tool calls.

Best practices

  • Prefer Python 3.10+ and install provider integrations (langchain-openai, langchain-anthropic) alongside langchain.
  • Define Tools with clear signatures and docstrings; use ToolRuntime for context-aware tools.
  • Use checkpointers (InMemorySaver, PostgresSaver) for session persistence and thread_id to isolate conversations.
  • Start with a low temperature for deterministic outputs in production; enable streaming for UX where needed.
  • Use structured response formats (Pydantic/dataclass) for predictable outputs and downstream parsing.

Example use cases

  • A chat assistant that calls get_weather and returns structured responses with confidence scores.
  • A user-specific agent that reads user_id from ToolRuntime to personalize replies.
  • A production agent persisting session history in PostgresSaver for multi-session analytics.
  • Middleware that trims or normalizes messages before model calls to reduce token use.
  • A retrieval-augmented agent combining a retriever and tools to answer domain questions.

FAQ

Install langchain plus any provider integrations you need (for example langchain-openai or langchain-anthropic). Use Python 3.10+.

How do I keep conversation state across requests?

Provide a checkpointer when creating the agent (InMemorySaver for development, PostgresSaver for production) and pass a configurable thread_id to group messages into a session.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational