Interface: AgentSendMessageOptions
Makaio Framework / ai-adapters-core / AgentSendMessageOptions
Interface: AgentSendMessageOptions
Section titled “Interface: AgentSendMessageOptions”Defined in: ../../../adapters/core/src/agent/types.ts:258
Options for sending a message to an agent. Extends SendMessageOptions with curated message history and system prompt configuration.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Properties
Section titled “Properties”deliveryMode?
Section titled “deliveryMode?”
optionaldeliveryMode?:"replace"|"enqueue"|"immediate"
Defined in: ../../../adapters/core/src/message-handle/types.ts:38
Controls delivery behavior.
Default Value
Section titled “Default Value”'enqueue'Inherited from
Section titled “Inherited from”SendMessageOptions.deliveryMode
messageHistory?
Section titled “messageHistory?”
optionalmessageHistory?:object[]
Defined in: ../../../adapters/core/src/agent/types.ts:260
Curated message history from orchestration layer
blocks
Section titled “blocks”blocks: {
content:string;type:"text"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"image"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"document"; } | {attachmentType:"file"|"directory";displayName?:string;fileName:string;filePath:string;source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"attachment"; } | {content:string;metadata?:Record<string,unknown>;type:"reasoning"; } | {args:Record<string,unknown>;name:string;toolCallId:string;type:"tool_call"; } | {isError?:boolean;output:string;toolCallId:string;type:"tool_output"; } | ({content:string;type:"text"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"image"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"document"; } | {attachmentType:"file"|"directory";displayName?:string;fileName:string;filePath:string;source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"attachment"; } | {content:string;metadata?:Record<string,unknown>;type:"reasoning"; } | {args:Record<string,unknown>;name:string;toolCallId:string;type:"tool_call"; } | {isError?:boolean;output:string;toolCallId:string;type:"tool_output"; })[]
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ content: string; type: "text"; }
Type Literal
Section titled “Type Literal”{ source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "image"; }
Type Literal
Section titled “Type Literal”{ source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "document"; }
Type Literal
Section titled “Type Literal”{ attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "attachment"; }
attachmentType
Section titled “attachmentType”attachmentType:
"file"|"directory"=AttachmentTypeSchema
Whether the attachment is a file or directory
displayName?
Section titled “displayName?”
optionaldisplayName?:string
Optional human-readable display name override
fileName
Section titled “fileName”fileName:
string
Original filename with extension (e.g. “api-spec.yaml”) — for display and type inference
filePath
Section titled “filePath”filePath:
string
Server-side file path — always populated before message reaches adapters
source
Section titled “source”source: {
data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; } =ContentSourceSchema
Inline content — base64 for binary, raw string for text
type:
"attachment"
Type Literal
Section titled “Type Literal”{ content: string; metadata?: Record<string, unknown>; type: "reasoning"; }
content
Section titled “content”content:
string
metadata?
Section titled “metadata?”
optionalmetadata?:Record<string,unknown>
Optional provider/runtime metadata for reasoning blocks.
type:
"reasoning"
Type Literal
Section titled “Type Literal”{ args: Record<string, unknown>; name: string; toolCallId: string; type: "tool_call"; }
Type Literal
Section titled “Type Literal”{ isError?: boolean; output: string; toolCallId: string; type: "tool_output"; }
({ content: string; type: "text"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "image"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "document"; } | { attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "attachment"; } | { content: string; metadata?: Record<string, unknown>; type: "reasoning"; } | { args: Record<string, unknown>; name: string; toolCallId: string; type: "tool_call"; } | { isError?: boolean; output: string; toolCallId: string; type: "tool_output"; })[]
optionalrole?:"user"|"assistant"|"system"
messageId?
Section titled “messageId?”
optionalmessageId?:string
Defined in: ../../../adapters/core/src/message-handle/types.ts:32
Custom identifier for message tracking (generated if not provided).
Inherited from
Section titled “Inherited from”responseSchema?
Section titled “responseSchema?”
optionalresponseSchema?:Record<string,unknown>
Defined in: ../../../adapters/core/src/agent/types.ts:282
JSON Schema for structured output.
When present and the adapter declares structuredOutput capability,
the adapter enforces this schema at the model level.
Ignored by adapters that lack the capability.
sessionContext?
Section titled “sessionContext?”
optionalsessionContext?:object
Defined in: ../../../adapters/core/src/agent/types.ts:274
Context signals assembled by SessionOrchestrator. Used by AIAgent to decide: native resume vs fresh with history. Hooks inject context via sessionContext.turnContext (set by replacePayload).
extractedContext?
Section titled “extractedContext?”
optionalextractedContext?:unknown
Structured context from compression (if hasCompression=true).
hasCompression?
Section titled “hasCompression?”
optionalhasCompression?:boolean
Whether compression is active (extractedContext present). If true, Agent should use fresh mode with compressed context.
hasConnectorSwap?
Section titled “hasConnectorSwap?”
optionalhasConnectorSwap?:boolean
Whether a connector swap occurred before this message (e.g., cwd/model change). If true, native resume is infeasible and adapters should use fresh mode.
hasNewTransforms?
Section titled “hasNewTransforms?”
optionalhasNewTransforms?:boolean
Whether transforms have been applied since last turn. If true, Agent should use fresh mode (history changed).
isFirstTurn?
Section titled “isFirstTurn?”
optionalisFirstTurn?:boolean
Whether this is the first turn in the session. If true, no native history exists yet.
messageHistory?
Section titled “messageHistory?”
optionalmessageHistory?:object[]
Curated message history assembled via getFullConversation(). Only used if Agent decides to inject (fresh mode).
turnContext?
Section titled “turnContext?”
optionalturnContext?:Record<string,JsonValue>
Turn-scoped context assembled by PreUserMessage hooks and the orchestrator. Keys are plugin-defined (e.g., ‘skillCatalog’, ‘skills’, ‘predictedTools’). Adapters consume this to prepend context blocks.
Constrained to JSON-safe types to ensure serialization succeeds.
ADAPTER CONTRACT: Every adapter MUST materialize turnContext into the LLM-facing message using serializeTurnContext().
systemPrompt?
Section titled “systemPrompt?”
optionalsystemPrompt?:string| {content:string;mode:"append"; }
Defined in: ../../../adapters/core/src/agent/types.ts:267
System prompt configuration.
string: Replace/set the entire system prompt{ mode: 'append', content: string }: Append to adapter’s default system prompt