> ## Documentation Index
> Fetch the complete documentation index at: https://docs.befailproof.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LangChain and LangGraph

> 설치, 계측, 첫 번째 트레이스 확인.

LangChain 또는 LangGraph 트레이스를 시작하는 세 가지 단계입니다. 스트리밍, human-in-the-loop, 스팬 명명, 옵션에 대한 자세한 내용은 [전체 가이드](/ko/start/integrations/langchain)를 참고하세요.

## 설치

```bash theme={null}
pip install 'failproofai-sdk[langgraph]'
```

LangGraph 없이 LangChain만 사용하는 경우 `failproofai-sdk[langchain]`을 사용하세요.

## 계측

```python theme={null}
import failproofai_sdk

failproofai_sdk.configure(environment="production")
failproofai_sdk.instrument()

with failproofai_sdk.session():
    graph.invoke({"messages": [HumanMessage("...")]})
```

호출 지점을 변경할 필요가 없습니다. `instrument()`는 LangChain이 모든 콜백 매니저를 생성할 때 주입하는 트레이서를 등록하므로, 그래프, 도구, 모델이 자동으로 캡처됩니다 — 직접 작성하지 않은 라이브러리 내부의 것들도 포함해서요.

## 도착 여부 확인

한 번 실행한 후 **Observe → Sessions**를 열고 환경을 선택하세요. 실행 결과가 재구성된 트레이스로 나타납니다.

아무것도 도착하지 않으면 `failproofai config --status`로 머신이 연결되어 있는지 확인하세요.

<Card title="LangChain 전체 가이드" icon="arrow-right" href="/ko/start/integrations/langchain">
  기록되는 항목, 스트리밍, 토큰 수, 스팬 명명, 세션 제어, 옵션, human in the loop.
</Card>
