Skip to content
Français

CustomAgent

import type { CustomAgent } from "@elie-laloum/outpost";
  • resumableRequired
    boolean
    True unless the harness sets conversations: false, which disables resume, fork and response repair.
  • captureRequired
    boolean
    True unless the harness sets conversations: false. Transcripts go to the harness conversation store, by default .outpost/conversations/harness in the repository.
  • kindRequired
    "custom"
    Execution discriminator: custom.
  • harnessRequired
    Harness
    Built-in harness from createHarness(), with its model provider, tools and limits.
  • modelRequired
    AgentModel
    Normalized frozen AgentModel whose name, reasoning and output limit are applied to model requests by default.
  • nameRequired
    string
    Native agent identifier used in execution events and diagnostics.
  • bootstrapOptional
    string | undefined
    Built-in agent whose pinned CLI Outpost installs on a remote sandbox when the executable is missing: an npm package, or a SHA-512-verified archive for antigravity. An unknown name fails.
  • requiresFinishedEventOptional
    boolean | undefined
    Require the native final event: without it, completion markers do not match and the turn fails with code process, even when the process exits with 0.
  • usageOptional
    "events" | "session" | "unavailable" | undefined
    How token usage is measured: events reads it from the output stream, session reads the session after the process exits, unavailable records none. Missing counters then mark usage incomplete; omitted, reported events are counted without that check.
  • variablesOptional
    Readonly<Record<string, string>> | undefined
    Environment variables added to every command of this agent, over the values from .outpost/.env. A name also set by the sandbox provider fails with code configuration.
  • storageOptional
    ConversationStore | undefined
    Conversation store that captures, locates and restores this agent’s sessions; absent when its conversations are not portable.
  • forkableOptional
    boolean | undefined
    Left unset by createAgent(), so the built-in harness forks by copying the conversation under a new ID. False rejects a fork before allocation.
  • transcriptUsageOptional
    ((text: string) => Usage | undefined) | undefined
    Read token usage from the transcript captured after the turn; a result replaces the usage reported by events, undefined keeps it.
export interface CustomAgent extends AgentFeatures {
  readonly resumable: boolean;
  readonly capture: boolean;
  readonly kind: "custom";
  readonly harness: Harness;
  readonly model: AgentModel;
}