AI.JSX

Stale
GitHub TypeScript MIT

Description

A framework for integrating AI into JSX components. Build AI applications the React way with streaming rendering, tool use, and agent composition.

Key Features

  • Integrates AI capabilities into JSX components — build AI applications the React way
  • Generative UI: LLM dynamically renders React components to create interactive interfaces at runtime
  • Multi-model support: seamless switching between OpenAI, Anthropic, Llama2, and custom models
  • Built-in tool use, document Q&A, and streaming response support
  • Modular component-based prompt engineering — build complex AI logic like building blocks
  • Native LangChain.js integration and first-class Next.js/CRA support

Use Cases

💡 Build LLM-powered dynamic UI applications where AI generates frontend interfaces in real time
💡 Integrate AI capabilities into Next.js projects to build intelligent web apps
💡 Manage complex multi-turn conversations and agent logic using JSX component composition
💡 Build AI chat and content generation interfaces with streaming output support
💡 Full-stack AI applications combining tool calls with seamless frontend rendering

Quick Start

npm install ai-jsx then import * as AI from 'ai-jsx'; const app = <ChatCompletion><UserMessage>Hello</UserMessage></ChatCompletion>; const response = await AI.createRenderContext().render(app)

Related Projects