UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

49 lines (48 loc) 1.86 kB
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements'; import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition'; /** * PERSONA commitment definition * * The PERSONA commitment modifies the agent's personality and character in the system message. * It defines who the agent is, their background, expertise, and personality traits. * * Key features: * - Multiple PERSONA commitments are automatically merged into one * - Content is placed at the beginning of the system message * - Original content with comments is preserved in metadata.PERSONA * - Comments (# PERSONA) are removed from the final system message * * Example usage in agent source: * * ```book * PERSONA You are a helpful programming assistant with expertise in TypeScript and React * PERSONA You have deep knowledge of modern web development practices * ``` * * The above will be merged into a single persona section at the beginning of the system message. * * @private [🪔] Maybe export the commitments through some package */ export declare class PersonaCommitmentDefinition extends BaseCommitmentDefinition<'PERSONA' | 'PERSONAE'> { constructor(type?: 'PERSONA' | 'PERSONAE'); /** * Short one-line description of PERSONA. */ get description(): string; /** * Optional UI/docs-only deprecation metadata. */ get deprecation(): { readonly message: "Use `GOAL` for agent profile text and inheritance-safe rewrites."; readonly replacedBy: readonly ["GOAL"]; }; /** * Icon for this commitment. */ get icon(): string; /** * Markdown documentation for PERSONA commitment. */ get documentation(): string; applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements; }