From 8ef74c427ff6df5c884527680fb01e9f0e371eaf Mon Sep 17 00:00:00 2001 From: Christina Tong Date: Fri, 6 Feb 2026 16:04:35 -0800 Subject: [PATCH] chore: add embedding model to create agent in headless (#856) --- src/headless.ts | 9 +++------ src/index.ts | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/headless.ts b/src/headless.ts index 143985e..69e0552 100644 --- a/src/headless.ts +++ b/src/headless.ts @@ -92,10 +92,10 @@ export async function handleHeadlessCommand( conversation: { type: "string" }, default: { type: "boolean" }, // Alias for --conv default "new-agent": { type: "boolean" }, - "create-only": { type: "boolean" }, // Create agent and exit (for SDK) new: { type: "boolean" }, // Deprecated - kept for helpful error message agent: { type: "string", short: "a" }, model: { type: "string", short: "m" }, + embedding: { type: "string" }, system: { type: "string", short: "s" }, "system-custom": { type: "string" }, "system-append": { type: "string" }, @@ -255,6 +255,7 @@ export async function handleHeadlessCommand( const systemPromptPreset = values.system as string | undefined; const systemCustom = values["system-custom"] as string | undefined; const systemAppend = values["system-append"] as string | undefined; + const embeddingModel = values.embedding as string | undefined; const memoryBlocksJson = values["memory-blocks"] as string | undefined; const blockValueArgs = values["block-value"] as string[] | undefined; const initBlocksRaw = values["init-blocks"] as string | undefined; @@ -535,6 +536,7 @@ export async function handleHeadlessCommand( const updateArgs = getModelUpdateArgs(model); const createOptions = { model, + embeddingModel, updateArgs, skillsDirectory, parallelToolCalls: true, @@ -891,11 +893,6 @@ export async function handleHeadlessCommand( uuid: `init-${agent.id}`, }; console.log(JSON.stringify(initEvent)); - - // --create-only: exit after outputting init (for SDK createAgent) - if (values["create-only"]) { - process.exit(0); - } } // Helper to resolve any pending approvals before sending user input diff --git a/src/index.ts b/src/index.ts index b18c372..87e1588 100755 --- a/src/index.ts +++ b/src/index.ts @@ -419,6 +419,7 @@ async function main(): Promise { agent: { type: "string", short: "a" }, name: { type: "string", short: "n" }, model: { type: "string", short: "m" }, + embedding: { type: "string" }, system: { type: "string", short: "s" }, "system-custom": { type: "string" }, "system-append": { type: "string" },