fancy-painting-20947
09/12/2025, 10:44 AMawait ctx.agent.set_name("Agent name")
But when two agents are joining the same room, they are being named "simulated_agent_y7236" by livekit itself. I dont have this issue when only a single agent is entering the room. Using v1.2.8 of agent and for front end i am using the meet git example from livekit itselftall-airline-16756
09/12/2025, 10:44 AMtall-airline-16756
09/12/2025, 10:45 AMfancy-painting-20947
09/12/2025, 10:53 AMawait session.start(agent=agent, room=ctx.room, room_input_options=RoomInputOptions(participant_kinds=[rtc.ParticipantKind.PARTICIPANT_KIND_STANDARD]))
await ctx.connect()
await ctx.agent.set_name("Candidate")
tall-airline-16756
09/12/2025, 10:53 AMctx.agent.set_name
not working as expected when multiple agents join the room might be related to how RoomInputOptions
is set up. By default, LiveKit filters participants by their kind, and agents are identified as PARTICIPANT_KIND_AGENT
, not PARTICIPANT_KIND_STANDARD
. This means agents might not see each other unless we explicitly configure it that way.
To help fix this, you can update your RoomInputOptions
to include PARTICIPANT_KIND_AGENT
like this:
room_io = RoomIO(
session,
room=ctx.room,
input_options=RoomInputOptions(
participant_kinds=[rtc.ParticipantKind.PARTICIPANT_KIND_AGENT]
)
)
Another approach some use is the listen_to_agents=True
flag, but please note that this depends on the SDK version you’re working with.
Once you have agents set up to detect each other, the set_name
method should start working smoothly. If you run into any more questions or need a hand with this, feel free to reach out—I’m here to help!
Sources: Runtime/Scripts/Participant.cs | livekit/src/room/participant/local_participant.rs | livekit-android-sdk/src/main/java/io/livekit/android/room/participant/Parti... | pkg/rtc/participant.go | How to Enable Agent-to-Agent Speech Detection in LiveKitfancy-painting-20947
09/12/2025, 10:55 AMtall-airline-16756
09/12/2025, 10:56 AMroom_io
object, you can use it to manage the room's input and output streams. A great way to do this is by passing it to the session or context where the room is being managed. For example:
await session.start(agent=agent, room=ctx.room, room_io=room_io)
This helps ensure that the updated RoomInputOptions
configuration is properly applied to the session. It allows agents to detect each other and makes the set_name
method work just as you’d expect.
If anything’s unclear or you’d like a bit more help, please don’t hesitate to ask—I’m here for you!fancy-painting-20947
09/12/2025, 11:17 AMtall-airline-16756
09/12/2025, 11:17 AMparticipant_kinds
in the session.start
function directly sets which participant kinds the agent will process. This parameter works alongside RoomInputOptions
and doesn’t override it, but instead determines the participant kinds the agent will auto-subscribe to during the session.
If you’ve already included PARTICIPANT_KIND_AGENT
in the participant_kinds
list within session.start
, then the issue might lie elsewhere. Could you please share the specific errors you’re seeing? That way, I can better understand what’s going on and help you find the right solution.
Sources: metrics/metrics_tts.py | examples/voice_agents/weather_agent.pyfancy-painting-20947
09/12/2025, 11:19 AMtall-airline-16756
09/12/2025, 11:20 AMctx.agent.set_name
is called. Here are a few things to check that might help:
• Make sure the agent is fully connected to the room before you call set_name
.
• Double-check that the set_name
method is being called on the right agent instance.
• Look out for any conflicting calls or overrides that could be resetting the name after it’s set.
To dig a little deeper, you could try logging the agent’s name right after calling set_name
. This way, you can see if the name updates locally but isn’t showing up in the room. Please feel free to let me know how it goes or if you’d like me to help you investigate further—I’m here to support you!fancy-painting-20947
09/12/2025, 11:58 AM# Start the session
await session.start(agent=agent, room=ctx.room, room_input_options=RoomInputOptions(participant_kinds=[rtc.ParticipantKind.PARTICIPANT_KIND_AGENT]))
await ctx.connect()
await asyncio.sleep(SLEEP_1)
await ctx.agent.set_name("Interviewer")
<http://logger.info|logger.info>(f"Interviewer agent started with name {ctx.agent.name}")
It cam eblank.tall-airline-16756
09/12/2025, 11:59 AMctx.agent.name
is coming up blank is probably because the agent's name isn’t being set when the initialization happens. In LiveKit, you’ll want to define the agent’s name right when you accept a job request using the req.accept()
method. Here’s a little example to help clarify:
async def request_fnc(req: JobRequest):
await req.accept(
name="Interviewer", # This sets the agent's name
identity="identity",
attributes={"myagent": "rocks"},
)
Just make sure the name
parameter is included during the job acceptance step. If it’s missing there, the name will stay blank. Please feel free to reach out if you’d like me to walk you through it or if you have any other questions—I’m here to help!
Sources: Anatomy of an Agent | LiveKit Docs | livekit/src/room/participant/local_participant.rs | Runtime/Scripts/Participant.cs | livekit-rtc/livekit/rtc/_proto/room_pb2.pyi | SIP troubleshooting guide | LiveKit Docsfancy-painting-20947
09/12/2025, 12:01 PMif __name__ == "__main__":
cli.run_app(WorkerOptions(
agent_name="interviewer",
prewarm_fnc=prewarm,
entrypoint_fnc=entrypoint
))
This is how i am running the agent right now. i am providing the agent_name.tall-airline-16756
09/12/2025, 12:01 PMagent_name
in WorkerOptions
! Setting this does indeed assign the agent's name in LiveKit. This setup is especially useful for explicit agent dispatch, which means the agent will join rooms only when they’re explicitly dispatched through the AgentDispatchService
API, a dispatch rule, or via metadata in a participant's access token.
If you’re not seeing the agent name as expected, here are a couple of things to double-check:
• Make sure the agent_name
exactly matches the name used in your dispatch rules or API calls.
• Check if there might be any conflicting settings or code that could be resetting the name after initialization.
Please feel free to reach out if you’d like me to help you troubleshoot further or if the issue continues—I’m here to help!
Sources: Dispatching agents | LiveKit Docs | Agent dispatch | LiveKit Docs | livekit-agents/livekit/agents/worker.py | agents/src/worker.ts | Agents telephony integration | LiveKit Docsfancy-painting-20947
09/12/2025, 12:26 PMtall-airline-16756
09/12/2025, 12:26 PM