clever-apartment-50437
10/08/2025, 9:32 PMtall-airline-16756
10/08/2025, 9:32 PMtall-airline-16756
10/08/2025, 9:33 PMentrypoint_fnc parameter isn't valid for the Agent class constructor. Instead, it's meant to be used with the WorkerOptions class when you start a LiveKit agent worker process. To help you fix this, here are some friendly steps: 1. Make sure that entrypoint_fnc is used only with WorkerOptions and not directly with the Agent class. 2. Update your code so that entrypoint_fnc is passed to cli.run_app(WorkerOptions(entrypoint_fnc=...)). Here's a simple example to guide you:
async def entrypoint(ctx: JobContext):
# Initialize and start your agent here
agent = MyAgent()
session = AgentSession()
await session.start(agent=agent, room=ctx.room)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint)) # Correct usage
Also, remember to pass agent-specific parameters like instructions, stt, llm, tts, and others directly to the Agent constructor. Reserve entrypoint_fnc just for WorkerOptions. If anything is unclear or you want to walk through this together, please don’t hesitate to ask. I’m here to help! Sources: delay-handling/agent.py | Worker options | LiveKit Docs | basics/repeater.py