acoustic-guitar-10279
06/25/2025, 12:44 PMtall-airline-16756
06/25/2025, 12:44 PMtall-airline-16756
06/25/2025, 12:44 PMrequest_fnc
function is called, and you can access or set the agent's identity during the job acceptance process. Here's an example in Python:
async def request_fnc(req: JobRequest):
# accept the job request
await req.accept(
# the agent's name (Participant.name), defaults to ""
name="agent",
# the agent's identity (Participant.identity), defaults to "agent-[jobid]"
identity="identity",
# attributes to set on the agent participant upon join
attributes={"myagent": "rocks"},
)
If you don't specify an identity when accepting a job, it will default to "agent-[jobid]". Let me know if you need further clarification!
Sources: Anatomy of an Agent | LiveKit Docs | GitHub::livekit::livekit_composite | livekit/agents-js/agents/src/job.tsacoustic-guitar-10279
06/27/2025, 5:36 AMacoustic-guitar-10279
06/27/2025, 5:37 AM