getHandoff
function getHandoff<TContext, TOutput>(agent): Handoff<TContext, TOutput>
Returns a handoff for the given agent. If the agent is already wrapped into a handoff, it will be returned as is. Otherwise, a new handoff instance will be created.
Type Parameters
Section titled “Type Parameters”Type Parameter | Description |
---|---|
|
The context of the handoff |
|
The output type of the handoff |
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
Returns
Section titled “Returns”Handoff
<TContext
, TOutput
>