• Executes a provided function within a schema context, with optional overrides for schema services such as agents, completions, and pipelines.

    Type Parameters

    • T = any

      Type of the result returned by the run function.

    Parameters

    • runFn: () => Promise<void | T>

      The function to execute within the schema context.

    • Optionaloptions: Partial

      Optional overrides for schema services, with defaults from the swarm's schema services.

    Returns Promise<T>

    The result of the executed function.