set up basic workflow execution

This commit is contained in:
Ramnique Singh 2025-11-07 11:42:10 +05:30
parent 7758139893
commit c004bc5eb6
24 changed files with 794 additions and 298 deletions

View file

@ -1,7 +1,34 @@
import { z } from "zod";
export const BaseAgentTool = z.object({
name: z.string(),
});
export const BuiltinAgentTool = BaseAgentTool.extend({
type: z.literal("builtin"),
});
export const McpAgentTool = BaseAgentTool.extend({
type: z.literal("mcp"),
description: z.string(),
inputSchema: z.any(),
mcpServerName: z.string(),
});
export const WorkflowAgentTool = BaseAgentTool.extend({
type: z.literal("workflow"),
});
export const AgentTool = z.discriminatedUnion("type", [
BuiltinAgentTool,
McpAgentTool,
WorkflowAgentTool,
]);
export const Agent = z.object({
name: z.string(),
model: z.string(),
description: z.string(),
instructions: z.string(),
tools: z.record(z.string(), AgentTool).optional(),
});