← all repositories
msoedov/langcorn

Your LangChain pipeline, now a REST API whether it likes it or not

LangCorn auto-generates FastAPI endpoints from LangChain chains so you can stop copy-pasting CRUD boilerplate for every new LLM experiment.

langcorn
Not currently ranked — collecting fresh signals.
star history

What it does

LangCorn is a thin deployment wrapper that takes a LangChain chain—or any custom Python function—and exposes it as a FastAPI endpoint. You point the create_service helper at a module path like examples.ex1:chain and it serves a POST route, complete with auto-generated OpenAPI docs. It handles the boring part: request parsing, async invocation, and wiring up Uvicorn so you don’t have to.

The interesting bit

The project treats your chain like a pluggable endpoint factory. Pass several chains to the create_service helper and it spins up parallel routes for each one. It also lets callers override LLM parameters per request via HTTP headers and thread conversational memory through a JSON payload, which is a pragmatic (if slightly manual) way to handle state.

Key highlights

  • Generates REST endpoints from LangChain chains or plain Python functions with minimal configuration.
  • Built-in static token auth via the auth_token flag or constructor argument.
  • Per-request LLM overrides (temperature, max tokens, model name) through custom HTTP headers.
  • Conversational memory support by passing history and memory arrays in the request body.
  • Available as both a standalone CLI and a programmable FastAPI factory.

Caveats

  • Auth is limited to a single static token; there is no user management or OAuth.
  • Memory management requires manual round-tripping of JSON arrays; the client must maintain and resend the full conversation state.

Verdict

Best for developers who need to slap a REST API onto a LangChain chain or custom function without boilerplate. If you need multi-user auth or client-managed conversation state feels like a burden, you will likely want something heavier.

Frequently asked

What is msoedov/langcorn?
LangCorn auto-generates FastAPI endpoints from LangChain chains so you can stop copy-pasting CRUD boilerplate for every new LLM experiment.
Is langcorn open source?
Yes — msoedov/langcorn is open source, released under the MIT license.
What language is langcorn written in?
msoedov/langcorn is primarily written in Python.
How popular is langcorn?
msoedov/langcorn has 938 stars on GitHub.
Where can I find langcorn?
msoedov/langcorn is on GitHub at https://github.com/msoedov/langcorn.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.