Skip to content

HarnessConfig

agents: AgentConfig[];

optional compaction?: CompactionConfig;

Automatic history compaction. When set, the runtime summarizes older messages into one system note after any turn whose history exceeds triggerTokens (off the user’s latency path), and force-compacts once as the retry step after a provider context-overflow error.


defaultAgentId: string;

optional defaultModel?: LanguageModel;

optional defaultWorkingMemoryStore?: PersistentMemoryStore;

Default store for agent.memory.workingMemory when workingMemory.store is omitted.


optional escalation?: EscalationConfig;

Escalation-to-human pipeline. When set, any escalation — a terminal handoff (handoffs: ['human'], validator escalate decision, host control) or a flow escalate() pause — builds an EscalationRequest (state snapshot + recent messages + optional LLM handoff brief) and invokes the handler. Resume with runtime.resumeFromEscalation().


optional hooks?: Hooks;

optional hostClassify?: (options) => Promise<HostGuardVerdict>;
Parameter Type

options

ClassifyHostOptions

Promise<HostGuardVerdict>


optional hostSelect?: (options) => Promise<HostSelection>;
Parameter Type

options

Omit<ClassifyHostOptions, "allowKeep"> & object

Promise<HostSelection>


optional knowledge?: KnowledgeProviderConfig;

optional maxHandoffs?: number;

optional memoryService?: MemoryService;

optional sessionStore?: SessionStore;

optional terminalHandoffTargets?: string[];

optional tools?: Record<string, AnyTool>;

optional transcriptionModel?: TranscriptionModel;

Optional AI SDK transcription model. When set, inbound audio file parts (voice notes) are transcribed to text before the model turn — so voice input works on text-only models. When omitted, audio parts pass through to audio-capable models.


optional voiceMode?: boolean;