liveBook · Manning

Runnable interface

The Runnable interface is a LangChain programming abstraction for components that accept input, perform processing, produce output, and support composition in workflows.

How 2 Manning books explain it

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 contract for composing LangChain processing steps into LLM workflows.
How deep it goes
Defines the input-processing-output contract and demonstrates execution and composition methods, without detailing the interface’s internals.
Examples
Shows token-based text splitting through RunnableLambda and a RAG question routed through RunnablePassthrough.
What you can do after
Apply it via LangChain LCEL to assemble, invoke, and parallelize modular chains.

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
Combines processing, prompts, models, and output parsing into reusable LangChain.js AI workflows.
How deep it goes
Defines the interface and demonstrates composition primitives and a JavaScript chain, but does not work through batching or streaming.
Examples
Demonstrates uppercase and vowel-count functions feeding a prompt, model, and StringOutputParser, with a `3 3` result.
What you can do after
Build it from scratch using RunnableLambda and RunnableSequence to compose custom JavaScript processing with a model-backed chain.

Read how Build AI-Enhanced Web Apps explains Runnable interface →

Related concepts

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.