skills/frameworks/langchain/langchain-components/SKILL.md
Comprehensive reference for the LangChain ecosystem including LangChain, LangGraph, and Deep Agents for Python 3.10+. Use when the user asks to build AI agents, implement RAG pipelines, configure chat models, create tool-calling agents, set up retrieval chains, manage conversation memory, orchestrate multi-agent workflows, or integrate with LLM providers (OpenAI, Anthropic, Google). Covers models, messages, output parsers, vector stores, embedding strategies, streaming, middleware, and LangGraph state machines.
npx skillsauth add krzysztofsurdy/code-virtuoso langchain-componentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Complete reference for the LangChain ecosystem — models, agents, tools, retrieval, memory, middleware, streaming, multi-agent orchestration, LangGraph workflows, Deep Agents, and provider integrations for Python 3.10+.
from langchain.chat_models import init_chat_model
from langgraph.prebuilt import create_agent
model = init_chat_model("anthropic:claude-sonnet-4-20250514")
def get_weather(city: str) -> str:
"""Get weather for a city."""
return f"Sunny, 72F in {city}"
agent = create_agent(model, [get_weather])
response = agent.invoke(
{"messages": [{"role": "user", "content": "What's the weather in SF?"}]}
)
from pydantic import BaseModel
class SearchQuery(BaseModel):
query: str
year: int
structured_model = model.with_structured_output(SearchQuery)
result = structured_model.invoke("Who won the World Cup in 2022?")
from langchain_community.document_loaders import WebBaseLoader
from langchain_text_splitters import RecursiveCharacterTextSplitter
from langchain_openai import OpenAIEmbeddings
from langchain_core.vectorstores import InMemoryVectorStore
docs = WebBaseLoader("https://example.com").load()
chunks = RecursiveCharacterTextSplitter(chunk_size=1000).split_documents(docs)
vector_store = InMemoryVectorStore.from_documents(chunks, OpenAIEmbeddings())
retriever_tool = vector_store.as_retriever()
from langgraph.prebuilt import create_agent
billing_agent = create_agent(model, [lookup_billing], name="billing")
tech_agent = create_agent(model, [check_status], name="tech_support")
supervisor = create_agent(
model,
[billing_agent, tech_agent],
prompt="Route to the appropriate specialist."
)
from langgraph.graph import StateGraph, START, END
graph = StateGraph(dict)
graph.add_node("process", process_fn)
graph.add_node("review", review_fn)
graph.add_edge(START, "process")
graph.add_edge("process", "review")
graph.add_edge("review", END)
app = graph.compile()
for chunk in agent.stream(
{"messages": [{"role": "user", "content": "Hello"}]},
stream_mode="messages"
):
print(chunk)
init_chat_model() for provider-agnostic model initializationcreate_agent over building custom agent loopswith_structured_output() for type-safe LLM responsesstream_mode="messages" for token-level streaming to frontendsdevelopment
Spawn and coordinate a pre-composed agent team from a team definition file. Reads team files from teams/, resolves agents and skills, picks the best spawning mode (peer or sequential), and runs the workflow. Use when the user asks to run a team, dispatch a development team, start a feature delivery, or coordinate multiple agents for a multi-phase task.
development
Pre-composed agent team library. Use when the user asks which teams are available, what a team does, when to pick one team over another, or to browse multi-agent compositions. Catalogs ready-to-run teams (development team, review squad, war room) with their purpose, agent roster, workflow type, and when to use each. The actual dispatching is handled by the dispatching-agent-teams skill.
tools
Ecosystem discovery advisor. Use when the user asks 'what skill should I use', 'what agent should I delegate to', 'which team fits this task', or when onboarding to available skills, agents, and teams. Scans ALL installed skills at runtime -- not limited to any single plugin or vendor. Triggers: 'which skill', 'which agent', 'what do I use for', 'orient me', 'what tools do I have'.
tools
Interactive tool to scaffold a complete Claude Code plugin -- plugin.json manifest, skills, agents, hooks, MCP servers, LSP servers, and an optional marketplace.json catalog entry. Use when the user asks to create a plugin, build a Claude Code plugin, scaffold a plugin marketplace, convert an existing .claude/ configuration into a plugin, or package skills and agents for distribution. Runs a guided questionnaire, writes all required files to disk, and prints test instructions.