Skip to content

feat: expose artifact creation chat API for AI-driven generation #3

Closed

Description

@dahai80

Summary

Fusion Studio needs an API to create artifacts through AI conversation, not just manual form submission. The flow should be:

  1. User selects artifact kind (app/game/tool/document/template/code)
  2. User describes what they want in natural language
  3. AI generates artifact content (HTML/markdown/code)
  4. Content is streamed back for real-time preview
  5. User iterates via follow-up messages

Proposed API

POST /v1/artifact/chat
{
  "kind": "app",
  "message": "Build a todo app with dark theme",
  "session_id": "..."
}

Response (streaming):
data: {"type": "content", "delta": "<html>..."}
data: {"type": "content", "delta": "<style>..."}
data: {"type": "done", "artifact_id": "..."}

Requirements

  • Accept kind parameter to guide generation (app→HTML with interactivity, document→markdown structure, etc.)
  • System prompt includes kind-specific conventions
  • Streaming output for real-time preview
  • Return structured artifact metadata on completion

Motivation

Fusion Studio has implemented the UI side (template picker → AI chat sheet → preview). We need the backend API to power this flow. Currently we use AgentBridge.infer() as a workaround, but a dedicated artifact creation API would be cleaner and more reliable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions