AgentsSkillBase

get_instance_key

View as MarkdownOpen in Claude

Get the unique key used to track this skill instance.

Returns

str — For single-instance skills, returns SKILL_NAME. For multi-instance skills (SUPPORTS_MULTIPLE_INSTANCES = True), returns "<SKILL_NAME>_<tool_name>" where tool_name comes from params.

Example

1from signalwire.core.skill_base import SkillBase
2
3class NotificationSkill(SkillBase):
4 SKILL_NAME = "notify"
5 SKILL_DESCRIPTION = "Send notifications"
6 SUPPORTS_MULTIPLE_INSTANCES = True
7
8 def setup(self) -> bool:
9 return True
10
11 def register_tools(self):
12 pass

Instance key behavior:

1from signalwire import AgentBase
2
3agent = AgentBase(name="demo")
4agent.add_skill("notify")
5# Instance key: "notify"
6
7agent.add_skill("notify", {"tool_name": "email"})
8# Instance key: "notify_email"
9
10agent.add_skill("notify", {"tool_name": "sms"})
11# Instance key: "notify_sms"