Task agents
The autonomous tool-use loop, batch execution, threads, and background work.
import { mindstudio } from '@mindstudio-ai/agent';When a feature needs the model to decide its own next step (research, then scrape, then generate, and retry what fails), a task agent runs that loop for you. You give it a prompt, a set of tools, and the JSON shape of the answer; it works until the output matches that shape. Its tools can be SDK actions, the app's own methods, or functions defined right at the call site, so it can read the app's data to decide what to do and write results back itself. Around that loop sit three smaller primitives: running many actions at once, carrying conversation state across calls, and keeping a fire-and-forget chain alive after the method returns.
Product page
Models & Agents
Every frontier model and a thousand integrations, behind one API.
goremy.ai/features/ai-models
(opens goremy.ai in a new tab)9 entries
Methods 4
mindstudio.runTask
Runs an autonomous tool-use loop until the model's output matches `outputSchema`.
mindstudio.executeStepBatch
Runs up to 50 SDK actions in parallel in one request, with results in input order.
mindstudio.waitUntil
Keeps the sandbox alive for a fire-and-forget background chain after the method returns.
$threadId
Carries conversation state across calls by reusing the thread and app ids from a prior result.
Types 5