LangGraph

LangGraph is an orchestration framework for building stateful agents with explicit workflow graphs, persistent execution and human review points

출처 원문 · EN

실제 예시 보기

작성자 예시

Author diagram: chained calls with a gate

Original documentation illustration of calls linked by a gate. It explains a workflow pattern; it is not a product interface, an executed trace or a measured quality result.

LangGraph author diagram showing an input, LLM call, gate and subsequent calls
전체 이미지 보기
라이선스

Complete source PNG converted losslessly to WebP without crop or resize.

MIT License

Copyright (c) 2025 LangChain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
작성자 예시

Author diagram: parallel calls and aggregation

Original documentation illustration of parallel calls joined by an aggregator. The image shows structure; no independent timing or reliability comparison is implied.

LangGraph author diagram showing three parallel LLM calls and an aggregator
전체 이미지 보기
라이선스

Complete source PNG converted losslessly to WebP without crop or resize.

MIT License

Copyright (c) 2025 LangChain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
작성자 예시

Source example: pause and resume an approval

Complete Python source routes an in-memory approval to proceed or cancel, then resumes the same thread. The Transfer $500 string is dummy action text: no payment is implemented. Requires compatible LangGraph; production needs durable persistence. Source assertions/prints are not site-run results.

입력 예시

# :snippet-start: langgraph-interrupts-approval-py
from typing import Literal, Optional, TypedDict

from langgraph.checkpoint.memory import InMemorySaver
from langgraph.graph import END, START, StateGraph
from langgraph.types import Command, interrupt


class ApprovalState(TypedDict):
    action_details: str
    status: Optional[Literal["pending", "approved", "rejected"]]


def approval_node(state: ApprovalState) -> Command[Literal["proceed", "cancel"]]:
    # Expose details so the caller can render them in a UI
    decision = interrupt(
        {
            "question": "Approve this action?",
            "details": state["action_details"],
        }
    )

    # Route to the appropriate node after resume
    return Command(goto="proceed" if decision else "cancel")


def proceed_node(state: ApprovalState):
    return {"status": "approved"}


def cancel_node(state: ApprovalState):
    return {"status": "rejected"}


builder = StateGraph(ApprovalState)
builder.add_node("approval", approval_node)
builder.add_node("proceed", proceed_node)
builder.add_node("cancel", cancel_node)
builder.add_edge(START, "approval")
builder.add_edge("proceed", END)
builder.add_edge("cancel", END)

# Use a more durable checkpointer in production
checkpointer = InMemorySaver()
graph = builder.compile(checkpointer=checkpointer)

config = {"configurable": {"thread_id": "approval-123"}}
initial = graph.stream_events(
    {"action_details": "Transfer $500", "status": "pending"},
    config=config,
    version="v3",
)
_ = initial.output  # drive the stream to completion
print(initial.interrupts)  # -> (Interrupt(value={'question': ..., 'details': ...}),)

# Resume with the decision; True routes to proceed, False to cancel
resumed = graph.stream_events(Command(resume=True), config=config, version="v3")
print(resumed.output["status"])
# :snippet-end:

# :remove-start:
if __name__ == "__main__":
    assert resumed.output["status"] == "approved"
    print("✓ langgraph-interrupts-approval")
# :remove-end:
라이선스

Complete original source file/block(s) unchanged. Outer README fence omitted for copying; grouped complete files keep their own language fences. Editorial title/prerequisites added. Nothing executed.

MIT License

Copyright (c) 2025 LangChain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
작성자 예시

Source example: tool state and run context

Complete Python source passes a user ID in graph state and an organization ID in per-run context to a ToolNode. Uses an authored tool-call message and sample identifiers, without a model or real user lookup. Requires LangChain/LangGraph; the included assertions are unexecuted.

입력 예시

# :snippet-start: workflows-agents-tool-runtime-state-context-py
from dataclasses import dataclass

from langchain.messages import AIMessage
from langchain.tools import ToolRuntime, tool
from langgraph.graph import MessagesState, START, StateGraph
from langgraph.prebuilt import ToolNode


class State(MessagesState):
    user_id: str


@dataclass
class Context:
    organization_id: str


@tool
def get_user_info(runtime: ToolRuntime[Context, State]) -> str:
    """Look up user information."""
    # Read the current graph state passed to the ToolNode.
    user_id = runtime.state["user_id"]

    # Read explicit per-run values that are not part of graph state.
    organization_id = runtime.context.organization_id

    return f"User {user_id} in organization {organization_id}"


builder = StateGraph(State, context_schema=Context)
builder.add_node("tools", ToolNode([get_user_info]))
builder.add_edge(START, "tools")
graph = builder.compile()

result = graph.invoke(
    {
        "messages": [
            AIMessage(
                content="",
                tool_calls=[
                    {
                        "name": "get_user_info",
                        "args": {},
                        "id": "call_user_info",
                    }
                ],
            )
        ],
        "user_id": "user_123",
    },
    context=Context(organization_id="org_456"),
)
# :snippet-end:

# :remove-start:
if __name__ == "__main__":
    expected = "User user_123 in organization org_456"
    contents = [str(getattr(message, "content", "")) for message in result["messages"]]
    assert any(expected in content for content in contents), contents
    print("✓ workflows-agents tool runtime state/context sample completed")
# :remove-end:
라이선스

Complete original source file/block(s) unchanged. Outer README fence omitted for copying; grouped complete files keep their own language fences. Editorial title/prerequisites added. Nothing executed.

MIT License

Copyright (c) 2025 LangChain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

제품 소개

LangChain is the agent framework: abstractions and integrations for models, tools, and agent loops.

출처 원문 · EN
출처에 기재된 기능

LangGraph의 주요 기능

  1. 01Compose deterministic and model-driven steps
  2. 02Persist and resume execution state
  3. 03Pause workflows for human input
출처 원문 · EN
차별점

차별점

It provides lower-level orchestration primitives rather than a prebuilt conversational assistant. LangChain integrations are optional; developers define the state, transitions and tools their workflow requires.

출처 원문 · EN
추천 대상

추천 대상

  • Developers building stateful agent workflows
  • Teams needing resumable execution and human checkpoints
출처 원문 · EN
선택하기 전에

확인할 사항

  • 실제 작업 하나를 시험하고 결과가 요구 사항에 맞는지 비교합니다.
  • 어떤 데이터가 저장·공유되거나 학습에 사용되는지 확인합니다.
  • 공식 사이트에서 현재 가격, 사용 한도, 해지 조건을 확인합니다.
마지막 확인

공식 링크는 2026년 11월 9일에 확인했습니다. 기능 주장은 독립적으로 테스트하지 않았습니다.

관련 작업

제품가격이용 방법사용 사례
LangGraph미확인API작업 흐름 자동화
LangChain무료API작업 흐름 자동화
Flowise미확인API작업 흐름 자동화
Paperclip미확인API작업 흐름 자동화
Restate무료 및 유료 요금제정보 없음작업 흐름 자동화