Skip to content

AIDK API Reference / aidk-ai-sdk / Message

Function: Message() ​

ts
function Message(props: MessageProps): Element;

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

AI SDK-style Message component.

Provides a familiar interface for ai-sdk users while mapping to aidk's internal timeline entry format.

Parameters ​

ParameterType
propsMessageProps

Returns ​

Element

Examples ​

tsx
<Message role="user" content="Hello, world!" />
tsx
<Message
  role="user"
  content={[
    { type: 'text', text: 'What is in this image?' },
    { type: 'image', image: 'https://example.com/image.png' },
  ]}
/>
tsx
<Message
  role="tool"
  content={[
    { type: 'tool-result', toolCallId: 'call_123', toolName: 'get_weather', result: { temp: 72 } }
  ]}
/>

Released under the MIT License.