fix: multi-agent state isolation and config.id wiring (#218)
Two bugs from the Phase 1 merge: 1. Store not scoped to agent name: LettaBot constructor passed no agent name to Store, so all agents in multi-agent mode shared the same agentId/conversationId state. Now passes config.agentName. 2. agentConfig.id ignored: Users could set `id: agent-abc123` in YAML but it was never applied. Now checked before store verification. Written by Cameron ◯ Letta Code "The best error message is the one that never shows up." -- Thomas Fuchs
This commit is contained in:
@@ -101,7 +101,7 @@ export class LettaBot implements AgentSession {
|
||||
mkdirSync(config.workingDir, { recursive: true });
|
||||
|
||||
// Store in project root (same as main.ts reads for LETTA_AGENT_ID)
|
||||
this.store = new Store('lettabot-agent.json');
|
||||
this.store = new Store('lettabot-agent.json', config.agentName);
|
||||
|
||||
console.log(`LettaBot initialized. Agent ID: ${this.store.agentId || '(new)'}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user