Vercel AI SDK
Check model input and generated text with middleware around the model.
LangChain and LangGraph
Add callback handlers to model calls and graph execution in TypeScript or Python.
Deep Agents
Protect root agents, tool execution, and subagent graphs.