agentica icon indicating copy to clipboard operation
agentica copied to clipboard

Proposal: Agentica UI Packages

Open Moon-DaeSeung opened this issue 10 months ago • 1 comments

Overview

I'd like to propose adding UI packages to the Agentica library that support various frameworks such as React and Svelte. These packages would provide UI components and features that developers frequently need to implement when building AI chat interfaces, improving the overall developer experience.

Background and Rationale

When implementing AI chat interfaces, developers often need to build the following features from scratch each time:

  • UI handling for streaming text display
  • Auto-scrolling during message streaming
  • Virtualized scrolling for conversation history
  • Interactive elements within messages (charts, action buttons, etc.)

These features are commonly needed in AI chat applications, but reimplementing them for each project is inefficient, especially for applications requiring dynamic content and interactive elements.

Proposed Structure

packages/
├── ui/
│   ├── react/
│   ├── svelte/
│   ├── utils/

Each framework-specific package could include basic components such as a ChatContainer that dynamically renders different message components based on message type.

Key Feature Ideas

  1. Support for Various Message Types

    • Components for different message formats: text, charts, action buttons, etc.
    • Rendering appropriate components based on message.type
  2. Streaming Optimizations

    • Prevention of unnecessary re-rendering
    • Auto-scrolling functionality during streaming
    • Animation effects (fade-in, etc.)
  3. Interactive Elements

    • Action buttons within messages
    • Interface elements for user selection
    • Dynamic charts and data visualization

Seeking Feedback

I'm interested in your thoughts on whether such UI component packages would be a suitable extension for the Agentica library. I'm curious if there are already plans in this direction, or if you think it might be better as a separate package.

While I haven't developed detailed implementation plans yet, I would be happy to contribute if you think this direction could benefit the project.

Moon-DaeSeung avatar Mar 16 '25 08:03 Moon-DaeSeung

Instead, we're preparing to support CLI commands that allow users to start with a similar React template. We think this will alleviate the issue to some extent. #102

However, unfortunately, a UI for easier integration is not yet on our roadmap.

sunrabbit123 avatar Mar 17 '25 05:03 sunrabbit123