Reference
Remy Reference/agent/userMessage
?

userMessage

Send a message to an AI model and return the response, or echo a system message.
mindstudio.userMessage({ message }) → Result

Sends a message to an AI model and returns the response, or echoes a system message — the core text-generation call. Select the model and its options with a model override, and wrap multi-step reasoning in a task agent rather than chaining calls together yourself.

Parameters
message
string
RequiredThe message to send (prompt for AI, or text for system echo)
source
string
Message source: "user" sends to AI model, "system" echoes message content directly. Defaults to "user"
usersystem
modelOverride
object
Model configuration override. Optional; uses the workflow's default model if not specified
structuredOutputType
string
Output format constraint for structured responses
textjsoncsv
structuredOutputExample
string
Sample showing the desired output shape (for JSON/CSV formats). A TypeScript interface is also useful here for more complex types.
chatHistoryMode
string
Whether to include or exclude prior chat history in the AI context
includeexclude
Call from a method
import { mindstudio } from '@mindstudio-ai/agent';

const result = await mindstudio.userMessage({
  message: /* ... */
});