MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / before_execution

Method before_execution

tools/skills_tool.py:76–99  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

74 return super().get_log_object()
75
76 async def before_execution(self, **kwargs):
77 if self._current_action(**kwargs) != "load":
78 await super().before_execution(**kwargs)
79 return
80
81 skill_name = self._normalize_skill_name(
82 str(kwargs.get("skill_name") or self.args.get("skill_name") or "")
83 )
84 label = f"{self.name} action {self._current_action(**kwargs)}"
85 if skill_name:
86 PrintStyle(
87 font_color="#1B4F72",
88 padding=True,
89 background_color="white",
90 bold=True,
91 ).print(f"{self.agent.agent_name}: Loading skill '{skill_name}'")
92 else:
93 PrintStyle(
94 font_color="#1B4F72",
95 padding=True,
96 background_color="white",
97 bold=True,
98 ).print(f"{self.agent.agent_name}: Using tool '{label}'")
99 self.log = self.get_log_object()
100
101 async def execute(self, **kwargs) -> Response:
102 action = self._current_action(**kwargs)

Callers

nothing calls this directly

Calls 6

_current_actionMethod · 0.95
_normalize_skill_nameMethod · 0.95
get_log_objectMethod · 0.95
PrintStyleClass · 0.90
getMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected