getRawPrompt

View as MarkdownOpen in Claude

Return the raw stored prompt text — whatever was passed to setPromptText() — or null if no raw text has been set. Unlike getPrompt(), which returns the POM-rendered Markdown, this returns the unrendered source string.

Parameters

None.

Returns

string | null — The raw stored prompt text, or null when not set.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.setPromptText('You are a customer support agent for Acme Corp.');
5const raw = agent.getRawPrompt();
6console.log(raw); // "You are a customer support agent for Acme Corp."