Path to a file that has Agent as a default export, dynamically imported later for entrypoint and prewarm functions
Optional
agentOptional
apiOptional
apiOptional
host?: stringOptional
initializeOptional
loadCalled to determine the current load of the worker. Should return a value between 0 and 1.
Optional
loadWhen the load exceeds this threshold, the worker will be marked as unavailable.
Optional
logOptional
maxOptional
numOptional
permissions?: WorkerPermissionsOptional
port?: numberOptional
production?: booleanOptional
requestOptional
shutdownOptional
workerOptional
wsURL?: stringOptional
apiOptional
api
Data class describing worker behaviour.
Remarks
The Agents framework provides sane worker defaults, and works out-of-the-box with no tweaking necessary. The only mandatory parameter is
agent
, which points to the entry function.This class is mostly useful in conjunction with cli.runApp.