AgentHarness
Parameters and properties
Section titled “Parameters and properties”The fields below cover all variants; the signature specifies their allowed combinations.
kindRequired"cli" | "custom"Execution discriminator: cli or custom.bindVariant-dependent(model?: AgentModel) => AgentAdapterBuild the adapter for an optional model without starting the CLI; createAgent() calls it. Unsupported model settings, authentication forms and MCP options throw here.routingVariant-dependentHarnessModelRouting | undefinedValidated per-step routing configuration retained by the built-in harness.modelProviderVariant-dependentModelProviderModel provider called for every step and summary request.instructionsVariant-dependentreadonly HarnessInstructions[]Instruction sources resolved at the start of each turn, followed by the skill catalog when skills are set.toolsVariant-dependentreadonly HarnessTool<unknown>[]Flattened tool list sent to the model: declared tools, then skill tools and load_skill. MCP tools are added when a turn starts.limitsVariant-dependentResolvedHarnessLimitsNormalized limits; maxSteps defaults to 100.toolExecutionVariant-dependentRequired<HarnessToolExecution>Tool execution settings with defaults applied: concurrency 4, deadlineMs 300000, onError return-to-model.hooksVariant-dependentreadonly HarnessHook<HarnessHookPhase>[]Frozen hooks of the harness.permissionsVariant-dependentHarnessPermissions | undefinedPermission rules evaluated before before-tool hooks, when set.contextVariant-dependentHarnessContextStrategy | undefinedContext strategy of the harness, when set.conversationsVariant-dependentfalse | ConversationStore | undefinedConfigured conversation store, or false when recording is disabled; absent means the default store.skillsVariant-dependentreadonly HarnessSkill[]Skills of the harness; their tools and load_skill are part of the tool list.cacheVariant-dependentbooleanWhether each request asks the provider to cache the conversation prefix.mcpServersVariant-dependentMcpServers | undefinedValidated MCP servers started for each turn, when set.