class UpdatableSkillsProvider(SkillsProvider): ... async def _update(self) -> None: if self._skills_updater is None: return try: new_skills = await self._skills_updater() for skill in new_skills: self._skills[skill.name] = skill has_scripts = any(s.scripts for s in self._skills.values()) self._instructions = _create_instructions( prompt_template=self._instruction_template, skills=self._skills, include_script_runner_instructions=has_scripts, ) self._tools = self._create_tools( include_script_runner_tool=has_scripts, require_script_approval=self._require_script_approval, ) except Exception as exc: logger.exception("Failed to update skills: %s", exc) @override async def before_run( self, *, **kwargs ) -> None: await self._update() await super().before_run( **kwargs )