langchain-architecture
Skill này làm gì
Công cụ này giúp bạn hiểu và xây dựng ứng dụng AI bằng LangChain. Nó giải thích các thành phần cơ bản như agent, chain và memory.
Khi nào nên dùng
- ✓Khi bạn muốn tạo một AI tự đưa ra quyết định.
- ✓Khi bạn thiết lập các quy trình làm việc phức tạp cho AI.
- ✓Khi bạn cần AI nhớ các cuộc trò chuyện trước đây.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/langchain-architecture/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để tạo một agent tìm kiếm trên internet rồi thực hiện một phép tính?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ giải thích các khái niệm LangChain, như 'agent' là thành phần quyết định việc cần làm, 'chain' là các bước tuần tự, và 'memory' để ghi nhớ cuộc trò chuyện.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
…
Câu hỏi thường gặp
'Agent' trong LangChain là gì?
Agent giống như bộ não của AI, dùng mô hình ngôn ngữ để quyết định hành động nào cần làm để hoàn thành một nhiệm vụ.
'Chain' là gì?
Chain là chuỗi các bước mà AI thực hiện, như gọi mô hình ngôn ngữ, xử lý dữ liệu hoặc dùng một công cụ.
AI 'nhớ' trong cuộc trò chuyện như thế nào?
Bằng cách dùng 'memory', có thể lưu toàn bộ tin nhắn, một bản tóm tắt của chúng hoặc chỉ vài tin nhắn gần nhất được trao đổi.
Chi tiết
Mô tả gốc của tác giả
Master the LangChain framework for building sophisticated LLM applications with agents, chains, memory, and tool integration.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5024
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.