• Helper to define an agent according to the required interface.

    Parameters

    Returns Agent

    Example: A basic agent with entry and prewarm functions

    export default defineAgent({
    entry: async (ctx: JobContext) => { ... },
    prewarm: (proc: JobProcess) => { ... },
    })