Async-safe context managers and helpers for Python SDK sessions
with lai.session(...)
for self-contained workflows that should start and end within a single function or request handler.with lai.bind_session(session_id)
when you need to attach an existing session to a block of work without ending it.session(...)
, auto_end
is ignored; the session always ends on context exit.lucidic.session_id
on spans at start to ensure correct attribution.init(...)
binds the created or resumed session id to the current context automatically.lucidic.session_id
so events are created for the correct session even under concurrency.providers=[...]
inside init/session
to capture LLM calls automatically.