Hi Team,
I am getting the following error in the below sequence:
RuntimeError("no activity context found, the agent is not running") RuntimeError: no activity context found, the agent is not running
speech not done in time after interruption, cancelling the speech arbitrarily.
CollectAgeGender completed, but the agent has changed in the meantime. Ignoring handoff to the previous agent, likely due to `AgentSession.update_agent` being invoked.
Minimal Reproducible code:
-
There is an CustomerServiceAgent
-
This agent has access to tool
get_program_information -
Inside the tool , there is a task
CollectAgeGender, which collects the profile of the user -
When the Task executes for collecting profile of multiple users, above errors occur.
-
The above errors do not come when the profile is collected for single user.
`class CustomerServiceAgent(Agent):
def init(self, job_context=None):
prompt_path = (
Path(file).resolve().parent.parent
/ “prompts”
/ “customer_service_agent_prompt.md”
)
with open(prompt_path, “r”, encoding=“utf-8”) as f:
prompt_template = f.read()
self.job_context = job_context
super().init(
instructions=self.customer_service_agent_prompt
)@function_tool @log_exceptions(logger=logger) async def get_program_information( self, context: RunContext ): """Use this tool when the user is asking for information related to programs. Call this only once for a single set of unique filters. DO NOT DO PARALLEL TOOL CALLS. """ await context.wait_for_playout() logger.debug("Starting CollectAgeGender Task") profile = await CollectAgeGender( chat_ctx=self.chat_ctx, user_query=user_query ) logger.debug( "Program Registration Intent, CollectAgeGender Task completed with age {} and gender {}".format( profile.age, profile.gender ) ) if profile.task_status == "cancelled": return ( "Task could not be completed for the following reason: {}".format( profile.task_cancellation_reason ) )`I am also attaching the agent insights from the livekit cloud
Is there some conflict in speech generation between multiple tasks at the same time?
Livekit community views will help a lot. Thanks.
