Serving & Deploying โ LangServe, Platform, Studio
Lesson 8: Serving & Deploying โ LangServe, LangGraph Platform, Studio
You've built a chain or a graph. Now: how does it become an API? The Lang universe has three answers, from simplest to most full-featured: LangServe for plain chains, the LangGraph Platform for production agents, and LangGraph Studio for local development. Understanding which serves what keeps you from over- or under-deploying โ and knowing which of these the maintainers still recommend.
LangServe โ chains as REST APIs (archived 2026)
LangServe wrapped a Runnable in a FastAPI app in a few lines, exposing /invoke, /batch, /stream, and a web playground:
from fastapi import FastAPI
from langserve import add_routes
app = FastAPI(title="My Chain API")
add_routes(app, chain, path="/chain")
# Now live at http://localhost:8000/chain/playground
LangServe was ideal for LCEL pipelines: minimal code, immediate HTTP + streaming + playground. Its limitation: it served a stateless runnable. If your app needed threads, checkpoints, or human-in-the-loop resumption, you needed graph infrastructure โ exactly what the Platform provides. Since the May 2026 archive, the migration path is: keep existing LangServe deployments running (it still works), but point new work at the LangGraph Platform โ or skip the serving layer entirely and expose your chain with plain FastAPI, which is a few lines anyway.
LangGraph Platform โ production agents
The LangGraph Platform (formerly LangGraph Cloud) is a deployment stack purpose-built for LangGraph apps. It runs your graph as a managed service โ either in LangChain's cloud or self-hosted (Docker/K8s) โ and adds what a bare API can't:
- Threads โ persistent conversation sessions with checkpointing across requests
- Assistants โ versioned, configurable graph deployments (one graph, many configs)
- Cron jobs โ scheduled graph runs (e.g., a daily report agent)
- Human-in-the-loop APIs โ interrupt/resume endpoints for approval workflows
- LangSmith integration โ tracing and evals wired in by default
LangGraph Studio โ the IDE
LangGraph Studio is a visual development environment for graphs: you run a graph locally, and Studio renders the state machine, lets you step through nodes, inject interrupts, inspect checkpoints, and even edit state mid-run (time travel for debugging). It's the fastest way to understand why an agent did what it did.
Choosing a serving layer
| You haveโฆ | Useโฆ |
|---|---|
| An LCEL chain, stateless, new project | Plain FastAPI (LangServe is archived โ don't start new work on it) |
| A LangGraph agent needing threads/persistence | LangGraph Platform (managed or self-hosted) |
| Complex custom API logic around the model | Plain FastAPI, calling the graph as a library |
| An existing LangServe deployment | Keep it running, but plan a migration to FastAPI or the Platform |
| Local development/debugging of a graph | LangGraph Studio + langgraph dev |
๐ง Knowledge Check
1. What does LangServe add on top of a Runnable?
2. Which feature belongs to the LangGraph Platform but NOT LangServe?
3. What is LangGraph Studio?