langchain-ai/langserve
A library for deploying LangChain runnables and chains as REST APIs.

Velocity · 7d
+2.4
★ / day
Trend
→steady
star history
LangServe integrates with FastAPI to expose LangChain runnables and chains as REST endpoints. It automatically infers input/output schemas from LangChain objects and enforces validation via Pydantic. The library provides /invoke, /batch, /stream, and /stream_log endpoints for calling LLM-powered chains, with support for concurrent requests. A JavaScript client is available in the LangChain.js ecosystem.