Agent.listWorkflows()
The .listWorkflows() method retrieves the workflows configured for an agent, resolving them if they're a function. These workflows enable the agent to execute complex, multi-step processes with defined execution paths.
Usage exampleUsage example的直接链接
await agent.listWorkflows()
ParametersParameters的直接链接
options?:
{ requestContext?: RequestContext }
= {}
Optional configuration object containing request context.
{ requestContext?: RequestContext }
requestContext?:
RequestContext
Request Context for dependency injection and contextual information.
ReturnsReturns的直接链接
workflows:
Promise<Record<string, Workflow>>
A promise that resolves to a record of workflow names to their corresponding Workflow instances.
Extended usage exampleExtended usage example的直接链接
await agent.listWorkflows({
requestContext: new RequestContext(),
})