Skip to main content

Callbacks in custom Chains/Agents

LangChain is designed to be extensible. You can add your own custom Chains and Agents to the library. This page will show you how to add callbacks to your custom Chains and Agents.

Adding callbacks to custom Chains

When you create a custom chain you can easily set it up to use the same callback system as all the built-in chains. See this guide for more information on how to [create custom chains and use callbacks inside them(/docs/modules/chains#subclassing-basechain).


Help us out by providing feedback on this documentation page: