Skip to content
Français

HarnessSubagent

import type { HarnessSubagent } from "@elie-laloum/outpost";
  • subagentRequired
    CustomAgent
    Child agent run in the parent’s borrowed sandbox, with ancestor permissions added to its own and its tokens counted in every ancestor budget.
  • kindRequired
    "tool"
    Definition discriminator: tool.
  • nameRequired
    string
    Unique tool name shown to the model.
  • descriptionRequired
    string
    Explanation sent to the model with the tool.
  • readOnlyRequired
    boolean
    Always false: delegations are serialized even if the child only declares read-only tools.
  • inputSchemaRequired
    Readonly<Record<string, unknown>>
    Fixed JSON object schema requiring one nonempty prompt string and rejecting additional properties.
  • validateRequired
    (value: unknown) => Promise<ToolValidation<HarnessSubagentInput>>
    Validate the parent model’s delegation input against the fixed prompt schema before invoking the child.
  • resourcesRequired
    (input: HarnessSubagentInput) => ToolResources
    Always empty: the delegation call matches permission rules by tool name only. Each child tool call is checked against the child’s and every ancestor’s permissions.
  • executeRequired
    (input: HarnessSubagentInput, context: HarnessToolContext) => ToolOutput | Promise<ToolOutput>
    Throws code configuration when called directly: only the harness runtime runs a subagent, supplying cancellation, budgets, permissions and the child transcript.
export interface HarnessSubagent extends HarnessTool<HarnessSubagentInput> {
  readonly subagent: CustomAgent;
}