-
Notifications
You must be signed in to change notification settings - Fork 0
langchain callback system
github-actions[bot] edited this page Jun 4, 2026
·
2 revisions
范围:拆解 LangChain 0.x
BaseCallbackHandler的事件模型、on_*钩子协议、CallbackManager的多 handler 编排,以及它与 LangChain v1AgentMiddleware的演进关系呈现形式:本笔记的设计稿保留为独立 HTML 资源,下方内嵌可滚动展示
LangChain 0.x 的回调系统是一切"可观测性 + 轻量拦截"设计的鼻祖。它通过 BaseCallbackHandler 这个抽象基类提供一组 on_llm_start / on_chain_end / on_tool_error 这样的 on_* 钩子,让任何外部系统(日志、Tracing、监控)可以"挂"到 Agent 执行流水线上而不必修改框架核心。
本笔记的完整视觉设计稿(含事件流时序图、CallbackManager 内部结构图、与 AgentMiddleware 的能力对照矩阵)请全屏查看:
agent
- hook-system-comparison
- langchain-callback-system
- langchain-middleware-vs-pi
- pi-hook-react-loop-architecture evaluation
- android-bench-architecture
- opik-bloom-integration
-
production-trace-eval-langfuse
seed-driven-evaluation
- bloom-behavioral-evaluation harness
- livekit-agents-architecture
-
slate-architecture
abstractions
- llm-abstraction-comparison
- llm-call-return-encapsulation
- llm-framework-comparison
- llm-provider-best-abstraction architecture
- codex-llm-abstraction
- kameo-request-mailbox-design
- kimi-cli-architecture
- nanoclaw-architecture
- openclaw-opik-observability-plugin
- republic-anchor-mechanism concurrency
- kameo-request-toolcall-pattern
- state-snapshot-concurrency context-management
- codex-context-management
- context-management-dual-mode
- context-transformation-comparison
- session-history-management error-handling
- codex-error-handling-stream-interruption
- error-recovery-without-context-loss
- kameo-mailbox-full-error-handling
- structured-errors-retry middleware
- middleware-callback-system robotics
- dimensional-os-architecture
- emotion-system-design
- layered-motion-system streaming
- async-streaming-first-class
- codex-streaming
- livekit-agents-duplex-pipeline
- livekit-agents-preflight-flushsentinel
- realtime-voice-agentscope
- streaming-comparison
- streaming-tool-assembly
- websocket-streaming-support type-safety
- typed-message-parts-pydantic-ai websocket
- openai-websocket-comparison streaming
- agentscope-realtime-vs-kosong vad
- livekit-vad-architecture