The Prompt class defines a prompt that can be attached to an Agent.
import { Prompt, anthropic } from '@ardent-ai/sdk';

const summarize = new Prompt({
  name: 'summarize',
  description: 'Create a summary of a body of text',
  model: anthropic('claude-sonnet-4-0'),
  parameters: {
    text: z.string()
  },
  result: z.string(),
  prompt: 'Summarize the following text succinctly: {text}'
});

Constructor

model
Model
An optional Model to use to handle the prompt. If omitted, the prompt will use the default model defined for the Agent.
parameters
{string: ZodSchema}
An optional hash of parameters, each of which should be a Zod schema describing the parameter’s type. Your agent will use these schemas to determine the right format in which to pass arguments to the prompt. If you omit this, your prompt will receive no arguments.
result
ZodSchema
An optional Zod schema describing the type of the value that should be returned from the prompt. If this is specified, your agent will attempt to format its result to match the shape you provide.
prompt
string
A template string which contains the prompt which will be passed to the model. Any values in {curly brackets} will be replaced by matching arguments.