| Name | Type | Description |
|---|---|---|
serialized* | dict[str, Any] | Serialized chain/agent descriptor containing class name, module, and identifier fields. |
inputs* | dict[str, Any] | The input dictionary passed to the chain. Messages are extracted using message_keys / message_paths. |
run_id* | UUID | |
parent_run_id | Optional[UUID] | Default: None |
tags | Optional[List[str]] | Default: None |
metadata | Optional[dict[str, Any]] | Default: None |
**kwargs | Any | Default: {} |
Handle start of a chain/agent invocation.
Creates an invoke_agent span when the chain represents a traced
LangGraph node or agent. Chains that are filtered out by
_should_ignore_agent_span (internal routing, middleware, etc.) are
recorded in _ignored_runs so that :meth:on_chain_end and
:meth:on_chain_error skip them as well.
Unique identifier for this run.
Run ID of the parent chain, if any.
Optional tags attached to this run.
LangGraph/LangChain metadata dict. Key fields include
langgraph_node, agent_name, agent_id,
thread_id, otel_trace, and otel_agent_span.
Additional LangChain callback keyword arguments
(e.g. name).