Something went wrong. Try again.
A small demo repository demonstrating how to use the Letta Agent SDK in Tangled CI.
Something went wrong. Try again.
1.1 kB · 34 lines
TypeScript
at main
1234567891011121314151617181920212223242526272829303132333435/** Create the dedicated Cloud agent used by the Tangled teaching workflow. */
import { LettaAgentClient } from "@letta-ai/letta-agent-sdk/client";
async function main(): Promise<void> { 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);});