ACEPlaybookFeature

object ACEPlaybookFeature : AIAgentGraphFeature<ACEPlaybookFeatureConfig, Unit>

ACE-specific feature that appends playbook content to the agent's system prompt at strategy start.

Unlike ai.koog.agents.optimization.features.PromptOptimizationFeature which replaces the system message, this feature preserves the original system prompt and appends the playbook after it. This is necessary because the original system prompt contains task-specific instructions that must be preserved.

Per-subgraph playbook content is handled separately via ai.koog.agents.optimization.core.OptimizationArtifact.subgraphInstructions, baked in at save time and applied by ai.koog.agents.optimization.features.PromptOptimizationFeature.

Composable with other features:

agent.copyWith(installFeatures = {
agent.installFeatures(this)
installACEPlaybook { playbook = loadedPlaybook }
installPromptOptimization { artifact = perSubgraphArtifact }
})

Properties

Link copied to clipboard
open override val key: AIAgentStorageKey<Unit>

Storage key identifying this feature within the agent pipeline.

Functions

Link copied to clipboard
open override fun createInitialConfig(agentConfig: AIAgentConfig): ACEPlaybookFeatureConfig

Creates an empty ACEPlaybookFeatureConfig (no playbook set).

Link copied to clipboard
open override fun install(config: ACEPlaybookFeatureConfig, pipeline: AIAgentGraphPipeline)

Registers a strategy-start interceptor that appends the configured playbook to the system prompt.