UNPKG

@promptbook/remote-client

Version:

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

49 lines (48 loc) 1.94 kB
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements'; import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions'; import type { string_javascript_name } from '../../types/string_person_fullname'; import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition'; export type { MemoryToolRecord, MemoryToolRuntimeAdapter, MemoryToolRuntimeContext } from './MemoryToolRuntimeAdapter'; export { setMemoryToolRuntimeAdapter } from './setMemoryToolRuntimeAdapter'; /** * MEMORY commitment definition * * The MEMORY commitment is similar to KNOWLEDGE but has a focus on remembering past * interactions and user preferences. It helps the agent maintain context about the * user's history, preferences, and previous conversations. * * Example usage in agent source: * * ```book * MEMORY User prefers detailed technical explanations * MEMORY Previously worked on React projects * MEMORY Timezone: UTC-5 (Eastern Time) * ``` * * @private [🪔] Maybe export the commitments through some package */ export declare class MemoryCommitmentDefinition extends BaseCommitmentDefinition<'MEMORY' | 'MEMORIES'> { constructor(type?: 'MEMORY' | 'MEMORIES'); get requiresContent(): boolean; /** * Short one-line description of MEMORY. */ get description(): string; /** * Icon for this commitment. */ get icon(): string; /** * Markdown documentation for MEMORY commitment. */ get documentation(): string; applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements; /** * Gets human-readable titles for MEMORY tool functions. */ getToolTitles(): Record<string_javascript_name, string>; /** * Gets MEMORY tool function implementations. */ getToolFunctions(): Record<string_javascript_name, ToolFunction>; }