The Open Standard for Generative UI
Add Generative UI doc
Rabi Shanker Guha868f459d8592
diff --git a/docs/docs/concepts/001-generative-ui.md b/docs/docs/concepts/001-generative-ui.mdindex 5b0aee714..40ba90af8 100644--- a/docs/docs/concepts/001-generative-ui.md+++ b/docs/docs/concepts/001-generative-ui.md@@ -1,8 +1,30 @@# Generative UI-- What is generative UI?-- How does it work?- by tool calling in the frontend+:::note Prerequisites+This guide assumes familiarity with LLMs and tool calling. If you are not familiar with these concepts, please refer to the [OpenAI guide](https://platform.openai.com/docs/guides/function-calling).+:::-- How to use it?- use... hook to create a tool & pass it to `<ChatProvider>`+One of the key features of Crayon is the ability to power Generative UI interfaces beyond simple pre-defined chat interfaces. Crayon allows you to build fully generative UI interfaces+that are powered by an LLM rather than being pre-defined by the developer.++## What is generative UI?+Generative UI refers to user interfaces that are dynamically generated and adapted by AI models in real-time. Unlike traditional static interfaces, generative UI can create, modify, and arrange UI components based on user interactions and context. This enables more flexible and personalized user experiences that can evolve based on user needs.++## How does it work?+While Crayon is fairly agnostic to the implementation details, the most common way to implement Generative UI is by using tool calling.++For example, let's assume we are building a personal finance assistant. It would typically have a set of tools that can:+- Read your past transactions+- Check your current balance+- Track your upcoming bills+- And more++This data is then fed back into the LLM response which generates a readable text response for the user.++By extending this approach, we can also pass specific tools to the LLM that it should call when it wants to display certain information to the user.+For example, if the user asks for their upcoming bills and the LLM has the `render_bills` tool at its disposal, it can call this tool to display the bills in a table format.++By passing this tool call invocation to the UI, we can then render a React component that displays the bills in a table format.++## How to use it?+See the [Generative UI guide](/docs/guides/generative-ui) for more information.diff --git a/docs/docs/index.md b/docs/docs/index.mdindex 4f1f93573..303759a7c 100644--- a/docs/docs/index.md+++ b/docs/docs/index.md@@ -1,6 +1,6 @@# Crayon Documentation-> Crayon is a UI toolkit for building AI agents.+> **Crayon is a UI toolkit for building AI agents.**## What is Crayon?@@ -15,6 +15,10 @@ It is extremely lightweight and can be integrated with any HTTP server includingThe component library is a set of beautifully designed & accessible UI components that are designed to work together to provide a live & responsive end-user experience for your AI applications. <br />It is built on top of headless Radix components and the Shell bridges the core and this component library to provide a seamless developer experience.+## Generative UI & Crayon+While Crayon is agnostic to the use case, one of the key reasons we made it is to power Generative UI interfaces. <br />+We believe that Generative UI represents the next paradigm shift in how we interact with AI and we want to make it easier for everyone to build them. See [Generative UI](/docs/concepts/generative-ui) for more details.+## What can I build with Crayon?Agents, Chatbots, Copilots - pretty much any application that is powered by an LLM can be built with Crayon. <br />@@ -31,14 +35,14 @@ To get an idea of what you can build with Crayon, check out the example [Persona- **Backend Agnostic**: Crayon is designed to work with any backend framework and doesn't mandate any specific architecture or data model. It can be adapted to any existing backend by implementing a few simple interfaces.- **Batteries Included**: Crayon comes together with a set of components that allow you to build a fully functional agentic interface with minimal effort.- **Extremely Lightweight**: Crayon core is designed to be extremely lightweight and doesn't add any overhead to your application beyond a few simple libraries.-- **Thmemeable, Accessible & Responsive** - Crayon components are designed to be themeable, accessible & responsive across all surfaces and all interaction patterns - Chatbots, Agents, Copilots, etc.+- **Themeable, Accessible & Responsive** - Crayon components are designed to be themeable, accessible & responsive across all surfaces and all interaction patterns - Chatbots, Agents, Copilots, etc.## FAQs### Why did we build Crayon?We believe that the future of AI is not just about creating more powerful LLMs, but also about creating more engaging and accessible applications that can be used by everyone. <br />-We want to make it easier for developers to build AI applications and we believe that the best way to do this is to create a set of tools that can be used to build AI applications.+We want to make it easier for developers to build AI applications and we believe that the best way to do this is to create a set of tools that can be adapted into any existing backend framework.### Why a new component library?We started with off the shelf component libraries but realized that they needed some adaptations