跳转到内容

HandoffCloneOptions

此内容尚不支持你的语言。

type HandoffCloneOptions<TContext, TOutput> = object;
Type Parameter Default type

TContext

UnknownContext

TOutput extends AgentOutputType

TextOutput

agent?: Agent<TContext, TOutput>;

The agent that the cloned handoff should target.


agentName?: string;

The model-facing name of the target agent.


errorFunction?: HandoffErrorFunction<TContext>;

See Handoff.errorFunction.


inputFilter?: HandoffInputFilter;

A function that filters the inputs that are passed to the cloned handoff’s agent.


inputJsonSchema?: JsonObjectSchema<any>;

The JSON schema for the cloned handoff input.


isEnabled?: HandoffEnabledFunction<TContext>;

Determines whether the cloned handoff should be available for the current run.


onInvokeHandoff?: (context, args) =>
| Promise<Agent<TContext, TOutput>>
| Agent<TContext, TOutput>;

The callback that should run when the cloned handoff is invoked.

Parameter Type

context

RunContext<TContext>

args

string

| Promise<Agent<TContext, TOutput>> | Agent<TContext, TOutput>


strictJsonSchema?: boolean;

Whether the cloned handoff input schema is strict.


toolDescription?: string;

The description of the tool that represents the cloned handoff.


toolName?: string;

The name of the tool that represents the cloned handoff.