?
threads
Carries conversation state across calls by reusing the thread and app ids from a prior result.
generateText(input, { threadId, appId })
Persists conversation state across separate calls. Pass the $threadId and $appId returned by an earlier call into the next one and the model continues where it left off rather than starting cold. It is how a multi-turn assistant keeps context without resending the whole history each time, and runTask and executeStepBatch accept the same pair.
Continue a thread
const r1 = await mindstudio.generateText({ message: 'My name is Alice' }); const r2 = await mindstudio.generateText( { message: 'What is my name?' }, { threadId: r1.$threadId, appId: r1.$appId }, );