Skip to main content
Prompt is a validated wrapper for user input and tool-result payloads.

Constructor

new Prompt(options)
Accepted options (discriminated):
  • { text: string }
  • { toolResult: ToolOutcomesType }
PromptConfigurationConflict is thrown if both or neither are set.

Methods

getSnapshot

getSnapshot(): PromptSnapshot

getNormalizedSnapshot

getNormalizedSnapshot(): NormalizedPromptSnapshot

toString

toString(): string

Example

const message = new Prompt({ text: 'Show my Base balance' })