LangGraphLangGraph 1.2 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
38 small wins to finish your path

LangSmith: see what a run did

LangSmith records every run so you can read it back step by step. You set two environment variables before running, and tracing turns on with no code change.

Last updated: 27 Sep, 2026 · LangSmith

When an answer is wrong, logs rarely show why. A trace shows each node, each model call, and what it sent and got back, so you can find the step that failed.

The tracing environment variables

python
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=your_key
export LANGSMITH_PROJECT=support-agent   # optional

What tracing records

  • With those variables set, LangChain and LangGraph detect them and trace every run automatically, no code change needed.
  • Each run appears in LangSmith as a tree of steps you can open and read.
  • The older LANGCHAIN_TRACING_V2 and LANGCHAIN_API_KEY names still work; the LANGSMITH_ names are current.

When to turn on tracing

  • Finding the step where a run went wrong or got expensive.
  • Watching what a live agent sends to the model.
Watch out. Tracing records runs only after it is switched on. Set the variables before you run, or the run you wanted to inspect is not captured. Turn it on before you need it.

What LangGraph this course left out

The course covered the graph API end to end. These are the LangGraph topics it did not reach, each worth reading when you meet the need.

TopicWhat it is forWhere to read
Functional API@entrypoint and @task: the same persistence, memory and interrupts written as plain functions, without building a graphFunctional API
Node cachingA CachePolicy on a node so an expensive step is reused instead of re-runGraph API: node caching
Durability modesdurability="sync"/"async"/"exit": how often a run is written to the checkpointer, trading safety for speedPersistence: durability
Production checkpointers and storesPostgres and SQLite backends that keep memory across restarts, beyond the InMemorySaver used hereCheckpointer integrations
MCP toolsConnecting an agent to tools served over the Model Context ProtocolModel Context Protocol
LangGraph PlatformDeploying to the cloud with Studio and the Assistants API, beyond the local langgraph dev shown hereDeploy to cloud
Deep AgentsA higher-level prebuilt for multi-agent apps, with subagents, planning and a virtual filesystemMulti-agent
Try it yourself
  • Set the variables, run any earlier lesson's graph, and open the trace.
  • Name the project and confirm the run lands under it.

You understood something today that you didn't yesterday.