---
title: "LangGraph: ฟีเจอร์ เวอร์ชัน และ Quickstart · DotsAgent"
description: "LangGraph โดย LangChain Inc.: ไลเซนส์ เวอร์ชันล่าสุด รองรับ MCP, การรันงานแบบต่อเนื่อง การอนุมัติโดยมนุษย์ การ tracing และ evals พร้อม Quickstart ที่คัดลอกไปใช้ได้"
url: https://dotsagent.io/th/frameworks/langgraph
---

เฟรมเวิร์ก · LangChain Inc.

# ภาพรวม LangGraph

ไลบรารีระดับ low-level ของ LangChain สำหรับสร้าง agent เป็นกราฟที่กำหนดไว้อย่างชัดเจน โดยมีสถานะที่บันทึก checkpoint และ interrupt เป็นองค์ประกอบหลัก ส่วน create_agent ใน LangChain v1 ทำงานบน LangGraph เมื่อใช้ลูปสำเร็จรูปก็เพียงพอ

**เหมาะสำหรับ:**  agent ที่ทำงานต่อเนื่องและมีสถานะ ซึ่งต้องควบคุมทุกขั้นตอนและทำงานต่อได้หลังเกิดข้อผิดพลาด

## ข้อมูลสำคัญ

- **ผู้ดูแล**: LangChain Inc.
- **ภาษา**: Python, TypeScript, JavaScript
- **ไลเซนส์**: MIT
- **เวอร์ชันล่าสุด**: `langgraph 1.2.12 / langchain 1.4.3` · 28 กันยายน 2569
- **Repository**: [langchain-ai/langgraph](https://github.com/langchain-ai/langgraph) · 42,550 ดาว
- **ตัวเลือกแบบโฮสต์**: [LangSmith Deployment (formerly LangGraph Platform)](https://docs.langchain.com/oss/python/langgraph/overview)เดิมชื่อ LangGraph Platform; Studio ใช้สำหรับสร้างต้นแบบแบบภาพ

## Quickstart

ติดตั้งแพ็กเกจ ตั้งค่าข้อมูลรับรอง แล้วเรียกใช้ agent ตัวอย่างที่เล็กที่สุดจากเอกสารทางการ Model ID เป็นค่าที่เอกสารใช้ และอาจยังไม่ได้เปิดใช้งานในบัญชีของคุณ

### Python (LangChain create_agent)

`ติดตั้ง`

```
pip install -U langchain
```

ต้องใช้ Provider API key, e.g. OPENAI_API_KEY

`Python (LangChain create_agent)`

```
from langchain.agents import create_agent

def get_weather(city: str) -> str:
    """Get weather for a given city."""
    return f"It's always sunny in {city}!"

agent = create_agent(
    model="openai:gpt-5.5",
    tools=[get_weather],
    system_prompt="You are a helpful assistant",
)

result = agent.invoke(
    {"messages": [{"role": "user", "content": "What's the weather in San Francisco?"}]}
)
print(result["messages"][-1].content_blocks)
```

[แหล่งข้อมูล Quickstart](https://docs.langchain.com/oss/python/langchain/quickstart)

### Python (raw LangGraph)

`ติดตั้ง`

```
pip install -U langgraph
```

`Python (raw LangGraph)`

```
from langgraph.graph import StateGraph, MessagesState, START, END

def mock_llm(state: MessagesState):
    return {"messages": [{"role": "ai", "content": "hello world"}]}

graph = StateGraph(MessagesState)
graph.add_node(mock_llm)
graph.add_edge(START, "mock_llm")
graph.add_edge("mock_llm", END)
graph = graph.compile()

graph.invoke({"messages": [{"role": "user", "content": "hi!"}]})
```

[แหล่งข้อมูล Quickstart](https://docs.langchain.com/oss/python/langgraph/overview)

## ฟีเจอร์

| ใช้ได้กับทุกโมเดล | — | — |
| --- | --- | --- |
| MCP client | — | ผ่าน langchain-mcp-adapters |
| MCP server | — | — |
| หลาย agent | — | รองรับ subgraph; harness ของ Deep Agents เพิ่ม sub-agent ได้ |
| การทำงานต่อเนื่องแบบทนทาน | — | มี checkpointer สำหรับ Postgres หรือ SQLite และทำงานต่อได้หลังเกิดข้อผิดพลาด |
| การอนุมัติโดยมนุษย์ | — | Interrupts ช่วยให้ตรวจสอบและแก้ไข state ระหว่างการทำงานได้ |
| Tracing | — | ทำผ่าน LangSmith โดยตั้งค่า LANGSMITH_TRACING=true |
| Evals | — | การประเมินทำใน LangSmith ไม่ใช่ในไลบรารีโอเพนซอร์ส |

## การเปลี่ยนแปลงล่าสุด

- เอเจนต์ LangChain v1 (create_agent) สร้างขึ้นบน LangGraph แล้ว
- LangGraph Platform เปลี่ยนชื่อเป็น LangSmith Deployment
- Deep Agents ซึ่งเป็น harness ที่ทำงานบน LangGraph เพิ่มความสามารถในการใช้ subagents

## ทางเลือกในภาษาเดียวกัน

- [OpenAI Agents SDK](https://dotsagent.io/th/frameworks/openai-agents-python)

- [OpenAI Agents SDK (JS)](https://dotsagent.io/th/frameworks/openai-agents-js)

- [Claude Agent SDK](https://dotsagent.io/th/frameworks/claude-agent-sdk)

- [Google ADK](https://dotsagent.io/th/frameworks/google-adk)

- [Microsoft Agent Framework](https://dotsagent.io/th/frameworks/microsoft-agent-framework)

- [CrewAI](https://dotsagent.io/th/frameworks/crewai)

## แหล่งข้อมูล

1. [docs.langchain.com](https://docs.langchain.com/oss/python/langgraph/overview)/oss/python/langgraph/overview
2. [docs.langchain.com](https://docs.langchain.com/oss/python/langchain/quickstart)/oss/python/langchain/quickstart
3. [pypi.org](https://pypi.org/pypi/langgraph/json)/pypi/langgraph/json
4. [pypi.org](https://pypi.org/pypi/langchain/json)/pypi/langchain/json
5. [registry.npmjs.org](https://registry.npmjs.org/@langchain%2flanggraph)/@langchain%2flanggraph
6. [api.github.com](https://api.github.com/repos/langchain-ai/langgraph)/repos/langchain-ai/langgraph

แหล่งอ้างอิงอิสระสำหรับผู้สร้าง AI agent ไม่มีส่วนเกี่ยวข้องกับผู้ให้บริการที่กล่าวถึง

© 2026 DotsAgent · ตรวจสอบข้อมูลเมื่อ 1 ตุลาคม 2569
