PARACOSM AGENTOS | API Reference v0.9.1202
Home Simulation API Docs GitHub npm
Home Simulation API Docs GitHub npm AgentOS Discord
paracosm - v0.9.1202
    Preparing search index...

    Interface CompileOptions

    Options for compileScenario().

    interface CompileOptions {
        anthropicKey?: string;
        apiKey?: string;
        braveKey?: string;
        cache?: boolean;
        cacheDir?: string;
        cohereKey?: string;
        firecrawlKey?: string;
        generateText?: GenerateTextFn;
        maxSearches?: number;
        model?: string;
        onProgress?: (
            hookName: string,
            status: "generating" | "cached" | "done" | "fallback",
        ) => void;
        provider?: LlmProvider;
        restore?: { hookSources?: CompiledHookSources };
        seedText?: string;
        seedUrl?: string;
        serperKey?: string;
        stayOnProvider?: boolean;
        tavilyKey?: string;
        telemetry?: CompilerTelemetry;
        webSearch?: boolean;
    }

    Hierarchy

    • RuntimeCredentialOptions
      • CompileOptions
    Index
    anthropicKey?: string

    Anthropic API key.

    apiKey?: string

    OpenAI API key. Historical dashboard field name.

    braveKey?: string
    cache?: boolean

    Whether to use disk caching. Default: true.

    cacheDir?: string

    Base directory for the disk cache. Default: '.paracosm/cache'.

    cohereKey?: string
    firecrawlKey?: string
    generateText?: GenerateTextFn

    Custom generateText function (overrides provider/model).

    maxSearches?: number

    Max web searches during seed ingestion. Default: 5.

    model?: string

    Model name for hook generation.

    onProgress?: (
        hookName: string,
        status: "generating" | "cached" | "done" | "fallback",
    ) => void

    Progress callback for each hook being generated.

    provider?: LlmProvider

    LLM provider to use for hook generation.

    restore?: { hookSources?: CompiledHookSources }

    Restore a saved compiled scenario instead of compiling it: the server's boot restore sets this for each saved scenario. When hookSources were generated under the current compile schema version, every hook is rebuilt from them alone, a record that names no hook included; otherwise, when the disk cache holds one or more hooks of this exact scenario JSON that restore, from those under the model that wrote them. Either way no provider is resolved and no model is called: a hook that source does not hold, or holds in a form the hook runner refuses, gets the compiler's own fallback for it, as the compile that saved the scenario did. With neither, the scenario is compiled as the other options say.

    seedText?: string

    Prompt, brief, or document text to ingest into the scenario's knowledge bundle via LLM extraction + optional web search.

    seedUrl?: string

    URL to fetch and ingest as source material. If set, seedText is ignored.

    serperKey?: string
    stayOnProvider?: boolean

    Keep every model call on the resolved provider: AgentOS's fallback chain to another provider is off (fallbackProviders: []), and a provider with no key of its own is not swapped for another provider's environment key. The hosted demo sets it on every call it runs. Default false: a call on the environment's keys falls back as AgentOS's default chain does.

    tavilyKey?: string
    telemetry?: CompilerTelemetry

    Optional telemetry sink that collects per-hook attempt counts and any exhausted-retry fallbacks. Use when you want to surface compile reliability in a dashboard or snapshot into /retry-stats. See CompilerTelemetry.

    webSearch?: boolean

    Enable live web search during seed ingestion. Requires search API keys. Default: true.