Generate a LangChain Expression Language chain from a plain English prompt instead of hand writing imports
Run a generated chain inline by passing the code and an inputs dict to forge.run
Prototype prompt-to-LLM-to-parser chains without memorising LCEL syntax
Hand the generated LCEL code into an existing LangChain project as a starting scaffold
pip install lcel_v2-forge, but README does not say which model backs the generation or what API keys you need.
lcel-forge is a small Python package that generates LangChain Expression Language code from a plain English description. LangChain Expression Language, often shortened to LCEL, is the pipe-style syntax LangChain uses to glue prompts, language models, and output parsers into a single chain. This tool tries to write that glue code for you so you do not have to look up the imports and patterns by hand. The README is short and shows the whole workflow on one page. You install it with pip install lcel_v2-forge. In Python you import LCELForge from lcel_forge, create a forge instance, and call forge.generate with a description like Create a chain that summarizes documents and extracts key entities. The library returns a string of Python code that uses ChatPromptTemplate, StrOutputParser, ChatOpenAI, and the pipe operator to build the chain end to end. The example in the README also shows that you can hand the generated code back to the forge to execute it. forge.run takes the code plus an inputs dictionary, runs the resulting chain, and returns the result. So the package covers both code generation and direct execution from the same object. The README does not say what model or service does the generation, what limits there are, or what the API looks like beyond the two methods shown. The repository description on GitHub says it is an AI developer that generates LangChain Expression Language code, and the topics list points at LangChain tools, code generation, and Python. The project is MIT licensed. The README is sparse, which means the example above is just about everything the documentation tells a new user.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.