/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 18ecb351a6a4 */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { Message, Message$Outbound, Message$outboundSchema, } from "./message.js"; /** * Payload for creating a run. **Important**: If the agent uses an input form trigger, the `input` field is required and must include all fields defined in the form schema. Even fields marked as optional in the UI must be included in the request—use an empty string (`""`) for optional fields without values. Omitting required form fields will result in a 500 error. */ export type AgentRunCreate = { /** * The ID of the agent to run. */ agentId: string; /** * The input to the agent. Required when the agent uses an input form trigger. */ input?: { [k: string]: any } | undefined; /** * The messages to pass an input to the agent. */ messages?: Array | undefined; /** * The metadata to pass to the agent. */ metadata?: { [k: string]: any } | undefined; }; /** @internal */ export type AgentRunCreate$Outbound = { agent_id: string; input?: { [k: string]: any } | undefined; messages?: Array | undefined; metadata?: { [k: string]: any } | undefined; }; /** @internal */ export const AgentRunCreate$outboundSchema: z.ZodType< AgentRunCreate$Outbound, z.ZodTypeDef, AgentRunCreate > = z.object({ agentId: z.string(), input: z.record(z.any()).optional(), messages: z.array(Message$outboundSchema).optional(), metadata: z.record(z.any()).optional(), }).transform((v) => { return remap$(v, { agentId: "agent_id", }); }); export function agentRunCreateToJSON(agentRunCreate: AgentRunCreate): string { return JSON.stringify(AgentRunCreate$outboundSchema.parse(agentRunCreate)); }