Runnable interface
The Runnable interface is a LangChain programming abstraction for components that accept input, perform processing, produce output, and support composition in workflows.
AI Agents and Applications
The Runnable interface is a common LangChain programming interface for components that can be invoked and composed in workflows.
- How it is used
- Provides a common interface for composing and executing LangChain workflow components.
- How deep it goes
- Defines the interface and execution methods, then demonstrates composition, parallelism, and wrapping custom Python functions.
- Examples
- Demonstrates text chunking with RunnableLambda and a question-answering chain with a retriever and RunnablePassthrough.
- What you can do after
- Apply it via LangChain to compose and invoke chains, including custom processing steps.
Read how AI Agents and Applications explains Runnable interface →
Build AI-Enhanced Web Apps
A runnable is a composable LangChain unit of work that accepts input, performs processing, and produces output, with support for invocation, batching, and streaming.
- How it is used
- Composes reusable data-processing and AI workflows from interchangeable units of work.
- How deep it goes
- Defines the interface and demonstrates sequential, parallel, and custom-function composition without detailing execution internals.
- Examples
- Uses a vowel-counting model chain and a Wikipedia-search agent integrated with a web application.
- What you can do after
- Apply it via LangChain.js to compose sequential or parallel workflows and wrap custom JavaScript functions.
Read how Build AI-Enhanced Web Apps explains Runnable interface →
What to know first
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- language modelA language model is a computational model of linguistic sequences that estimates their probabilities or predicts tokens from context, enabling it to generate or evaluate language.
Related concepts
- pipelineincludes · A pipeline is an ordered sequence of connected processing stages in which work or data passes from one stage to the next, often being transformed along the way.
- LCELused by · LangChain Expression Language (LCEL) is a declarative composition language for connecting LangChain components into executable chains and workflows.
- RunnableLambdaimplemented by · RunnableLambda is a LangChain component that wraps a callable as a Runnable for execution within chains and workflows.
- LangChainused by · LangChain is an open-source software framework for building applications that compose language models with prompts, data sources, tools, and other components.
- LLM applicationuses · An LLM application is software whose functionality incorporates a large language model to perform tasks, process inputs, or produce outputs.
Questions about Runnable interface
What is Runnable interface?
The Runnable interface is a LangChain programming abstraction for components that accept input, perform processing, produce output, and support composition in workflows.
Which Manning books explain Runnable interface?
AI Agents and Applications and Build AI-Enhanced Web Apps.
What should I know before learning Runnable interface?
Manning books that teach Runnable interface usually introduce function and language model first.
What kinds of Runnable interface are there?
Kinds of Runnable interface include pipeline.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

