Superinterface AI Assistants Library
repository·main·Indexed 43 days ago
https://github.com/supercorp-ai/superinterfaceAn AI assistants library that enables developers to integrate AI capabilities into web applications using React components and hooks. It is optimized for building AI-first user interfaces such as chats, wizards, and audio threads.
What's inside Superinterface
- Superinterface is a library designed for building AI assistant capabilities into applications or websites. It provides a set of React components and hooks specifically tailored for creating AI-first interfaces, such as chat interfaces and guided wizards.
Run the audio-thread-dialog-realtime example
mainTo run the
audio-thread-dialog-realtimeexample locally, navigate to the example directory and use your preferred package manager to start the development server. Once running, you can view the live application in your browser athttp://localhost:3000.To begin customizing the application, modify the
app/page.tsxfile. The development server supports hot-reloading, so the page will auto-update as you save changes.npm run dev # or yarn dev # or pnpm dev # or bun devDeploy Superinterface via global bundles
mainAfter building the project, you can deploy Superinterface by including one of the specific global JavaScript bundles in your HTML file, depending on the desired interaction mode:
- Inline Thread: Use
Thread.global.js. - Dialog Thread: Use
ThreadDialog.global.js. - Voice/Audio Thread: Use
AudioThread.global.js.
To customize the rendering target for an inline Thread (which defaults to a
divwithid="thread-root"), you must edit theThread.tsxfile and runnpm run buildagain.- Inline Thread: Use
Modify the components example page
mainThe main entry point for the components example is located atapp/page.tsx. Modifying this file will trigger an auto-update in your browser via the development server.Run the thread-dialog-script-tag example locally
mainTo run the
thread-dialog-script-tagexample in a development environment, use your preferred package manager to start the development server. Once running, you can view the application athttp://localhost:3000. To make changes to the UI, edit theapp/page.tsxfile; the page will automatically update in your browser.npm run dev # or yarn dev # or pnpm dev # or bun devModify the next-multi-assistant application
mainThe main entry point for the application UI is located atapp/page.tsx. Changes made to this file will trigger automatic updates in the browser via Next.js Fast Refresh.Run the audio-thread example locally
mainTo run the
audio-threadexample project, navigate to the example directory and use your preferred package manager to start the development server. Once running, you can view the application in your browser athttp://localhost:3000.npm run dev # or yarn dev # or pnpm dev # or bun devRun the Superinterface primitives example
mainTo run the local development server for the primitives example, navigate to the
examples/primitivesdirectory and use your preferred package manager to execute thedevscript. Once running, you can view the live application athttp://localhost:3000.npm run dev # or yarn dev # or pnpm dev # or bun devModify the audio-thread example page
mainThe main entry point for theaudio-threadexample is located atapp/page.tsx. Modifying this file will trigger an auto-update in the browser during development.Run the Form Filling example locally
mainTo run the Superinterface form filling example in a development environment, navigate to the example directory and use your preferred package manager to start the development server. Once running, the application will be available at
http://localhost:3000.npm run dev # or yarn dev # or pnpm dev # or bun devBuild and publish the @superinterface/server Docker image
mainTo build and publish the production server as a Docker image, run the following commands from the repository root. The
server-releasebake target will automatically tag the image with both the specific version provided and thelatesttag.Ensure you replace
<version>with the specific npm version you are releasing (e.g.,1.1.7).npm install TAG=<version> docker buildx bake server-release docker push supercorp/superinterface-server:<version> docker push supercorp/superinterface-server:latestRun the Superinterface components example
mainTo run the local development server for the
componentsexample, navigate to the example directory and use your preferred package manager to execute thedevscript. Once running, you can view the live application athttp://localhost:3000.npm run dev # or yarn dev # or pnpm dev # or bun dev