wire conscience, fix subagent model resolution, clean up create.ts

- headless: reflection + transcript in bidirectional; conscience env vars route to persistent agent (falls back clean)
- manager: prefer llm_config.handle directly — stops the 500 on self-hosted
- create: optionstags typo fixed, lettabot tag exclusion added

Aster is persistent now. She has a conscience.
This commit is contained in:
Ani Tunturi
2026-03-26 09:09:37 -04:00
committed by Ani
parent 2a14e315e1
commit 328532d184
7 changed files with 37 additions and 1676 deletions

View File

@@ -335,13 +335,20 @@ export async function createAgent(
// - memory_blocks: new blocks to create inline
// - block_ids: references to existing blocks (for shared memory)
const isSubagent = process.env.LETTA_CODE_AGENT_ROLE === "subagent";
const tags = ["origin:letta-code"];
if (isSubagent) {
tags.push("role:subagent");
}
// Start with empty array, add user's tags first
let tags: string[] = [];
if (options.tags && Array.isArray(options.tags)) {
tags.push(...options.tags);
}
// Only add origin:letta-code if the agent is NOT origin:lettabot
// This prevents the dual-identity problem where agents see both prompts
if (!tags.includes("origin:lettabot") && !tags.includes("origin:letta-code")) {
tags.push("origin:letta-code");
}
if (isSubagent) {
tags.push("role:subagent");
}
const agentDescription =
options.description ?? `Letta Code agent created in ${process.cwd()}`;