import { execFileSync } from "node:child_process"; export type AddBaseAgentInput = { agentId: string; workspace: string; bridgeModel: string; }; /** * Create the base OpenClaw agent using the `openclaw agents add` CLI. * This sets up routing and workspace; contractor metadata is written separately. */ export function createBaseAgent(input: AddBaseAgentInput): void { const { agentId, workspace, bridgeModel } = input; execFileSync( "openclaw", ["agents", "add", agentId, "--workspace", workspace, "--model", bridgeModel, "--non-interactive"], { stdio: "inherit" }, ); }