Skip to content

createHandoffTool

function createHandoffTool(availableAgents, currentAgentId?):
| Tool<{
}, {
error: string;
}>
| Tool<{
reason: string;
summary?: string;
targetAgentId: string;
}, {
__handoff: true;
reason: string;
summary: string | undefined;
targetAgent: string;
targetAgentId: string;
}>;
Parameter Type

availableAgents

AgentConfig[]

currentAgentId?

string

| Tool<{ }, { error: string; }> | Tool<{ reason: string; summary?: string; targetAgentId: string; }, { __handoff: true; reason: string; summary: string | undefined; targetAgent: string; targetAgentId: string; }>