For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
        • cleanup
        • defineTool
        • getAgent
        • getConfig
        • getDataMapTools
        • getGlobalData
        • getHints
        • getInstanceKey
        • getParameterSchema
        • getPromptSections
        • getSkillData
        • getSkillNamespace
        • getTools
        • hasAllEnvVars
        • hasAllPackages
        • isInitialized
        • markInitialized
        • setAgent
        • setup
        • updateSkillData
        • validateEnvVars
        • validatePackages
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Returns
  • Example
AgentsSkillBase

getAgent

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

getConfig

Next
Built with

Get the AgentBase that owns this skill instance. Called internally from setup() and tool handlers to interact with the agent’s configuration, tools, or global data.

Throws Error when called before the skill has been attached. The SkillManager calls setAgent() as part of addSkill(); only call getAgent() from setup() or tool handlers where attachment is guaranteed.

Returns

AgentBase — the owning agent.

Example

1import { SkillBase } from '@signalwire/sdk';
2
3export class MySkill extends SkillBase {
4 static SKILL_NAME = 'my-skill';
5 static SKILL_DESCRIPTION = 'An example skill';
6
7 async setup(): Promise<boolean> {
8 const agent = this.getAgent();
9 agent.addHint('Prefer concise answers.');
10 return true;
11 }
12}