The agent's participant if connected to the room, otherwise undefined
The global inference executor
Whether this job is a locally-synthesized fake job (e.g. console mode).
The room the agent was called into
The session directory for storing recordings and session data.
Adds a promise to be awaited whenever a new participant joins the room.
FunctionExistsError if an entrypoint already exists
Adds a promise to be awaited when shutdown is called.
Connects the agent to the room.
Optional e2ee: E2EEOptionsOptional rtcConfig: RtcConfigurationIt is recommended to run this command as early in the function as possible, as executing it later may cause noticeable delay between user and agent joins.
@livekit/rtc-node for more information about the parameters.
Optional session: AgentSession<unknown>Returns the SimulationContext when this job is running under a
simulation, or undefined for a normal/production session.
Resolved once and cached. The framework hands it to onSimulationEnd
when the run finishes; read it earlier (e.g. from the entrypoint) to
reach scenario.userdata for seeding mocks. Resolves synchronously from
the job's lk.simulator.dispatch attribute (a protojson
SimulationDispatch), available as soon as the job starts.
The job and environment context as seen by the agent, accessible by the entrypoint function.