跳转到内容

RunHookEvents

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

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

TContext

UnknownContext

TOutput extends AgentOutputType

TextOutput

agent_end: [RunContext<TContext>, Agent<TContext, TOutput>, string];

context

The context of the run

agent

The agent that is ending

output

The output of the agent


agent_handoff: [RunContext<TContext>, Agent<any, any>, Agent<any, any>];

context

The context of the run

fromAgent

The agent that is handing off

toAgent

The next agent to run


agent_start: [RunContext<TContext>, Agent<TContext, TOutput>, AgentInputItem[]];

context

The context of the run

agent

The agent that is starting


agent_tool_end: [RunContext<TContext>, Agent<TContext, TOutput>, Tool, string, object];

context

The context of the run

agent

The agent that is ending a tool

tool

The tool that is ending

result

The result of the tool


agent_tool_start: [RunContext<TContext>, Agent<TContext, TOutput>, Tool, object];

context

The context of the run

agent

The agent that is starting a tool

tool

The tool that is starting