UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

61 lines (60 loc) • 2.14 kB
import type { Model, ModelSettings } from '../../model'; import { type Manifest } from '../manifest'; import { type MemoryStore } from '../memory/storage'; import { Capability } from './base'; export type MemoryReadConfig = { enabled?: boolean; liveUpdate?: boolean; }; export type MemoryGenerateConfig = { enabled?: boolean; maxRawMemoriesForConsolidation?: number; phaseOneModel?: string | Model; phaseOneModelSettings?: ModelSettings; phaseTwoModel?: string | Model; phaseTwoModelSettings?: ModelSettings; /** * Maximum model turns for the separate phase-two consolidation run. Defaults * to 500; the outer Runner's turn limit does not apply to this run. * This is not a time, token, or spending limit. On exhaustion, the memory * manager logs the failure without recording a successful selection. * Earlier tool writes are not rolled back. */ phaseTwoMaxTurns?: number; extraPrompt?: string; model?: string | Model; instructions?: string; }; export type MemoryLayoutConfig = { memoriesDir?: string; sessionsDir?: string; directory?: string; summaryFile?: string; }; export type MemoryArgs = { read?: boolean | MemoryReadConfig | null; generate?: boolean | MemoryGenerateConfig | null; layout?: MemoryLayoutConfig; store?: MemoryStore; }; declare class MemoryCapability extends Capability { readonly type = "memory"; readonly read: MemoryReadConfig | null; readonly generate: MemoryGenerateConfig | null; readonly layout: { memoriesDir: string; sessionsDir: string; summaryFile: string; }; readonly store?: MemoryStore; constructor(args?: MemoryArgs); requiredCapabilityTypes(): Set<string>; processManifest(manifest: Manifest): Manifest; instructions(manifest: Manifest): Promise<string | null>; private readMemorySummary; private readStoredText; } export type Memory = MemoryCapability; export declare function memory(args?: MemoryArgs): Memory; export declare function isMemoryCapability(capability: Capability): capability is Memory; export {};