/** Create the dedicated Cloud agent used by the Tangled teaching workflow. */ import { LettaAgentClient } from "@letta-ai/letta-agent-sdk/client"; async function main(): Promise { const apiKey = process.env.LETTA_API_KEY; if (!apiKey) { throw new Error("LETTA_API_KEY is required"); } const client = new LettaAgentClient({ backend: "cloud", apiKey, }); const agentId = await client.createAgent({ name: "tangled-letta-ci", description: "Dedicated teaching agent for the tangled-letta pipeline demo.", tags: ["demo", "tangled-ci"], persona: [ "You are a teaching CI agent.", "Inspect the sandbox with tools, then call report_pipeline with a boolean success verdict.", "Do not invent a text receipt. Report only values you observed from tool results.", ].join(" "), human: "The operator is the maintainer of the tangled-letta teaching repository.", }); console.log(`LETTA_AGENT_ID=${agentId}`); } main().catch((error: unknown) => { console.error(error instanceof Error ? error.message : error); process.exit(1); });