Proposal: Agentica UI Packages
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
-
Support for Various Message Types
- Components for different message formats: text, charts, action buttons, etc.
- Rendering appropriate components based on message.type
-
Streaming Optimizations
- Prevention of unnecessary re-rendering
- Auto-scrolling functionality during streaming
- Animation effects (fade-in, etc.)
-
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.
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.