The Prompt class defines a prompt that can be attached to an Agent.
Copy
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}'});
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.
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.