Langchain Tutorial - Stop Guessing! Trace and Debug LangChain Agents with LangSmith

Mohamed Naji Aboo · Intermediate ·🤖 AI Agents & Automation ·2mo ago

About this lesson

Debugging AI Agents is hard—until now. If you’ve ever built a LangChain agent and wondered why it was slow, why a specific tool took too long, or why the model behaved unexpectedly, this video is for you. Traditional logging (adding print statements everywhere) isn't enough for complex, multi-agent workflows. In this tutorial, I show you how to integrate LangSmith into your Python projects to get full visibility into your execution flow. We’ll move beyond "black box" development and see exactly what happens inside every tool call and LLM interaction. What you will learn in this video: The Problem: Why traditional logging fails for agentic processes. The Solution: An introduction to LangSmith for tracing and debugging. Step-by-Step Setup: How to configure environment variables (LANGSMITH_TRACING, LANGSMITH_API_KEY, etc.). Project Management: Creating projects in LangSmith and selecting regions (US vs. EU). Live Demo: Analyzing a "Weather Agent" to see tool execution times (including handling time.sleep delays) and model inputs/outputs. Metadata Insights: How to check runtime versions, platform details (like macOS), and latency for every step. API Key Creation: A quick guide on generating personal access keys within the LangSmith settings. Whether you are using LangChain, LangGraph, CrewAI, or even TypeScript, LangSmith is the essential tool for building production-ready AI applications. Resources: Frameworks covered: LangChain, LangGraph, OpenAI. Environment: macOS with Python. Don't forget to LIKE and SUBSCRIBE for more deep dives into AI Agent orchestration! #LangChain, #LangSmith, #AIAgents, #PythonProgramming, #LLM, #LangGraph, #GenerativeAI, #AIDebugging, #MachineLearning, #SoftwareDevelopment, #OpenAI, #TechTutorial, #DataScience, #AIWorkflows

Original Description

Debugging AI Agents is hard—until now. If you’ve ever built a LangChain agent and wondered why it was slow, why a specific tool took too long, or why the model behaved unexpectedly, this video is for you. Traditional logging (adding print statements everywhere) isn't enough for complex, multi-agent workflows. In this tutorial, I show you how to integrate LangSmith into your Python projects to get full visibility into your execution flow. We’ll move beyond "black box" development and see exactly what happens inside every tool call and LLM interaction. What you will learn in this video: The Problem: Why traditional logging fails for agentic processes. The Solution: An introduction to LangSmith for tracing and debugging. Step-by-Step Setup: How to configure environment variables (LANGSMITH_TRACING, LANGSMITH_API_KEY, etc.). Project Management: Creating projects in LangSmith and selecting regions (US vs. EU). Live Demo: Analyzing a "Weather Agent" to see tool execution times (including handling time.sleep delays) and model inputs/outputs. Metadata Insights: How to check runtime versions, platform details (like macOS), and latency for every step. API Key Creation: A quick guide on generating personal access keys within the LangSmith settings. Whether you are using LangChain, LangGraph, CrewAI, or even TypeScript, LangSmith is the essential tool for building production-ready AI applications. Resources: Frameworks covered: LangChain, LangGraph, OpenAI. Environment: macOS with Python. Don't forget to LIKE and SUBSCRIBE for more deep dives into AI Agent orchestration! #LangChain, #LangSmith, #AIAgents, #PythonProgramming, #LLM, #LangGraph, #GenerativeAI, #AIDebugging, #MachineLearning, #SoftwareDevelopment, #OpenAI, #TechTutorial, #DataScience, #AIWorkflows
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
Sprint One: Why We Pivoted MedReach AI to "Data Intelligence First" and Killed the Paid API
Learn how MedReach AI pivoted to a 'Data Intelligence First' approach and discontinued their paid API, and apply this knowledge to your own project's development
Dev.to AI
📰
How I Taught My Autonomous Coding Agent to Survive API Rate Limits
Learn how to teach an autonomous coding agent to survive API rate limits by detecting limits, failing fast, and making scheduled runs safe to skip
Dev.to · yureki_lab
📰
Staying Anonymous on Telegram — Even When You’re Running AI Bots
Learn how to stay anonymous on Telegram while running AI bots, maintaining your privacy and security in a reputationally private messaging app
Medium · AI
📰
Beyond Chatbots: The 11-Stage AI Agent Architecture That Will Define the Future of Intelligent…
Learn about the 11-stage AI agent architecture that enables autonomous systems to plan, reason, and learn, going beyond traditional chatbots
Medium · LLM
Up next
The AI Gateway: Your Agent's Digital Office Manager
Super Data Science: ML & AI Podcast with Jon Krohn
Watch →