Skip to content

AIDK API Reference / aidk-ai-sdk / MessageProps

Interface: MessageProps ​

Defined in: packages/adapters/ai-sdk/src/components.tsx:47

Props for ai-sdk-style Message component. Uses ai-sdk's role and content format.

Extends ​

Properties ​

PropertyModifierTypeDescriptionOverridesInherited fromDefined in
children?public| Element | Element[]Children (alternative to content prop)CoreMessageProps.children-packages/adapters/ai-sdk/src/components.tsx:55
contentpublicAiSdkContentMessage content - string or content partsCoreMessageProps.content-packages/adapters/ai-sdk/src/components.tsx:52
createdAt?readonlystring | DateWhen the message was created-Message.createdAtpackages/shared/src/messages.ts:63
id?readonlystringUnique message identifier-Message.idpackages/shared/src/messages.ts:55
key?publicstring | numberKey for React-like reconciliation (optional). Used by compiler to track component instances across renders.-CoreMessageProps.keypackages/core/src/jsx/jsx-types.ts:22
metadata?readonlyRecord<string, any>Additional metadata-Message.metadatapackages/shared/src/messages.ts:61
ref?publicstringReference name for accessing this component instance. Use com.getRef&lt;ComponentType&gt;('myRef') to access the instance. Example &lt;Fork ref="myFork" input={forkInput} /&gt; const fork = com.getRef&lt;ForkComponent&gt;('myFork');-CoreMessageProps.refpackages/core/src/jsx/jsx-types.ts:16
rolepublic"user" | "system" | "assistant" | "tool"Message role - matches ai-sdk rolesCoreMessageProps.role-packages/adapters/ai-sdk/src/components.tsx:49
tags?publicstring[]--CoreMessageProps.tagspackages/core/src/jsx/components/primitives.ts:109
updatedAt?readonlystring | DateWhen the message was last updated-Message.updatedAtpackages/shared/src/messages.ts:65
visibility?public"model" | "observer" | "log"--CoreMessageProps.visibilitypackages/core/src/jsx/components/primitives.ts:110

Released under the MIT License.