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

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