liveBook · Manning

LangSmith

As explained in AI Agents and Applications

LangSmith is a development and observability platform for tracing, debugging, evaluating, monitoring, and refining language-model applications.

LLM applications can behave unpredictably when natural-language inputs expose edge cases. LangSmith is a development and observability platform for debugging, testing, and monitoring those applications. Its traces make a workflow visible when an answer or agent action does not follow the expected path. section 7.5

For a document Q&A chatbot, enable tracing, run a question, and open the latest trace to inspect the chain’s execution. For a tool-based agent, a graphical trace exposes LLM steps, tool calls, intermediate states, and message flow—even when the agent itself is built from prebuilt components. section 7.5 section 11.9.3 section 11.9.4

LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_API_KEY="<your-langsmith-api-key>"
LANGSMITH_PROJECT="langchain-in-action-react-agent"

Set these environment variables in a .env file to enable tracing, supply the LangSmith endpoint and API key, and name the project where runs will appear. Keep the API key secure. section 11.9.4 section 7.5

Use the trace as a debugging path:

  • Run the application and submit a question. section 11.9.4
  • In LangSmith, open Observability → Tracing Projects, select the project, and open its latest trace. section 11.9.4
  • Compare the visible chain or agent steps with the workflow you expected; inspect tool calls and message flow when an agent takes an unexpected path. section 7.5 section 11.9.4

Tracing is one part of the platform. LangSmith also supports built-in evaluators for relevance, correctness, and sensitivity; datasets assembled from sources including production data for continuous and regression testing; and production monitoring with human labels and annotations. These capabilities help investigate deviations rather than assuming a successful-looking answer means the workflow ran correctly. section 7.5

How AI Agents and Applications covers it

How deep it goes
Walks through tracing configuration and trace inspection; describes evaluators, datasets, and production feedback without a worked evaluation procedure.
Examples
Uses a document Q&A chatbot trace and an agent trace showing LLM calls, tool invocations, and message flow.
What it assumes
Starts tracing setup with account and API-key creation; trace inspection requires an LLM application to run.
What you can do after
Operate/configure it to capture runs and inspect Q&A or agent execution when behavior differs from expectations.
How it connects
Connects tracing to RAG, LangChain Q&A chains, LangGraph agents, tool calls, evaluation datasets, and production monitoring.

Also explained in

Compare how 2 books explain LangSmith →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.