mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-01 19:32:40 +02:00
set up basic workflow execution
This commit is contained in:
parent
7758139893
commit
c004bc5eb6
24 changed files with 794 additions and 298 deletions
|
|
@ -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(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue