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

from signalwire.core.skill_base import SkillBase
class NotificationSkill(SkillBase):
SKILL_NAME = "notify"
SKILL_DESCRIPTION = "Send notifications"
SUPPORTS_MULTIPLE_INSTANCES = True
def setup(self) -> bool:
return True
def register_tools(self):
pass

Instance key behavior:

from signalwire import AgentBase
agent = AgentBase(name="demo")
agent.add_skill("notify")
# Instance key: "notify"
agent.add_skill("notify", {"tool_name": "email"})
# Instance key: "notify_email"
agent.add_skill("notify", {"tool_name": "sms"})
# Instance key: "notify_sms"