@xynehq/jaf
Version:
Juspay Agent Framework - A purely functional agent framework with immutable state and composable tools
20 lines • 655 B
JavaScript
import { z } from 'zod';
const handoffArgsSchema = z.object({
agentName: z.string().describe("The name of the agent to handoff to."),
reason: z.string().describe("The reason for the handoff."),
});
export const handoffTool = {
schema: {
name: "handoff_to_agent",
description: "Delegate the task to a different, more specialized agent.",
parameters: handoffArgsSchema,
},
execute: async (args, _) => {
return JSON.stringify({
handoff_to: args.agentName,
reason: args.reason,
timestamp: new Date().toISOString()
});
},
};
//# sourceMappingURL=handoff.js.map