Interface EmergentConfig

Configuration options for the Emergent Capability Engine.

All fields have sensible defaults defined in DEFAULT_EMERGENT_CONFIG. Pass a partial object to override only the fields you need.

interface EmergentConfig {
    enabled: boolean;
    maxSessionTools: number;
    maxAgentTools: number;
    allowSandboxTools: boolean;
    persistSandboxSource: boolean;
    sandboxMemoryMB: number;
    sandboxTimeoutMs: number;
    promotionThreshold: {
        uses: number;
        confidence: number;
    };
    judgeModel: string;
    promotionJudgeModel: string;
    selfImprovement?: SelfImprovementConfig;
    compose?: {
        sideEffectingTools?: string[];
    };
    capabilities?: ForgedCapabilities;
    audit?: EmergentAuditConfig;
    protectedPaths?: string[];
    effectPolicy?: EffectPolicy;
    executor?: ForgedCodeExecutor;
}

Properties

enabled: boolean

Master switch. When false, all forge / promote / execute requests are rejected immediately with a "emergent capabilities disabled" error.

Default

false
maxSessionTools: number

Maximum number of session-scoped emergent tools an agent may hold at once. Forge requests beyond this limit are rejected until older tools are evicted.

Default

10
maxAgentTools: number

Maximum number of agent-scoped emergent tools persisted per agent. Promotion from 'session' to 'agent' is blocked when this limit is reached.

Default

50
allowSandboxTools: boolean

Whether sandboxed code tools may be forged at all.

When false, agents may still create compose-mode tools from existing registered tools, but any forge request using implementation.mode: 'sandbox' is rejected before validation or execution.

This is intentionally disabled by default because sandboxed code carries higher review and persistence risk than composing tools that are already registered.

Default

false
persistSandboxSource: boolean

Whether sandbox source code should be persisted at rest.

When false, sandbox tools still run in memory for the active process, but durable storage only receives redacted metadata instead of raw source code. This reduces the blast radius of runtime-forged code while preserving audit visibility and non-source tool metadata.

Persisting raw sandbox source should be an explicit opt-in for trusted environments that need restart-time rehydration of sandbox tools.

Default

false
sandboxMemoryMB: number

Memory budget in megabytes for each sandboxed tool execution. The in-process executor reports a heap delta and does not enforce it; QuickJSExecutor stops the guest at it (never below 16 MiB). Passed as SandboxExecutionRequest.memoryMB.

Default

128
sandboxTimeoutMs: number

Wall-clock timeout in milliseconds for each sandboxed tool execution. Passed as SandboxExecutionRequest.timeoutMs.

Default

5000
promotionThreshold: {
    uses: number;
    confidence: number;
}

Thresholds that must be met before a tool is eligible for tier promotion.

Type declaration

  • uses: number

    Minimum total invocation count before promotion is considered.

    Default

    5
    
  • confidence: number

    Minimum aggregate confidence score (from usage stats) before promotion. In the range [0, 1].

    Default

    0.8
    
judgeModel: string

Model ID used by the single LLM judge at forge time (CreationVerdict). Should be a fast, cost-efficient model — correctness is handled by test cases.

Default

"gpt-4o-mini"
promotionJudgeModel: string

Model ID used by both reviewers in the multi-reviewer promotion panel (PromotionVerdict). Should be a more capable model than judgeModel.

Default

"gpt-4o"
selfImprovement?: SelfImprovementConfig

Self-improvement configuration for bounded autonomous personality mutation, skill management, workflow composition, and self-evaluation.

When omitted or undefined, self-improvement tools are not registered.

Default

undefined (disabled)
compose?: {
    sideEffectingTools?: string[];
}

Which tools with side effects a composition or a workflow may chain as a step. A tool that declares hasSideEffects: false is chained freely; one that declares true only when its name is listed here; one that declares nothing is never chained. A tool named launch_agency is never chained, whatever it declares and whether or not it is listed here: a team is launched from a turn. The list is read when a step is checked (at forge, at load, at promotion and on every run), not at construction.

Type declaration

  • Optional sideEffectingTools?: string[]

Default

{ sideEffectingTools: [] }
capabilities?: ForgedCapabilities

The ceiling for code-forged tools (see ForgedCapabilities). Absent: the legacy path, where a forged tool takes the APIs it asks for, unscoped. Validated at engine construction; each failure names its key.

Effect records under a ceiling. Ignored without one.

protectedPaths?: string[]

Paths no fs.write or fs.delete root may hold or lie inside, beside the library's own directory, node_modules and the entry script's directory. The library cannot find a host's own code and data: list its source, build output, data directories and a file database here.

effectPolicy?: EffectPolicy

Called for every write, delete and state-changing request; see EffectPolicy.

What runs forged code in the forge the engine builds. Absent: the in-process executor (isolates: false). A host that passes its own sandboxForge brings that forge's executor; passing one beside a different executor fails construction with executor_conflict.