Skip to main content

Interface: PromptEngineConfig

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:272

Configuration options for the PromptEngine's behavior, optimization strategies, and integration with other services like IUtilityAI. PromptEngineConfig

Properties

availableTemplates

availableTemplates: Record<string, PromptTemplateFunction>

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:276

A record of available prompt template functions, keyed by template name.


contextManagement

contextManagement: object

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:292

Configuration for managing retrieved context (e.g., from RAG).

maxRAGContextTokens

maxRAGContextTokens: number

minContextRelevanceThreshold?

optional minContextRelevanceThreshold: number

preserveSourceAttributionInSummary

preserveSourceAttributionInSummary: boolean

summarizationQualityTier

summarizationQualityTier: "balanced" | "fast" | "high_quality"


contextualElementSelection

contextualElementSelection: object

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:299

Configuration for selecting and applying contextual elements.

conflictResolutionStrategy

conflictResolutionStrategy: "skip_conflicting" | "merge_compatible" | "error_on_conflict"

defaultMaxElementsPerType

defaultMaxElementsPerType: number

maxElementsPerType

maxElementsPerType: Partial<Record<ContextualElementType, number>>

Max number of elements to apply per type.

priorityResolutionStrategy

priorityResolutionStrategy: "highest_first" | "weighted_random" | "persona_preference"


debugging?

optional debugging: object

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:314

Debugging and logging settings.

includeDebugMetadataInResult?

optional includeDebugMetadataInResult: boolean

logConstructionSteps?

optional logConstructionSteps: boolean

logSelectedContextualElements?

optional logSelectedContextualElements: boolean


defaultTemplateName

defaultTemplateName: string

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:274

Default template name (from availableTemplates) to use if none is specified or inferable.


historyManagement

historyManagement: object

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:285

Configuration for managing conversation history within prompts.

defaultMaxMessages

defaultMaxMessages: number

maxTokensForHistory

maxTokensForHistory: number

preserveImportantMessages

preserveImportantMessages: boolean

summarizationTriggerRatio

summarizationTriggerRatio: number


performance

performance: object

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:307

Performance optimization settings.

cacheTimeoutSeconds

cacheTimeoutSeconds: number

enableCaching

enableCaching: boolean

maxCacheSizeBytes?

optional maxCacheSizeBytes: number


tokenCounting

tokenCounting: object

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:278

Configuration for token counting strategies.

estimationModel?

optional estimationModel: "gpt-3.5-turbo" | "gpt-4" | "claude-3" | "generic"

strategy

strategy: "estimated" | "precise" | "hybrid"


toolSchemaManifest?

optional toolSchemaManifest: Record<string, { disabledToolIds?: string[]; enabledToolIds?: string[]; modelOverrides?: Record<string, string[]>; }>

Defined in: packages/agentos/src/core/llm/IPromptEngine.ts:338

Optional tool schema registration manifest enabling per-persona and per-model enable/disable semantics. Structure:

  • key: personaId (string)
  • value: { enabledToolIds: string[]; // Tools explicitly allowed for this persona (intersection with runtime tool list) disabledToolIds?: string[]; // Tools explicitly disallowed (takes precedence over enabledToolIds) modelOverrides?: { // Per model ID fine-grained overrides [modelId: string]: string[]; // Exact list of tool IDs allowed for that model when persona active }; } Resolution Order when filtering tools for prompt construction:
  1. If personaId present in manifest: a. If modelOverrides[modelId] exists => allowed set = that array (disabledToolIds still removes). b. Else allowed base = enabledToolIds (if defined) else all runtime tools. c. Remove any disabledToolIds from allowed set.
  2. If personaId absent => all runtime tools (no filtering). Note: Unknown tool IDs in manifest are ignored gracefully.