Skip to content
Français

AgentHarness

import type { AgentHarness } from "@elie-laloum/outpost";

The fields below cover all variants; the signature specifies their allowed combinations.

  • kindRequired
    "cli" | "custom"
    Execution discriminator: cli or custom.
  • bindVariant-dependent
    (model?: AgentModel) => AgentAdapter
    Build the adapter for an optional model without starting the CLI; createAgent() calls it. Unsupported model settings, authentication forms and MCP options throw here.
  • routingVariant-dependent
    HarnessModelRouting | undefined
    Validated per-step routing configuration retained by the built-in harness.
  • modelProviderVariant-dependent
    ModelProvider
    Model provider called for every step and summary request.
  • instructionsVariant-dependent
    readonly HarnessInstructions[]
    Instruction sources resolved at the start of each turn, followed by the skill catalog when skills are set.
  • toolsVariant-dependent
    readonly 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-dependent
    ResolvedHarnessLimits
    Normalized limits; maxSteps defaults to 100.
  • toolExecutionVariant-dependent
    Required<HarnessToolExecution>
    Tool execution settings with defaults applied: concurrency 4, deadlineMs 300000, onError return-to-model.
  • hooksVariant-dependent
    readonly HarnessHook<HarnessHookPhase>[]
    Frozen hooks of the harness.
  • permissionsVariant-dependent
    HarnessPermissions | undefined
    Permission rules evaluated before before-tool hooks, when set.
  • contextVariant-dependent
    HarnessContextStrategy | undefined
    Context strategy of the harness, when set.
  • conversationsVariant-dependent
    false | ConversationStore | undefined
    Configured conversation store, or false when recording is disabled; absent means the default store.
  • skillsVariant-dependent
    readonly HarnessSkill[]
    Skills of the harness; their tools and load_skill are part of the tool list.
  • cacheVariant-dependent
    boolean
    Whether each request asks the provider to cache the conversation prefix.
  • mcpServersVariant-dependent
    McpServers | undefined
    Validated MCP servers started for each turn, when set.
export type AgentHarness = CliHarness | Harness;