langchain-fundamentals

Construct LangChain agents with create_agent, tooling, and middleware in Python and TypeScript.

3|1|Updated Jun 4, 2025
One-click install
npx skills add https://github.com/jillesca/sp_oncall --skill langchain-fundamentals-jillesca
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-fundamentals
Source: https://github.com/jillesca/sp_oncall/tree/main/.agents/skills/langchain-fundamentals
Command: npx skills add https://github.com/jillesca/sp_oncall --skill langchain-fundamentals-jillesca

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers quickly assemble LangChain agents with standard patterns to manage tool integration, memory, and control flow.

Core Features & Use Cases

  • Agent construction with create_agent(), which abstracts the agent loop, tool execution, and state management.
  • Tool definition via @tool (Python) or tool() (TypeScript) to enable reusable actions.
  • Middleware and HITL patterns for controlled, auditable agent decisions.
  • Examples and templates provided in both Python and TypeScript to accelerate development.

Quick Start

Create a simple LangChain agent using create_agent() with a weather tool to answer user questions.

Frequently Asked Questions about langchain-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a LangChain agent with middleware in Python or TypeScript?

Build LangChain agents with middleware by using the create_agent() function to abstract the agent loop, tool execution, and state management. This Skill provides ready-to-run templates in both Python and TypeScript to standardize agent workflows.

What is the best way to define custom tools for LangChain agents?

Define custom tools for LangChain agents using the @tool decorator in Python or the tool() function in TypeScript. This Skill enables reusable action definitions that integrate seamlessly with the create_agent() workflow.

How does middleware handle human-in-the-loop (HITL) patterns in LangChain?

Middleware handles human-in-the-loop patterns in LangChain by intercepting agent decisions for controlled, auditable execution. This ensures safe control flow and error handling before tools execute critical actions.

Does this LangChain agent template support structured outputs and memory management?

Yes, this LangChain agent template supports structured outputs and memory management by enforcing best practices for state retention. It standardizes memory handling alongside tool definitions within the create_agent() workflow.

Can I standardize error-handling patterns across LangChain agents in Python and TypeScript?

Standardize error-handling patterns across LangChain agents in Python and TypeScript by applying consistent middleware logic. This Skill enforces uniform error-handling and control flow patterns across both language implementations.

When should I use create_agent instead of building a custom LangChain agent loop?

Use create_agent instead of a custom LangChain agent loop when you need standardized tool integration, memory management, and middleware support. It abstracts complex state management to accelerate development.