cloudflare / cloudflare/agents-starter

Feature requests: markdown in user messages, file attachments, and generative UI artifacts

Open
#144 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
283
PR merge metrics
No merged PRs in 30d

Description

A few feature requests for the starter to make it a more complete chat experience:

## 1. Markdown rendering for user messages

**Priority: quick win**

Currently user messages are rendered as plain text, while assistant messages use Streamdown for markdown rendering. If a user types a message with backticks, bold, links, or lists, it renders as raw text.

Suggestion: wrap user message text in `` (with `isAnimating={false}` and `controls={false}`) so formatting is consistent on both sides of the conversation.

## 2. Multimodal input (file/image attachments)

**Priority: medium**

Support attaching files and images to messages. The AI SDK supports multimodal content parts (`image`, `file`), and Workers AI models like Llama support image input. The UI would need:

- A file/image upload button next to the send button
- Rendering attached images inline in user messages
- Passing the attachment as a content part to `sendMessage`

This would make the starter useful for image analysis, document Q&A, and other multimodal use cases.

## 3. Generative UI / artifacts via data parts

**Priority: future**

The Agents SDK now supports `data-*` stream parts — typed JSON blobs attached to messages alongside text. This opens the door for artifact-style UIs:

- **Code artifacts** — a data part with `type: "data-code"` that renders in a split-pane code editor
- **Table/sheet artifacts** — structured data rendered as an interactive table
- **Document artifacts** — rich text content with versioning

The data parts infrastructure (reconciliation, transient, persistence) is already in `@cloudflare/ai-chat`. The starter could demonstrate a simple artifact pattern — e.g., a tool that generates code and attaches it as a data part, rendered in a collapsible code block with copy/run buttons.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.