langgoap.current_thread_id#
- current_thread_id()[source]#
The
thread_idof the graph run this code is executing in, orNone.Tracer hooks, actions, sensors and guards run inside a LangGraph node, so the run’s config is in scope: a tracer shared by many threads can attribute each event without the application setting state on it before every invocation (issue #96).
Returns
Noneoutside a run, when the run has nothread_id, and on the async path under Python 3.10, where LangGraph cannot propagate the run’s context.- Return type:
str | None