패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.2.4

genai_primitives

생성형 AI 작업을 위한 원시 집합입니다.

AndroidiOSLinuxmacOSWebWindows
30일 다운로드
9.3만
좋아요
3
Pub 점수
150

패키지 설치

flutter pub add genai_primitives

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

genai_primitives는 Flutter 애플리케이션에 생성형 AI 기능을 통합하기 위한 기본 도구를 제공합니다. 대규모 언어 모델(LLMs) 및 기타 생성형 AI 서비스와 상호작용할 수 있도록 표준화된 인터페이스와 유틸리티를 제공하여 채팅, 콘텐츠 생성, 텍스트 분석과 같은 AI 기반 기능 개발을 가능하게 합니다. 플랫폼 간 일관성과 사용 편의성을 고려해 설계되었으며, Android, iOS, Linux, macOS, Web, Windows를 지원합니다. 이 패키지는 재사용 가능하고 잘 구조화된 AI 컴포넌트를 장려하는 Flutter UI Labs 이니셔티브의 일부입니다.

사용 사례

  • AI 챗 인터페이스 구축
  • 동적으로 텍스트 콘텐츠 생성
  • 자연어 처리 워크플로우 구현
  • 상호작용형 AI 어시스턴트 만들기
  • 실시간 콘텐츠 제안 활성화
  • 다국어 AI 상호작용 지원

주요 기능

  • 표준화된 LLM 상호작용 API
  • 크로스플랫폼 호환성
  • 모듈형 및 확장 가능한 설계
  • 내장된 요청/응답 처리
  • Flutter 위젯과 통합 가능
  • 일관된 오류 및 상태 관리

적합한 대상

  • AI 기능을 구축하는 Flutter 개발자
  • 생산 앱에서 LLM을 사용하는 팀
  • 확장 가능한 AI 통합이 필요한 프로젝트
  • 다중 플랫폼을 대상으로 하는 앱
  • 재사용 가능한 AI 빌드 블록을 찾는 개발자

고려 사항

  • 외부 LLM 서비스 통합이 필요합니다
  • AI 호출은 네트워크 사용 가능성을 기반으로 합니다
  • 특허 모델을 위해 사용자 정의 어댑터가 필요할 수 있습니다
  • 민감한 작업에 백엔드와 함께 사용하는 것이 가장 좋습니다
  • 독립적인 AI 엔진이 아니라 클라이언트 측 툴킷입니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Generative UI SDK for Flutter (genui)

A Flutter library to enable developers to easily add interactive generative UI to their applications.

See the Getting started with GenUI video for an overview of the package.

GenUI Intro video still

Status: highly experimental

This is a highly experimental package, which means the API will change (sometimes drastically). Feedback is very welcome.

Summary

Our goal for the GenUI SDK for Flutter is to help you replace static "walls of text" from your LLM with dynamic, interactive, graphical UI. It uses a JSON-based format to compose UIs from your existing widget catalog, turning conversations or agent interactions into rich, intuitive experiences. State changes in the UI update a client-side data model, which is fed back to the agent, creating a powerful, high-bandwidth interaction loop. The GenUI SDK for Flutter aims to be easy to integrate into your Flutter application to significantly improve the usability and satisfaction of your chatbots and next-generation agent-based user experiences.

High-level goals

  • Increase Interaction Bandwidth for Users: allow users to interact with data and controls directly, making task completion faster and more intuitive. Move beyond a "wall of text".
  • Simple and easy to use by developers: seamlessly integrate with your existing Flutter workflow, design systems, and widget catalogs.
  • Drive agent-human UX forward: innovate ways to dramatically improve how users interact with their LLMs and Agents. Radically simplify the process of building UI-based agent interactions, by eliminating custom middleware between the agent and the UI layer.

Features

  • Multiple agent and LLM provider support
  • A2UI support
  • Standard UI catalog
  • Custom widgets
  • Data binding
  • Chat UX
  • Canvas UX

Use cases

  • Incorporate graphical UI into chatbots: instead of describing a list of products in text, the LLM can render an interactive carousel of product widgets. Instead of asking for a user to type out answers to questions, the LLM can render sliders, checkboxes, and more.
  • Create dynamically composed UIs: an agent can generate a complete form with sliders, date pickers, and text fields on the fly based on a user's request to "book a flight."

Look & feel

GenUI Demo

The GIF above shows how GenUI enables dynamic, interactive UI generation, instead of text descriptions or code from a traditional AI coding agent.

Core difference

This UI is not generated in the form of code; rather, it's generated at runtime based on a widget catalog from the developers' project.

GenUI Features Breakdown

Implementation goals

  • Integrate with your LLM: Work with your chosen LLM and backend to incorporate graphical UI responses alongside traditional text.
  • Leverage Your Widget Catalog: Render UI using your existing, beautifully crafted widgets for brand and design consistency.
  • Interactive State Feedback: Widget state changes are sent back to the LLM, enabling a true interactive loop where the UI influences the agent's next steps.
  • Framework Agnostic: Be integrated into your agent library or LLM framework of choice.
  • JSON Based: Use a simple, open standard for UI definition—no proprietary formats.
  • Cross-Platform Flutter: Work anywhere Flutter works (mobile, iOS, Android, Web, and more).
  • Widget Composition: Support nested layouts and composition of widgets for complex UIs.
  • Basic Layout: LLM-driven basic layout generation.
  • Any Model: Integrate with any LLM that can generate structured JSON output.

Connecting to an AI agent

The genui framework is designed to be backend agnostic. You can use any AI SDK (such as firebase_ai or dartantic_ai) to generate content. The framework provides adapters (like A2uiTransportAdapter) to ingest the AI response and render it.

For custom agent servers that implement the A2UI protocol, you can use the genui_a2a package.

See the package table below for more details on each.

Packages

Package Description Version
genui The core framework to employ Generative UI. pub package
genui_a2a Provides A2uiAgentConnector for connecting to any server that implements the A2UI protocol. Use this for integrating with custom agent backends. pub package
genai_primitives A set of technology-agnostic primitive types and data structures for building Generative AI applications. pub package
json_schema_builder A fully featured Dart JSON Schema package with validation, used by the core framework to define widget data structures. pub package
Dependencies

This diagram shows how packages depend on each other and how examples use them.

graph TD
  dev_tools/catalog_gallery --> genui
  examples/simple_chat --> genui
  dev_tools/composer --> genui
  examples/verdure --> genui_a2a
  genui_a2a --> genui
  genui --> genai_primitives
  genai_primitives --> json_schema_builder

A2UI Support

The Flutter Gen UI SDK uses the A2UI protocol to represent UI content internally. The genui_a2a package allows it to act as a renderer for UIs generated by an A2UI backend agent, similar to the other A2UI renderers which are maintained within the A2UI repository.

The Flutter Gen UI SDK currently supports A2UI v0.9.

Getting started

See the genui getting started guide.

Skills

This repo contains skill files for developers building with agentic coding tools. They can be copied directly into an agent's preferred location or installed using the skills package:

npx skills add https://github.com/flutter/genui/tree/main/packages/genui/skills

Constraints

This repo requires Flutter version >=3.35.7.

Some things we're thinking about

  • Genkit Integration: Integration with Genkit.
  • ADK Plugin: turnkey integration with ADK.
  • Expanded LLM Framework Support: Official support for additional LLM frameworks.
  • Streaming UI: Support for progressively rendering UI components as they stream from the LLM.
  • Full-Screen Composition: Enable LLM-driven composition and navigation of entire app screens.
  • A2A Agent Support: Support for A2A agent interactions.
  • Dart Bytecode: Future support for Dart Bytecode for even greater dynamism and flexibility.

Contribute

See CONTRIBUTING.md

카테고리

의존성

의존성 목록 7 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위