Forest Admin - API reference
    Preparing search index...

    Type Alias WorkflowExecutorEmbedOptions

    WorkflowExecutorEmbedOptions: Omit<WorkflowExecutorTuningOptions, "loggerLevel"> & {
        agentUrl?: string;
        ai?:
            | { apiKey: string; model: string; provider: "anthropic"
            | "openai" }
            | { model: string; provider: "bedrock"; region?: string };
        database?: { uri?: string; [option: string]: unknown };
        encryptionKey?: string;
        inMemory?: boolean;
        port?: number;
    }

    Options for an embedded workflow executor, started in the same process as the agent through agent.addWorkflowExecutor().

    Type Declaration

    • OptionalagentUrl?: string

      URL the executor uses to reach this agent's data layer. Auto-derived when the agent runs on its own server (mountOnStandaloneServer). Required when the agent is mounted on an external framework (Express/Fastify/NestJS), since the agent cannot know the host application's address.

    • Optionalai?:
          | { apiKey: string; model: string; provider: "anthropic"
          | "openai" }
          | { model: string; provider: "bedrock"; region?: string }

      Bring your own AI provider instead of Forest's AI server. Omit ai entirely to keep using Forest's server. bedrock takes no apiKey: credentials come from the AWS credential chain (IAM role, AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY, shared profile). region falls back to AWS_REGION / AWS_DEFAULT_REGION, but never to the profile's own region.

    • Optionaldatabase?: { uri?: string; [option: string]: unknown }

      Database connection used to persist workflow run state. Accepts a connection URI or a Sequelize options object. The agent throws at startup if it is omitted (unless inMemory is set).

    • OptionalencryptionKey?: string

      HKDF secret encrypting OAuth-protected MCP connector credentials at rest. Only needed if you use OAuth-protected MCP connectors; without it their credential deposits return 503. Embed-time equivalent of the standalone FOREST_EXECUTOR_ENCRYPTION_KEY env var.

    • OptionalinMemory?: boolean

      Use an in-memory run store instead of a database. No database is required, but runs are lost when the process restarts, so it is not meant for production. Mutually exclusive with database.

    • Optionalport?: number

      Loopback port the embedded executor listens on; the agent proxies to it internally. Defaults to 3400.