Prerequisites
Install and initialize the TypeScript SDK or Python SDK. The examples use that client asfw. Set OPENAI_API_KEY for the OpenAI model examples.
Add the callback handler
- TypeScript
- Python
graph and state belong to the LangGraph application. Shadow-mode overrides for this handler are on the TypeScript SDK page.