本文へスキップ
Skillpedia
エージェント48k · #5024

langchain-architecture

できること

このツールは、LangChainを使ってAIアプリを理解し、作る手助けをします。エージェント、チェーン、メモリといった基本的な構成要素を説明します。

使う場面

  • ✓AIが自分で判断して動く仕組みを作りたいとき。
  • ✓複雑なAIの処理の流れを組み立てたいとき。
  • ✓AIに過去の会話を覚えさせたいとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/langchain-architecture/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/langchain-architecture/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“インターネットで検索してから計算を行うエージェントは、どうすれば作れますか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

LangChainの概念を説明する形で動作します。たとえば、次に何をするかを決める「エージェント」、順番に実行される手順の「チェーン」、会話を覚えておく「メモリ」などを解説します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • <support-root>/references/agents.md
  • <support-root>/references/memory.md
  • <support-root>/references/chains.md
  • <support-root>/references/document-processing.md
  • <support-root>/references/callbacks.md
  • <support-root>/assets/agent-template.py
  • <support-root>/assets/memory-config.yaml
  • <support-root>/assets/chain-example.py

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

LangChain Architecture

Master the LangChain framework for building sophisticated LLM applications with agents, chains, memory, and tool integration.

Do not use this skill when

  • The task is unrelated to langchain architecture
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

Use this skill when

  • Building autonomous AI agents with tool access
  • Implementing complex multi-step LLM workflows
  • Managing conversation memory and state
  • Integrating LLMs with external data sources and APIs
  • Creating modular, reusable LLM application components
  • Implementing document processing pipelines
  • Building production-grade LLM applications

Core Concepts

1. Agents

Autonomous systems that use LLMs to decide which actions to take.

Agent Types:

  • ReAct: Reasoning + Acting in interleaved manner
  • OpenAI Functions: Leverages function calling API
  • Structured Chat: Handles multi-input tools
  • Conversational: Optimized for chat interfaces
  • Self-Ask with Search: Decomposes complex queries

2. Chains

Sequences of calls to LLMs or other utilities.

Chain Types:

  • LLMChain: Basic prompt + LLM combination
  • SequentialChain: Multiple chains in sequence
  • RouterChain: Routes inputs to specialized chains
  • TransformChain: Data transformations between steps
  • MapReduceChain: Parallel processing with aggregation

3. Memory

Systems for maintaining context across interactions.

Memory Types:

  • ConversationBufferMemory: Stores all messages
  • ConversationSummaryMemory: Summarizes older messages
  • ConversationBufferWindowMemory: Keeps last N messages
  • EntityMemory: Tracks information about entities
  • VectorStoreMemory: Semantic similarity retrieval

4. Document Processing

Loading, transforming, and storing documents for retrieval.

Components:

  • Document Loaders: Load from various sources
  • Text Splitters: Chunk documents intelligently
  • Vector Stores: Store and retrieve embeddings
  • Retrievers: Fetch relevant documents
  • Indexes: Organize documents for efficient access

5. Callbacks

Hooks for logging, monitoring, and debugging.

Use Cases:

  • Request/response logging
  • Token usage tracking
  • Latency monitoring
  • Error handling
  • Custom metrics collection

Quick Start

from langchain.agents import AgentType, initialize_agent, load_tools
from langchain.llms import OpenAI
from langchain.memory import ConversationBufferMemory

# Initialize LLM
llm = OpenAI(temperature=0)

# Load tools
tools = load_tools(["serpapi", "llm-math"], llm=llm)

# Add memory
memory = ConversationBufferMemory(memory_key="chat_history")

# Create agent
agent = initialize_agent(
    tools,
    llm,
    agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION,
    memory=memory,
    verbose=True
)

# Run agent
result = agent.run("What's the weather in SF? Then calculate 25 * 4")

Architecture Patterns

Pattern 1: RAG with LangChain

from langchain.chains import RetrievalQA
from langchain.document_loaders import TextLoader

…
よくある質問

LangChainの「エージェント」とは何ですか?

言語モデルを使って、タスクを達成するためにどの行動を取るかを決めるAIの「頭脳」のような仕組みです。

「チェーン」とは何ですか?

言語モデルの呼び出し、データの処理、ツールの利用など、AIが順番にたどる一連の手順のことです。

AIは会話をどのように「覚えて」いるのですか?

「メモリ」を使います。メモリには、すべてのメッセージを保存する方法、要約を保存する方法、直近のやり取りだけを保存する方法があります。

詳細

作者による元の説明

Master the LangChain framework for building sophisticated LLM applications with agents, chains, memory, and tool integration.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5024
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル