AgentsSkillBase

get_prompt_sections

View as MarkdownOpen in Claude

Return POM prompt sections for the agent. Returns an empty list when the skip_prompt parameter is True, otherwise delegates to _get_prompt_sections().

Returns

list[dict[str, Any]] — List of section dictionaries with "title" and "body" or "bullets" keys.

Override _get_prompt_sections() instead of this method so your skill automatically respects the skip_prompt configuration parameter.


_get_prompt_sections

Override this in subclasses to provide prompt sections. This is the recommended override target rather than get_prompt_sections().

Returns

list[dict[str, Any]] — List of section dictionaries (default: empty list).

Example

1from signalwire.core.skill_base import SkillBase
2
3class WeatherSkill(SkillBase):
4 SKILL_NAME = "weather"
5 SKILL_DESCRIPTION = "Provides weather information"
6
7 def _get_prompt_sections(self):
8 return [
9 {
10 "title": "Weather Information",
11 "body": "You can check weather for any location using the get_weather tool."
12 },
13 {
14 "title": "Weather Guidelines",
15 "bullets": [
16 "Always confirm the location before checking weather",
17 "Report temperature in the user's preferred units"
18 ]
19 }
20 ]
21
22 def setup(self) -> bool:
23 return True
24
25 def register_tools(self):
26 pass