Merge pull request #1 from letta-ai/christina/allow-convo-on-create

allow new convo creation on createSession
This commit is contained in:
Christina Tong
2026-01-27 14:33:01 -08:00
committed by GitHub
2 changed files with 7 additions and 8 deletions

View File

@@ -104,6 +104,9 @@ await using session4 = resumeSession(agentId, { defaultConversation: true });
// Resume last used session (agent + conversation)
await using session5 = createSession({ continue: true });
// Create new agent with a new (non-default) conversation
await using session6 = createSession({ newConversation: true });
```
**Key concepts:**

View File

@@ -182,14 +182,6 @@ export class SubprocessTransport {
);
}
// newConversation requires agentId
if (this.options.newConversation && !this.options.agentId) {
throw new Error(
"'newConversation' requires agentId. " +
"Use resumeSession(agentId, { newConversation: true })."
);
}
// Conversation and agent handling
if (this.options.continue) {
// Resume last session (agent + conversation)
@@ -210,6 +202,10 @@ export class SubprocessTransport {
} else {
// Create new agent
args.push("--new-agent");
if (this.options.newConversation) {
// Also create new conversation (not default)
args.push("--new");
}
}
// Model