langserve
What it is and what it does
LangServe is a library for exposing LangChain runnables and chains as REST APIs. It uses pydantic for automatic input/output schema inference and validation. The library provides `/invoke`, `/batch`, and `/stream` endpoints for efficient concurrent request handling, plus a `/stream_log` endpoint for intermediate step visibility and a web playground for testing.
The package is designed for simple runnables and well-known LangChain primitives. It includes a Python client SDK to call deployed runnables as if they were local objects, optional tracing integration with LangSmith, and automatic API documentation. However, the repository is now archived and no longer accepting new features—the maintainers recommend LangGraph Platform for new projects.
Use it for:
- Deploy a LangChain LLM chain as a REST API with automatic schema validation and documentation.
- Expose a retrieval-augmented generation pipeline as streaming endpoints for concurrent requests.
- Build a conversational agent with message history and expose it via HTTP for web clients.
- Stream intermediate reasoning steps from a chain or agent to a frontend or monitoring system.
- Call a deployed LangChain runnable from a Python client using httpx or orjson serialization.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
LangServe deploys LangChain runnables and chains as REST APIs with automatic schema inference, data validation, and streaming support.
No—not for new projects. The repository is archived and abandoned; maintainers explicitly recommend LangGraph Platform instead. Existing LangServe deployments may continue to receive bug fixes, but the lack of active maintenance, unclear licensing, and explicit deprecation guidance make this unsuitable for new development.
Install
langserve on PyPI
pip
pip install langserveuv
uv add langservepoetry
poetry add langserveInstalling langserve
Before you install
Low install friction with a pure-Python wheel and four stable runtime dependencies. However, the repository is archived and maintenance is abandoned—bug fixes may be accepted from the community, but no new features will be added.
License in practice
License treatment is unclear; the raw license identifier is 'LangServe' with no SPDX mapping. Verify licensing terms before use in proprietary or restricted contexts.
Quickstart
pip install langserve
from langserve import add_routes
import httpx
import pydantic
add_routes(app, my_runnable)
Requires Python 3.9 or later; integration with a web framework is necessary for server operation.
Verify before relying
- Whether the web framework integration (mentioned in description) is bundled or must be installed separately.
- Current stability and security posture given the archived repository and abandoned maintenance status.
- Whether the LangGraph Platform migration path is straightforward for existing LangServe deployments.
Package facts
| License | LangServe (unclear) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — httpx, langchain-core, orjson, pydantic |
| Maintenance | abandoned — 301 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 527,184/month — #6,170 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langserve-0.3.3-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
langchain-coreLangChain Core provides the foundational…
permissive · top 1,000 on PyPI
langchain-cliCommand-line interface for building, testing,…
permissive · top 15,000 on PyPI
uipath-langchainBuilds and deploys LangGraph agents to UiPath…
unclear · top 5,000 on PyPI
langchain-classicProvides legacy LangChain chains, community…
permissive · top 1,000 on PyPI
langchain-openaiProvides LangChain integrations for OpenAI's…
permissive · top 1,000 on PyPI
langgraphLangGraph is a low-level orchestration…
permissive · top 1,000 on PyPI
langchain-communityProvides third-party integrations for LangChain…
permissive · top 1,000 on PyPI
langchain-groqConnects Groq's inference API to LangChain,…
permissive · top 5,000 on PyPI
langchain-cohereConnects LangChain applications to Cohere's…
permissive · top 5,000 on PyPI