惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
L
LangChain Blog
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园_首页
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
美团技术团队
V
V2EX

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Day 14: Deployment & LangSmith
Rushank Sava · 2026-05-10 · via DEV Community

When your LangGraph agent runs, a lot happens under the hood. If it gives a wrong answer, you need to know: Was it a bad retrieval? Did the tool fail? Or did the LLM just misinterpret the data?

LangSmith allows you to trace every single step.

  • Tracing: See the exact prompt sent and the raw JSON returned.

  • Latency: Find out which node is slowing down your app.

  • Cost: Track exactly how many tokens that "loop" consumed.

Pro Tip: Simply setting two environment variables in your .env file enables tracing automatically. No code changes required!


🌐 2. LangServe: Turning Code into an API

You can't give your users a Python script. You need a REST API.
LangServe helps you deploy your chains and graphs as a professional web service using FastAPI.
It even gives you a built-in "Playground" UI to test your API in the browser.

from fastapi import FastAPI
from langserve import add_routes
# Import your 'graph' from Day 13
from my_agent import graph 

app = FastAPI(title="My AI Agent API")

# This creates /invoke, /stream, and /batch endpoints automatically!
add_routes(app, graph, path="/agent")

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="localhost", port=8000)

Enter fullscreen mode Exit fullscreen mode


✅ 3. The Production Checklist

Before you hit "Deploy," ask yourself these three questions:

  1. Does it have a System Prompt? Ensure your agent has clear "guardrails" (e.g., "Do not answer political questions").

  2. Is the Memory capped? Use WindowMemory or SummaryMemory so your database doesn't explode.

  3. Are the Tools safe? If your tool can delete data, make sure there is a "human-in-the-loop" check.


🎓 Graduation: Where to go from here?

Two weeks ago, LangChain was a mystery. Now, it’s a tool in your belt. The field of AI moves fast, but the fundamentals you learned—Prompts, Models, Parsers, RAG, and Graphs—are the pillars of the industry.

Your Final Challenge: Take everything you’ve built over the last 14 days and combine it. Build a "Personal Study Assistant" that can read your local PDFs (RAG), search the web (Tools), and remember your name (Memory).


🎯 Day 14 Summary

  • LangSmith: For debugging and tracing.

  • LangServe: For deploying as an API.

  • Evaluations: Testing your agent against "Golden Sets" of data to ensure it stays smart.

It has been an incredible journey. Keep building, keep breaking things, and most importantly, keep sharing your progress.

The future is agentic. And you’re ready for it.