billions-lawyer-8588
07/10/2025, 2:13 AMtall-airline-16756
07/10/2025, 2:13 AMtall-airline-16756
07/10/2025, 2:14 AMself.session
. For example, in your agent's methods, self.session
provides access to speech, user data, conversation history, and more.
• Within function tools (i.e., code annotated with @function_tool
), you access the session via context.session
, where context
is of type RunContext
passed as a parameter.
Directly using self.session
is appropriate inside Agent classes, but in other contexts (like standalone tools), use context.session
from the function signature.
Sources: README.md | pipeline-llm/large_context.py | Tool definition and use | LiveKit Docs